unity-automatic configuration when you export a Xcode project

Source: Internet
Author: User
use open Source Library xuporter, see https://onevcat.com/2012/12/xuporter/ 1. Automatic change of certificate and description file
Change the certificate, set the certificate name to be visible in the keychain
project.overwritebuildsetting ("code_sign_identity", "xxxxxxxxxx");

The iphone Configuration Utility (the older Mac system prompts installation to fail, but is still available) to view the description file number in the format
of the following//description file is stored at: ~/library/mobiledevice/provisioning Profiles
project.overwritebuildsetting ("Provisioning_profile", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
2. Set other project Settings
Bitcode Modify (all names are visible in Xcode)
project.overwritebuildsetting ("Enable_bitcode", "No");
3. Add frameworks,tbd automatically (make some changes yourself)
Project. AddFile ("System/library/frameworks/webkit.framework", Project. Getgroup ("Frameworks"), "Sdkroot", true,false);
        Project. AddFile ("System/usr/lib/libz.1.2.5.tbd", Project. Getgroup ("Frameworks"), "Sdkroot", true,false);
        Project. AddFile ("System/library/frameworks/social.framework", Project. Getgroup ("Frameworks"), "Sdkroot", True,false);
4. Modify Info Info
Edit plist file
editorplist (path);

private static void Editorplist (string filePath)
{
        xcplist list =new xcplist (filePath);
        String plistadd = @ "  
            <key>NSAppTransportSecurity</key>
            <dict>
                <key> nsallowsarbitraryloads</key>
                <true/>
            </dict> ";

        Add a row list to the plist
        . Addkey (plistadd);
        Replace the line
//list in plist      . Replacekey ("<string>com.yusong.${PRODUCT_NAME}</string>", "<string>" +bundle+ "</string>" );
        Save
        list. Save ();

    }
5. Compile Flags for individual files

6.PC Packing Note

Project. Addframeworksearchpaths ("$ (Project_dir)/frameworks/plugins/ios/umsocial_sdk_extra_frameworks/tencentopenapi");
Project. Addlibrarysearchpaths ("$ (srcroot)/libraries/plugins/ios");

For some third-party libraries, unity under the PC generates backslashes that need to be manually adjusted

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.