IOS Error Resolution

Source: Internet
Author: User

There are a number of ways to upgrade from sdk3.2.5 to SDK 7.1, and there are some logical relationships that are more rigorous.
1, Warning: "Xoxoxoxo" is deprecated
Workaround: Look at the documentation for this method of Xoxoxoxo, and replace this method.

2, Warning: Declaration of "struct sockaddr" is not being visible outside of this function
Workaround: Add #import <netinet/in.h> in your open source. m file

3, Warning: Implicit conversion 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 and not 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 possible.
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 Files
Command/developer/platforms/iphonesimulator.platform/developer/usr/bin/clang failed with exit code 1

WORKAROUND: In your main project file target search, pch, find prefix Header to put the value behind it, all deleted, and then run the solution.

10, Warning:
"ARC forbids synthesizing a property of an Objective-c object with unspecified ownership or storage attribute
Workaround: If arc is defined as 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: Find Xxx.png duplicates in the project and delete duplicate resources.

//The following is a warning that is used after upgrading to Xcode 5.0.1
13, Warning:
The IOS emulator failed to install the application.
Workaround: Remove the app currently running on the emulator and rerun the project. Just OK.

14, Warning:
Springboard Unable to 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-to-terminal) and 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 address)
Then directly enter "P" confirmation, you can reconnect.

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 ').
Workaround:
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.

19, Warning:
error:ignoring filxxxxxx/libbaidumobstat.a, missing required architecture x86_64 in FILEXXXX/LIBBAIDUMOBSTAT.A
Workaround:
Targets->build setting under architectures set to Standard Architetures (armv7,armv7s) vaild architectures set to armv7,armv7s 。

20, Warning:
error:directory not found for option '-l/users/joryoubonxx/baidustatistic
Workaround:
Delete targets->build setting the library search path is not the correct address, if not, re-add the third library, clean, restart 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.

UIView 2012-10-10 12:17
1, error message:
"_objc_class_$ xxxxx", referenced from:
Objc-class-ref in VIEWCONTROLLER.O
Ld:symbol (s) not found for architecture i386
Clang:error:linker command failed with exit code 1 (use-v to see invocation)
Workaround:
view the project to see if the relevant framework is not imported. Or the project adds the same ". M", ". h" Files

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) and does not contain a (n) armv7s slice:/users/mac4/desktop/my desktop/my App/mya PP name 20:09:12/myapp name/zbarsdk/libzbar.a for architecture armv7serror:linker command failed with Exi T 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 arvm7s, 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 in Viewcontroller H. "HidesearchbarTo

5, error message: When the JSON from the service side of the request to get the string, if so write, will error, '; ' After top level declarator
nsstring *ss= @ "{" Recommend ": Doomsday", " Dogname":" Robot "}";
Workaround:
IS, "replace" to "." nsstring *ss= @ "{ \"Recommend \": \"The end of the world \", \"Dogname \": \"Robot \"}";

6. Error message:
error:existing instance variable ' _datasource ' for property ' datasource ' with assign attribute must is __unsafe_unretain Ed

Workaround:
Id<listviewdatasource> _datasource; Change to __unsafe_unretained id<listviewdatasource> _datasource: Ready

7. Error message:
Error:no architectures to compile for (Only_active_arch=yes, ACTIVE arch=x86_64, valid_archs=i386).

Workaround:
Targets->build setting under Build Active Architecture only set NO.

8. Problems with identity (the identity ' IPhone Developer) certificate mismatch in iOS real-computer debugging

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

UIView 2012-10-16 15:03
to,Warning:
Warning:semantic issue:incompatible integer to pointer conversion assigning to ' bool * ' (AKA ' signed char * ') from ' bool ' (aka ' signed Char ')

Solutions: check bool * Change to BOOL, check if you write more than one * number.


warnings in the 32:jsonkit

Direct access to Objective-c's Isa is deprecated in favor of Object_setclass () and Object_getclass ()
Object->isa replaced by Object_getclass (object)
Keyobject->isa replaced by Object_getclass (Keyobject)
(ID) Keys[idx]->isa replaced by Object_getclass ((ID) keys[idx])

format Specifies type ' unsigned long ' but the argument have type ' Nsuinteger ' (aka ' unsigned int ')
Add a variable (unsigned long) for type conversion


33:MD5 Encryption (the IOS SDK comes with Commoncrypto

Implicit declaration of function ' CC_MD5 ' is invalid in C99

[Plain] View plaincopy

#define CC_MD5_DIGEST_LENGTH 16
+ (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: @ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
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]];
}

To introduce a function-defined header file

#import <CommonCrypto/CommonDigest.h>


warnings in the 34:asidatadecompressor

format specifies type ' short ' but the argument have type ' int '

In + (Nserror *) Deflateerrorwithcode: (int) code and + (Nserror *) Inflateerrorwithcode: (int) in code

[NSString stringwithformat:@ "Compression of data failed with code%hi", code]

Change code to (short) code, type conversion


warning in 35:reachability

Using ' stringwithstring: ' With a literal is redundant

statusstring = [NSString stringwithstring: @ "not Reachable"];

Instead: statusstring = @ "Not Reachable";


36.format Specifies type ' ID ' but the argument have type ' const char * '

Nscassert (NO, @ "Unhandled error encountered during SAX parse. MSG is%@", msg);
Instead: Nscassert (NO, @ "Unhandled error encountered during SAX parse. MSG is%@", [NSString stringwithutf8string:msg]);

PNS Using ' stringwithstring: ' With a literal is redundant
Instead: Self.locationInput.text = @ "Captured change";


38 An error occurs when you set the Layer property of a control in a project.
"Property ' C ' cannot is found in forward class object ' Calayer *",

At this point #import <QuartzCore/CALayer.h> needs to be introduced.

uiview 2012-11-30 10:58
41, error

Error launching remote program:failed to get the task for process   

Workaround:
Remove the software on the real machine, then, clean it, You can run it again.

        
42, when the real machine debugging, appears    [attachment=49364]    this is normal, but does not recognize the machine.

Workaround:

put, [attachment=49365] set to the corresponding version of the above is OK.

43, when the real machine debugs, appears    iOS broken pipe

Workaround:
: Launch Xcode
: Disconnect machine (iphone,ipad,ipod) Link
: Restart the iphone when you're connected to Xcode, it's ready.

IOS Error Resolution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.