Xcode編繹及App上傳出錯問題解決

 

1.Choose a destination with a supported architecture in order to run on this device.  




解決:

Target -> Build Settings -> Build Options set the "Compiler for C/C++/Objective-C" -   選擇"Default compiler (Apple LLVM 5.0)"






2.clang: error: invalid deployment target for -stdlib
解決:





3.ios使用AdMob出錯-[GADObjectPrivate changeState:]: unrecognized selector sent
解決:在Build Settings 中的Other Linker Flags中加入-ObjC


4.'Undefined symbols for architecture i386:
_OBJC_CLASS_$_Reachability", referenced  from objc-class-ref inViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)'

解決:問題原因:我xcode版本爲4.5.1,在引入Reachability時候,4.5.1默認沒有勾選targert,所以導致上述錯誤。


5.ios6.0 storyboard編繹出錯:'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate

解決:storyboard or XIB tonot use Autolayout


6.使用SDWebImage 第三方庫出錯
Undefined symbols for architecture i386: "_OBJC_CLASS_$_MKAnnotationView", referenced from: l_OBJC_$_CATEGORY_MKAnnotationView_$_WebCache in MKAnnotationView+WebCache.o "_CGImageSourceCreateIncremental", referenced from: -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o "_CGImageSourceUpdateData", referenced from: -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o "_CGImageSourceCopyPropertiesAtIndex", referenced from: -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o "_CGImageSourceCreateImageAtIndex", referenced from: -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o "_kCGImagePropertyPixelHeight", referenced from: -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o "_kCGImagePropertyPixelWidth", referenced from: -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

解決:加入 MapKit  和  ImageIO



7.錯誤提示:* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '* -[NSCFArray insertObject:atIndex:]: mutating method sent to immutable object'
問題出現在語句:
[saveArray addObject:[NSNumber numberWithInt:saveNum]];
可變的方法發送給一個不可變的對象

ps:@property(nonatomic,retain) NSMutableArray * saveArray;
前面已經賦值:

NSMutableArray *array = [[NSMutableArray alloc] init];
self.saveArray = array;
[array release];



解決方法:
NSMutableArray *mutaArray = [[NSMutableArray alloc] init];
[mutaArray addObjectsFromArray:saveArray];

[mutaArray addObject:[NSNumber numberWithInt:saveNum]];

self.saveArray = mutaArray

[mutaArray release];


8.build 出現Dependency Analysis Error,Product.app出錯,解決方法


Unable to run command ‘Cpresource  Product.app' - this target might include its own product.




  




解決方法:
TARGETS - Build Phases-Copy Bundle Resources-把Product.app刪掉


9.UIPopoverController在Arc中編繹crash解決方法

- (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController
{
    self.popViewPop = nil;
}

10.上傳出現問題
ERROR ITMS-9000: "this bundle is invalid. armv7s are required to include armv7 architecture." at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage).





解決方法:


把Build Active Arch Only參數的值,改爲NO就可以了。



發佈了43 篇原創文章 · 獲贊 11 · 訪問量 8萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章