In the new contacts framework, I am trying to add social profiles and I am using a line of code that works in other projects, but for some reason it just does not work in the particular one that I am working in. Here is the code below
let twitterProfile = CNLabeledValue(label: "Twitter", value:
CNSocialProfile(urlString: nil, username: "ios_blog",
userIdentifier: nil, service: CNSocialProfileServiceTwitter))
contactData.socialProfiles = [twitterProfile]
I keep getting this error message: "Cannot Subscript a value of type CNLabeledValue<CNSocialProfile> with an index of type CNLabeledValue<CNSocialProfile>.
"
If I put it in another project it works, but I would need it to work in mine and for some reason I just keep getting this error.
I would really appreciate if someone could tell me what I am doing wrong.