Transferred from: http://blog.sina.com.cn/s/blog_9564cb6e0101u9lv.html
? There are a number of ways to upgrade from sdk3.2.5 to SDK 7.1, and some logic is more rigorous. 1, Warning: "Xoxoxoxo" is the deprecated workaround: Look at Xoxoxoxo's documentation for this method, and replace this method. 2, Warning: Declaration of "struct sockaddr" won't be visible outside of the This function workaround: Add #import3 in your open source. m file, warning: implicit C Onversion from enumeration type ' uiinterfaceorientation ' to different enumeration type ' uideviceorientation ' Workaround: Type mismatch. Jump to the wrong line, uiinterfaceorientation cast to Uideviceorientation. 4, Warning: incompatible pointer types assigning to ' myarraylist* ' from ' nsmutablearray ' workaround: Join the CAST (myarraylist*) 5, Warning: ' & & ' within ' | | ' Source of the problem: if (exists &&!isdirectory | |!exists) ... Workaround: If ((exists &&!isdirectory) | |!exists) ..... 6, Warning: warning:the Copy Bundle Resources Build phase contains this target ' s info.plist File workaround: Move the Info.plist file to the resources directory instead of directly under target. 7, Warning: In use asihttp ... The third party libraries, the operation error. WORKAROUND: See if your project adds Cfnetwork.framework, Systemconfiguration.framework, Mobilecoreservices.framework, Coregraphics.framework and Libz.1.2.3.dylib, if is sdk5.0 above, add Libz.1.2.5.dylib 8, Warning: xxxoOo,missing Required Architecture i386 in file workaround: If it is an error message: Target->build settings->search Paths, Delete Frameworksearch Paths inside the content is ready. To be just a warning, the real machine debugging can be too. The specific solution is for the great God to appear. 9, Warning: clang:error:no such file or directory: '/demo2/control code/13/recorder/recorder_prefix.pch ' Clang:error:no input Filesco Mmand/developer/platforms/iphonesimulator.platform/developer/usr/bin/clang failed with exit code 1 Workaround: In your master project file Target search, PCH, find the prefix Header to put the value behind it, all deleted, and then run the solution. 10, Warning: "ARC forbids synthesizing a property of the Objective-c object with unspecified ownership or storage attribute solution: if The definition of Arc is valid, then the owner attribute must be defined, so the code is changed to the following @property (Nonatomic, Strong, ReadOnly) NSString *ss; 11, Warning: Io6 xib system is not automatically selected use AutoLayout, supporting iOS 5 and below with Xib of iOS 6 workaround: Just un-select "Use AutoLayout" In the file inspector of the Xib ' s view and we is back to the familiar autosizing in size inspector and boom, it supports IOS 5 and below.12, Warning: warning:multiple build commands for output file Xxx.png workaround: Found in projectXxx.png Duplicate, delete duplicate resources. The following is the warning 13 that was encountered after upgrading to Xcode 5.0.1, Warning: "IOS emulator" failed to install this application. Workaround: Remove the app currently running on the emulator and rerun the project. OK14, Warning: Springboard cannot start Application error:-3 workaround: Exit the emulator and rerun the project. 15, Warning: The server certificate failed to verify. WORKAROUND: 1, open the terminal (utility and terminal), enter the following command in the terminal: SVN ls https://192.100.1.11?0/svn/xxxxxx (note the URL below to change to your own URL) and then directly enter "P" to confirm, You can reconnect it. 16, Warning: bitmasking for introspection of objective-c object pointers is strongly discouraged. Workaround: A number & 0x1 indicates whether the lowest bit is 1 and changed to if (Jk_expect_f ((Nsuinteger) object%2)). 17, Warning: Implicit conversion loses integer precision: ' unsigned long ' to ' Cc_long ' (aka ' unsigned int '). Solution: CC_MD5 (Str,strlen (str), R), changed to Cc_md5 (str, (Cc_long) strlen (str), R); 18, Warning: error:failed to launch '/private/var/mobile/applications/xxxxx '--Failed to get the task for process 11140. Workaround: Restart your development phone, and another possibility is that your developer certificate and publishing certificate have been mistaken, check whether the certificate has been in Xcode. In the case of a related warning, the general compiler will provide a solution, so, as a novice, we should understand the compiler to give us a hint, so we solve the problem will be more effective. 1, error message: "_objc_class_$ xxxxx", referenced From:objc-clasS-ref in ViewController.old:symbol (s) is found for Architecture I386clang:error:linker command failed with exit code 1 Workaround: Check the project to see if the relevant framework is not imported (use-v to see invocation). Or the project adds the same ". M", ". h" File 2, error message: couldn ' t register dy. Ckrilitext with the bootstrap server. Error:unknown error code. This generally means, another instance of this process were already running or is hung in the debugger. Current Language:auto; Currently Objective-c workaround: May be caused by computer memory problems, restart the computer can be resolved. If restarting does not solve the problem, it is the code you just changed that caused the problem. 3, error message: iOS 5 is debugging normal, iOS 6 real machine debugging, the following error occurred: Ld:file is universal (3 slices) but does not contain a (n) armv7s slice:/users/m ac4/desktop/my desktop/my App/myapp name 20:09:12/myapp name/zbarsdk/libzbar.a for Architecture Armv7serror:linker Comm and failed with exit code 1 (use-v to see invocation) Workaround: In Xcode, click on the corresponding target, then point to build Settings, find Valid_archs, look inside is not ARV M7s, if not changed to arvm7s on it. 4. Error message: Error:receiver type ' Viewcontroller ' for instance message does not declare a method with selector ' HideseArchbar: ' [4]viewcontroller does not declare a method to select ' Hidesearchbar: Workaround: Declare this method "Hidesearchbar" in Viewcontroller. H. 5, error message: When the JSON from the server request from the string, if this write, will be error, '; ' After the top level declaratornsstring *ss= @ "{" Recommend ":" Doomsday "," Dogname ":" Robot "}"; Workaround: Just, replace "to". NSString *ss= @ "{\" recommend \ ": \" Doomsday \ ", \" dogname \ ": \" robot \ "}"; 6. Error message: error:existing instance variable ' _datasource ' for property ' datasource ' with assign attribute must be __UNSAF e_unretained Workaround: ID _datasource; Change to __unsafe_unretained ID _datasource: 31, Warning: warning:semantic issue:incompatible integer to pointer conversion Igning to ' bool * ' (AKA ' signed char * ') solution from ' bool ' (aka ' Signed char '): check bool * Change to BOOL, check if you write more than one * number. 32:jsonkit warning Direct access to Objective-c's Isa is deprecated in favor of Object_setclass () and Object_getclass () object-& Gt;isa Replace with Object_getclass (object) Keyobject->isa Replace with Object_getclass (Keyobject) (ID) Keys[idx]->isa Replace with object_ GetClass ((ID) KEYS[IDX]) format sPecifies type ' unsigned long ' but the argument have type ' Nsuinteger ' (aka ' unsigned int ') to increment the variable (unsigned long) to convert 33:MD5 Plus Secret (IOS SDK comes with commoncryptoimplicit declaration of function ' CC_MD5 ' is invalid in c99[plain] View plaincopy #define Cc_m D5_digest_length + (NSString *) md5hashforstring: (NSString *) input {const char *CSTR = [input utf8string]; unsigned char result[cc_md5_digest_length]; CC_MD5 (CStr, strlen (CSTR), result); return [NSString stringWithFormat: @ "xxxxxxxxxxxxxxxx", Result[0], result[1], result[2], result[3], RESULT[4], result[5], result[6], result[7], result[8], result[9], result[10], result[11], RESULT[12], result[13], result[14], result[15]]; A warning in the header file #import34:asidatadecompressor of the function definition is introduced in format specifies type ' short ' but the argument have type ' int ' in + (Nserror * ) Deflateerrorwithcode: (int) code and + (Nserror *) Inflateerrorwithcode: (int) code in [NSString Stringwithformat:@ "Compression of data failed with code%hi", code] change code to (short) code, type conversion 35:reachability warning using ' Stringwithstring: ' With a literal are redundantstatusstring = [NSString stringwithstring: @ ' not Reachable ']; Instead: statusstring = @ "Not Reachable"; 36.format specifies type ' ID ' but the argument have type ' const char * ' Nscassert (NO, @ "U Nhandled error encountered during SAX parse. MSG is%@ ", msg); instead: Nscassert (NO, @" Unhandled error encountered during SAX parse. MSG is%@ ", [NSString Stringwithutf8stri NG:MSG]); the PNs Using ' stringwithstring: ' With a literal is redundant instead: Self.locationInput.text = @ "Captured change"; 38 in the project Error occurs when you place the Layer property of the control, "the property ' C ' cannot is found in forward class object ' Calayer *", you need to introduce #import. 41, error launching remote program:failed to get the task for process solution: Put the software on the real machine, delete it, then clean it and rerun it. 42, when the real machine debugging, appears [attachment=49364] this normal, but does not recognize the machine. Workaround: Put, [attachment=49365] set to the corresponding version of the above can be. 43, Real machine debugging, the advent of iOS broken pipe solution:: Launch Xcode: Disconnect the Machine (Iphone,ipad,ipod) Link: Restart the iphone when you're connected to Xcode. An issue prompting for identity (the identity ' IPhone Developer) certificate mismatch in iOS real-computer debugging (NULL) error:could not read cfbundleidentifier from Info.plist (NULL) Create a new project with the same name, copy its plist file, and replace the plist file in the original project.
The warnings, errors, and workarounds (RPM) encountered after the Xcode upgrade are frequently encountered