Attributed string 'Google' contains NSLinkAttributeName. Removed

171 Views Asked by At

I am developing application in apple Watch. I am using label and adding text as link. On that link i want to implement phone call event. I am using following code.

[string addAttribute:NSLinkAttributeName
                   value:linkURL
                   range:NSMakeRange(0, string.length)];

but I am getting following error.

Attributed string '9618194xxx' contains NSLinkAttributeName. Removed

please help me out

Thanks in Advance

1

There are 1 best solutions below

0
On

I don't believe WatchKit supports links in attributed strings. Since there's no browser on the Watch, tapping it wouldn't open anything anyway.