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