简体   繁体   English

iOS 5.0的Aviary SDK问题-objectAtIndexedSubscript

[英]Aviary SDK issue with iOS 5.0 - objectAtIndexedSubscript

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. 我已经下载了最新的Aviary代码2.6.0,并将其合并到运行iOS 5.0的iPhone 4S的Xcode 4.2中。 Every time I launch Aviary action I get a traceback show below for objectAtIndexedSubscript. 每次我启动“鸟舍”动作时,都会在下面显示objectAtIndexedSubscript的追溯显示。

I saw this post " Is objectAtIndexedSubscript available in IOS5? " and there is no objectAtIndexedSubscript in iOS 5.0. 我看到了这篇文章“ IOS5中是否提供objectAtIndexedSubscript? ”,并且在iOS 5.0中没有objectAtIndexedSubscript。 In Aviary documentation it said iOS 5.0 is supported. 在Aviary文档中,它说支持iOS 5.0。 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? 有没有人尝试将最新的Aviary代码版本2.6.0用于iOS 5.0? If not what Aviary SDK version works for iOS 5.0? 如果不是,Aviary SDK的哪个版本适用于iOS 5.0? Where can I download older version of Aviary SDK. 在哪里可以下载较旧版本的Aviary SDK。 I am just not ready to move to iOS 6.0 yet. 我只是尚未准备好迁移到iOS 6.0。 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. 我正在尝试向Aviary支持人员报告此错误,但我感觉他们会告诉我升级到iOS 6.0。

From Aviary website: 从鸟舍网站:

Run time requirements The minimum iOS version supported by the SDK is iOS 5.0. 运行时要求SDK支持的最低iOS版本是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." 做出此选择的主要原因是我们对ARC(自动引用计数)的使用以及我们对许多需要iOS 5的Apple框架和库的依赖。”

- (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

Just update to the newest Xcode. 只需更新到最新的Xcode。 In some old versions of Xcode, objectAtIndexedSubscript: is not implemented in the SDK. 在某些旧版本的Xcode中,SDK中未实现objectAtIndexedSubscript:

Add this guys category (get it from github link) and it will work flawlessly 添加此人类别(从github链接获取),它将正常运行

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM