iOS Development run error, FAQs

Source: Internet
Author: User

First, error and alarm 1. Error code: NO architectures to compile for (Only_active_arch=yes, ACTIVE arch=x86_64, valid_archs=armv7 armv7s)

The command line error when build this target. You can search for Bitcode in build setting, and the Enable Bitcode is set to NO.

2, ld:framework not found IOKit

Terminal enter the following 2 lines of content

123 Cd/Applications/Xcode. App/Contents/Developer/platforms/Iphoneos. Platform/ Developer/SDKs/iPhoneOS7. 1.SDK/System/Library/frameworks/IOKit. Framework sudo ln -s Versions/A/IOKit .

Where, if not, slowly open from the folder to see the path is right, if you have to modify the name of the Xcode, note such as "Xcode 5" [There are spaces, "" The memory in the terminal added "" This symbol];

3, the program is no problem, operation error: Directory not empty

The cache file located under/users/your computer name/library/developer/xcode/deriveddata is a large cache space, and if you do not delete the cache file under Xcode for a long time, you will cause your hard disk space to become smaller until directory not Empty Delete the cache file and run it again without error.

Or, you can do it directly once.

4. If you encounter a compile error similar to: Undefined Symbols for architecture armv7:

"objc_class$_asihttprequest", first check whether the above dependency code has been added to the compilation list, if not joined, click Target->build phases->compile Sources, Click on the bottom "+" to add the above code.

If you encounter a compilation error similar to: Undefined Symbols for architecture armv7: "_inflateend", referenced from, Should be missing dependent Libz.dylib, Add method: Click Target->build phases->compile Sources, click "+" at the bottom, enter LIBZ in the pop-up list, add the latest version of the search results.

5.but did not return a nonzero exit code to indicate failure

Log similar to:

Solve:

Select the Build Settings menu and change the Compress PNG files to No.

6.Undefined Symbols for Architecture i386:

Log similar to: (Missing Bjgkpaintmapviewcontroller file reference)

Cause: When the Xcode project import file is looked up according to Project.pbxproj, a reference to the file cannot be found with the above error. The figure is that the Bjgkpaintcommand file does not find a reference to the Bjgkpaintmapviewcontroller class. Often in multi-person co-development, SVN commit project.pbxproj errors caused by the specification, so that the file reference is not in the Project.pbxproj file.

Solution:

A. Click Build phases, if the missing xxx is the class name, add the file in Complie sources. If the class library is missing, the class library is added to link Binary with libraries. The example is the absence of "Bjgkpaintmapviewcontroller", which is the class name.

B. or directly to the need to refer to the missing class/library of the original file to remove the reference, the author is called more than Bjgkpaintcommand class file, so remove it, there is no need to fill the Bjgkpaintmapviewcontroller class reference.

7. Problem: Ld/warning/directory not found for option removes a directory from the project, the file is compiled with a warning message: _ld:warning:directory not found for option "XX XXXX ":

Sometimes files and folders have been deleted from the project or the warning is reported, although no errors have occurred, but it is uncomfortable to watch.

Here are some ways to remove the warning:

1 Select project, compile (targets)

2 Choose the Build Settings menu

3 Locate the Library search Paths and the Framework search Paths below, and delete the path of the compiled report warning OK.

Update –>

Second, frequently asked Questions: 1. Emulator directory:

Click "finder-> to developer->xcode->deriveddata", Resource library, , "can't see the resource pool?" Click "Go" and when you see the menu bar, press "Option" to see it. "

or click "finder-> to go to the folder" and enter:

"/users/the user name you are currently logged/Library/Application Support/iphone simulator/"

2.Xcode build more projects, memory consumption, if the cache is cleared?

a. The app is here by Xcode build:

Click "finder-> go to resource pool->developer->xcode->deriveddata",

Alternatively, click "finder-> to go to Folder" and enter: "/users/the user name you are currently logged into/library/developer/xcode/deriveddata" (Colon not in)

b. Connect to the real machine generated files, you can delete all or delete the infrequently used version, the connection device will be automatically generated:

"~/library/developer/xcode/ios Devicesupport"

C. App package generated files, you can delete the unwanted project packaging files:

"~/library/developer/xcode/archives".

All of these can be removed from unwanted app items. Or delete the old items periodically.

3.Xcode Project Simulator on the local image of PNG format normal display, the real machine debugging does not display:

There are 2 possible reasons:

(1). The initial state of the picture, not PNG, is changed directly to PNG by itself. This simulator OK, the real machine has a problem.

You can use the Mac system to bring the picture preview to export, (just double-click the picture, click on the top left corner: file, Export->png format), and then re-import on the line.

(2). The file name on the real machine is case-sensitive , and the simulator above is not differentiated, so the simulator can, the real machine does not work;

Update –>

4. After the project changes some of the resources or modifies some of the data, running the emulator again is the same as the original effect, without changing: (for example, you are not prompted to find some header files.) )

Click:Product--clean, should be cleared and then compiled;

Every time the project has data modification, before re-run, I will clean up, to avoid the error caused by the cache ... This is often used, but clean really means I haven't read it yet.

iOS Development run error, FAQs

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.