'Objective C String literal not working correctly
I'm running XCode Version 12.4 and have issues with String literals which used to work in previous versions. This is a project from about 4 years ago which I'm trying to bring up to the latest iOS versions.
I have an Objective-C method that takes 2 NSString * values like this:
- (void) addItemNamed:(NSString *)itemName categoryName:(NSString *)categoryName {
// code here
}
This method gets called as follows:
[self addItemNamed:@"PurpleItem" categoryName:@"category1"];
This used to work just fine in the past but the problem is that now the values for itemName in the addItemNamed are always nil while the categoryName values are correct. I've looked around for XCode and Objective C changes that may be causing this to no avail. I must be missing some setting or other Objective-C change. Could anyone please help shed some light on this for me? Thanks in advance
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
