iOS program supports 64-bit and Project.pbxproj file introduction

Source: Internet
Author: User
Tags sourcetree

Program from 32bit to 64bit summary: First, the emergence of various " Objc_class$_sharesdk ", referenced from:

Solution:
Online version:
-Check Targets->build settings->architectures.
Change build active architectures only to NO.
-Remove the arm64 parameter from the bottom valid architectures (but this does not support the 64-bit?). )
Or:
-Double-click Architectures, select Other, delete $(ARCH_STANDARD) , and then add ARMv7 and Armv7s (write on: $(ARCHS_STANDARD_32_BIT) ).
-Clean and build.

Personal solutions:
Build Settings, other Linker Flags, join-all_load

Second, error occurred at compile time:

Clang:error:no such file or directory: ' Foundation '
Clang:error:no such file or directory: ' Adsupport '

Since it's all a compile-time problem, you should look at the application's compilation settings file
To view compiled files in a program project.pbxproj:

查看方法:-> 找到程序的:程序名.xcodeproj文件-> 右键显示包内容-> project.pbxproj

Take a look at the compile reference path with no problem:

2/* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework;path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; };

There is no problem with the file pointer Isa. A rough analysis of the meaning of this string: The 2B82218A1B759BF400BDEFB7 first (I thought it should be the MD5 value of the file, but later found that the value will change.) So it should not be, specifically what is interested in studying again. ISA is a reference-relationship pointer to the file. Path is the relative address of the library file. The sourcetree should be the root directory of the lookup library file.

这里因为是iOS所以根目录都是指向SDK的存放位置。如果是自己的文件则应该都是`"<group>"`。

The path file does not have any problems:
The library can be found under path = System/library/frameworks/adsupport.framework;

The build phases-Link Binary with Libraries also imports normally.
There are no red flags in the file directory.

The main problem was found when looking at the compilation markup:

"-framework",UIKit,Foundation

"-framework", the compile tag used here is wrong. Delete the foundation or add "-framework" before the foundation. Therefore, the following reasons should be used incorrectly when using build Setting and other link flags, because the other link flags set the result to be directly related to this part of the content.

Iii. Conversion of data types

PS: Changing this part really makes me feel like a porter ... Tired sleep does not love)
-Nsinteger int
-Unsigned-Nsuintege
-CGFloat Float
-and Numberwithint is basically going to change into numberwithinteger and so on.
.......

Iv. introduction of Project.pbxproj documents Pbxbuildfile and Pbxfilereference

Pbxbuildfile and pbxfilereference These two sections save information about the project file: the type, path, name, etc. of the containing file

/ * Begin pbxbuildfile section * /    2B82218d1b75ac8800bdefb7/ * Foundation.framework in Frameworks * /= {ISA = Pbxbuildfile; FileRef =2B82218c1b75ac8800bdefb7/ * Foundation.framework * /; };/ * End pbxbuildfile section * //* Begin pbxfilereference section * f60cc2a014d4ea0500a005e4 /* SOCKETOPERATION.M * *= {ISA = Pbxfilereference; Lastknownfiletype = SourceCode. C. OBJC; Sourcetree = <group>; };/ * End pbxfilereference section * /
Pbxgroup

This section holds the grouping information for the project file: the name of the grouping, and the files contained in the group, such as the following example, a Egotableviewpullrefresh group with a children sub-group, At the same time, the group contains the Egorefreshtableheaderview. h and. m two files that correspond to the relative paths of: /classes/egotableviewpullrefresh

        /* EGOTableViewPullRefresh */ = {            isa = PBXGroup;            children = (                /* EGORefreshTableHeaderView.h */,                /* EGORefreshTableHeaderView.m */,            );            name = EGOTableViewPullRefresh;            path = ../Classes/EGOTableViewPullRefresh;            "<group>";        };/* End PBXGroup section */
Pbxnativetarget

This section saves the target information created by the project: contains information about the corresponding configuration information for the target, creation rules, dependencies, name and type, and so on

/ * Begin pbxnativetarget section * /        1D6058900d05dd3d006bfb54/ * Mybaby * /= {isa = Pbxnativetarget; Buildconfigurationlist =1D6058960d05dd3e006bfb54/ * Build configuration list for Pbxnativetarget "Mybaby" * /; Buildphases = (1D60588d0d05dd3d006bfb54/ * Resources * *,832D4f01120a6f7c001708d4/ * CopyFiles * /,1D60588e0d05dd3d006bfb54/ * Sources * /,1D60588f0d05dd3d006bfb54/ * Frameworks * /,79289B3ecca2441197b8d7f6/ * Copy Pods Resources * /,            );            Buildrules = ();            dependencies = ();            name = Mybaby;            ProductName = WordPress; Productreference =1D6058910d05dd3d006bfb54/ * My Baby.app * /; ProductType ="Com.apple.product-type.application"; };/ * End pbxnativetarget section * /
Xcbuildconfiguration and Xcconfigurationlist

These two sections hold the project-related configuration information: The following is the debug mode configuration information, you can see inside contains code_sign_identity,sdk,framework search path and other information.

/ * Begin xcbuildconfiguration section * /c01fcf5008a954540054247b/ * Release * /= {isa = xcbuildconfiguration; Baseconfigurationreference = ebc24772e5cd4036b5afd803/ * Pods.xcconfig * /; Buildsettings = {Archs ="$ (archs_standard)"; Code_sign_entitlements =""; Code_sign_identity ="";                Gcc_c_language_standard = C99; Gcc_thumb_support =NO; Gcc_warn_about_return_type =YES; Gcc_warn_unused_variable =YES; Header_search_paths =""; Iphoneos_deployment_target =7.0; Only_active_arch =NO; Other_cflags ="-wno-format-security"; Other_ldflags = ("-LXML2","-licucore",                ); Provisioning_profile ="";                Sdkroot = Iphoneos; Validate_product =YES; Valid_archs ="ARMv7 arm64 armv7s";            };        name = Release; };/ * End xcbuildconfiguration section * // * Begin xcconfigurationlist section * /c01fcf4e08a954540054247b/ * Build configuration list for Pbxproject "Mybaby" * /= {isa = xcconfigurationlist; Buildconfigurations = (c01fcf4f08a954540054247b/ * Debug * /, c01fcf5008a954540054247b/ * Release * /,2F30b4c10e342fdf00211b15/ * Distribution * /, thed3e0201215f89f00600b4b/ * Beta * /,            ); Defaultconfigurationisvisible =0;        Defaultconfigurationname = Release; };/ * End xcconfigurationlist section * /

Through the process of analyzing a pbxproj file above, it can be seen that to create a project, you first need to add the relevant files, and then set the target needs to be generated and the corresponding configuration information on the line.

Summarize

If there is an error at compile time, in addition to the grammatical error, we need to check the engineering setup file to see if these parts are correctly set in principle. Follow the prompts to view the content. As I have encountered here: clang: error: no such file or directory: ‘Foundation’ , should go to check pbxbuildfile, pbxfilereference and xcbuildconfiguration items.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

iOS program supports 64-bit and Project.pbxproj file introduction

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.