Xcode compilation error and warning summary, xcode compilation Summary

Source: Internet
Author: User

Xcode compilation error and warning summary, xcode compilation Summary

1. error: macro names must be identifiers YourProject_prefix.pch

Cause: Because you have corrupted the Preprocessor macro, you modified it when it is in <Multiple Values>.

Solution: Select All Configirations for Configiration, clear it, and redefine your Debug, Release, and Distributin Preprocessor macros.

 

2. warning: no rule to process file '$ (PROJECT_DIR)/LoadingView. H' of type sourcecode. c. h for architecture armv6

Cause: the Compile Sources file in the Target contains the header file, which does not need the header file.

Solution: Delete the header file from Compile Sources in Target.

 

3. Command/Developer/Platforms/iPhoneOS. platform/Developer/Library/Xcode/Plug-ins/iPhoneOS Build System Support. xcplugin/Contents/Resources/copypng failed with exit code 1

Cause: failed to copy the png image file. Check the information above that indicates which file Can't find is usually caused by deleting the file from the file system and not deleting it through Xcode, the Xcode project configuration file still records the reference of this file

Solution: Add a corresponding file to the file system, or delete it from Xcode Groups & Files, or delete it from Target's Copy Bundle Resources.

 

4. Code Sign error: The identity 'iphone Developer: Your Name 'doesn' t match any valid certificate/private key pair in the default keychain

Cause: Signature Error

Solution: Target-> Get Info-> Build-> Code Signing-> modify Signature

Remember that the Configuration type in the upper left corner must correspond to the current Build type (Debug, Release, Distribution). Otherwise, the Configuration type will be changed.

 

5. cocould not create bundle folder for versioned model *. moda (like this file with the extension name)

Cause: A New

Solution: delete all compiled moda files, clean the project, and build again.

 

6. error: There are no valid certificate/private key pairs in the default keychain

 

7. error: Cannot assign to 'self 'outside of a method in the init family

Cause: only values can be assigned to self in the init method. Xcode determines whether the value is an init method rule. The method returns an id and the name starts with init + uppercase letter + others. Example:-(id) initWithXXX;

Error code:-(id) Myinit {

Self = [super init];

......

}

Solution:-(id) initWithMy

{

Self = [super init];

}

 

8. Storyboards are unavailable on iOS 4.3 and prior

Solution: Clear ~ /Library/Developer/Xcode/DerivedData corresponds to the folder of the current project, and then re-compile it. This should be a bug in Xcode4.5.1.

 

9. Application windows are expected to have a root view controller at the end of application launch

Solution: In ios5 and later versions, a root view controller is required when an application is loaded, so you need to write code

_ RootViewController = [[RootViewController alloc] init];

Self. window. rootViewController = _ rootViewController;

 

10. error: failed to attach to process ID 0

Solution:

1) delete the App directy under ~ /Library/Developer/Xcode/DerivedData

2) start Xcode, in the menubar Project-> Clean

 

You are welcome to add them downstairs in the garden \ (^ o ^ )/~

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.