<div dir="ltr">Hi All<div><br></div><div>I just upgrade to Swift 3. After open and convert my codes I found lots of errors. One of them is about CNLabeledValue.<div> </div><div>With Swift 2.3, it works well with:</div><div> </div><div><font face="monospace, monospace">var toExcludeOrCopy : CNLabeledValue? </font></div><div> </div><div>With Swift 3, it gives me the error message:</div><div><font face="monospace, monospace">Reference to generic type 'CNLabeledValue' requires arguments in <...>.</font></div><div><font face="monospace, monospace"><br></font></div><div>After I fixed it with XCode, it changed to:</div><div> <span style="font-family:monospace,monospace">var toExcludeOrCopy : CNLabeledValue<AnyObject>? </span></div><div> </div><div>However, Xcode gives me error message with this fix:</div><div><font face="monospace, monospace">Type 'AnyObject' does not conform to protocol 'NSCopying'.</font></div><div><br></div><div>I know the error is because of the generic type but I don't know how to declare with CNLabeledValue. My purpose is to store any the CNLabeledValue including phone number, email, address etc to one var.</div><div>Any help will be appreciate.</div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><br></div><div>Germán Laullón<br><br></div></div></div></div></div></div>
</div></div>