2

I'm using Swift as my project language,and there is a library written in Objective-C.The issue is that the property apnsNickname's type is String!? in Swift.As the compiler's auto completion tells me.

enter image description here

I want to know how to assign a value to this type.The following assignment has a compiler error.

EaseMob.sharedInstance().chatManager.apnsNickname = "Mike"

Cannot assign to the result of this expression

Can anyone help me out?

enter image description here enter image description here

The definition of the property is:

@protocol IChatManagerSettingOptions <IChatManagerBase>

@optional

@property (strong, nonatomic) NSString *apnsNickname;

...

@end
tounaobun
  • 14,570
  • 9
  • 53
  • 75

0 Answers0