I’ve got pretty simple code out here:
NSArray* divisions = [[NSString stringWithFormat: @"%d", system("ssh git@nebula \"ls\"")]
componentsSeparatedByString: @"\n"];
[divisions removeLastObject];
And I get:
No visible @interface for 'NSArray' declares the selector 'removeLastObject'
Sorry if this is quite a nooby question, but this is who I am at Objective-C. My guess is that I’m messing with pointers, I’m still not certain how they work and how to work with them.
Thanks in advance.
You can’t add or remove objects like that from an immutable NSArray instance. You have to use an NSMutableArray.