I have downloaded the latest Aviary code 2.6.0 and incorporated it in my Xcode 4.2 for my iPhone 4S running iOS 5.0. Every time I launch Aviary action I get a traceback show below for objectAtIndexedSubscript.

I saw this post " Is objectAtIndexedSubscript available in IOS5? " and there is no objectAtIndexedSubscript in iOS 5.0. In Aviary documentation it said iOS 5.0 is supported. What did I miss?

So here's my question. Has anyone attempted to incorporate the latest Aviary code build of 2.6.0 for iOS 5.0? If not what Aviary SDK version works for iOS 5.0? Where can I download older version of Aviary SDK. I am just not ready to move to iOS 6.0 yet. I am trying to report this bug to Aviary support but I have feeling they will tell me to go upgrade to iOS 6.0.

From Aviary website:

Run time requirements The minimum iOS version supported by the SDK is iOS 5.0. The main reasons for this choice are our use of ARC (Automatic Reference Counting) and our reliance on a number of Apple frameworks and libraries which require iOS 5."

- (void) launchPhotoEditorWithImage:(UIImage *)editingResImage highResolutionImage:(UIImage *)highResImage
{    

    NSLog(@"launchPhotoEditorWithImage ...");

    // Initialize the photo editor and set its delegate
    AFPhotoEditorController * photoEditor = [[AFPhotoEditorController alloc] initWithImage:editingResImage];
    [photoEditor setDelegate:self];

    NSLog(@"Present photo editor ...");

    // Present the photo editor.
    [self presentViewController:photoEditor animated:YES completion:nil];
}

2013-03-31 19:32:14.953 Photo Editor[348:707] launchPhotoEditorWithImage ...
2013-03-31 19:32:15.421 Photo Editor[348:707] Present photo editor ...
2013-03-31 19:32:15.421 Photo Editor[348:3f03] -[__NSArrayM objectAtIndexedSubscript:]: unrecognized selector sent to instance 0x4ac5f0
2013-03-31 19:32:15.432 Photo Editor[348:3f03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM objectAtIndexedSubscript:]: unrecognized selector sent to instance 0x4ac5f0'
*** First throw call stack:
(0x36fbe8bf 0x3232e1e5 0x36fc1acb 0x36fc0945 0x36f1b680 0xb1a45 0x32933d55 0x32935dc7 0x32935c5d 0x32936867 0x37f5c1cf 0x37f5c0a4)
terminate called throwing an exception[Switching to process 9987 thread 0x2703]
[Switching to process 9987 thread 0x2703]
warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame.
kill
Current language:  auto; currently objective-c
quit
Program ended with exit code: 0
有帮助吗?

解决方案 2

Add this guys category (get it from github link) and it will work flawlessly

http://cocoaisland.wordpress.com/2012/08/12/modern-objective-c-part-ii-container-subscripting/

其他提示

Just update to the newest Xcode. In some old versions of Xcode, objectAtIndexedSubscript: is not implemented in the SDK.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top