簡體   English   中英

iOS 5.0的Aviary SDK問題-objectAtIndexedSubscript

[英]Aviary SDK issue with iOS 5.0 - objectAtIndexedSubscript

我已經下載了最新的Aviary代碼2.6.0,並將其合並到運行iOS 5.0的iPhone 4S的Xcode 4.2中。 每次我啟動“鳥舍”動作時,都會在下面顯示objectAtIndexedSubscript的追溯顯示。

我看到了這篇文章“ IOS5中是否提供objectAtIndexedSubscript? ”,並且在iOS 5.0中沒有objectAtIndexedSubscript。 在Aviary文檔中,它說支持iOS 5.0。 我錯過了什么?

所以這是我的問題。 有沒有人嘗試將最新的Aviary代碼版本2.6.0用於iOS 5.0? 如果不是,Aviary SDK的哪個版本適用於iOS 5.0? 在哪里可以下載較舊版本的Aviary SDK。 我只是尚未准備好遷移到iOS 6.0。 我正在嘗試向Aviary支持人員報告此錯誤,但我感覺他們會告訴我升級到iOS 6.0。

從鳥舍網站:

運行時要求SDK支持的最低iOS版本是iOS 5.0。 做出此選擇的主要原因是我們對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

只需更新到最新的Xcode。 在某些舊版本的Xcode中,SDK中未實現objectAtIndexedSubscript:

添加此人類別(從github鏈接獲取),它將正常運行

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