Unity iOS packaging and continuous integration of several issues (script automation packaging ipa)

Since many settings of the package exported by Unity through the command line cannot be modified manually, a series of operations are required to modify the configuration of xcode. The command line modification only works on the command line and does not affect the original Unity export xcode project. The following solutions are all added to execute when compiling xcode on the command line

1. Architecture does not support armv7

The cause of the problem: Generally, the exported xcode project supports armv7 and arm64. If the code does not support armv7, modify the Architecture configuration in buildsettings to delete armv7. The command line can specify the architecture that supports execution.

 -arch ARCH                          build each target for the architecture ARCH; this will override architectures defined in the project

Problem solving: Use the -arch ARCH parameter to specify the execution architecture, such as: -arch arm64

2. Certificate error (1):

error: Signing for "XXXXXXX" requires a development team. Select a development team in the project editor. (in target 'XXXXXXX')

Cause of the problem: The default certificate of the Unity export project is automatically obtained by Automatic. If Xcode is not configured, it will prompt this error. If you need to manually configure the certificate, you need to specify it. (See reference 2 for details)

The problem is solved: Use the DEVELOPMENT_TEAM parameter to specify the execution architecture, and the development_TEAM can check the mobileprovision file. The command is as follows: DEVELOPMENT_TEAM=XXXXXXXX

3. Certificate error (2):

error: XXXXXX has conflicting provisioning settings. XXXXXX is automatically signed, but provisioning profile XXXXXX has been manually specified. Set the provisioning profile value to "XXXXXX" in the build settings editor, or switch to manual signing in the project editor. (in target 'XXXXXX')

Cause of the problem: Same as above, the reason is that the default certificate of the Unity export project is automatically obtained by Automatic. Here, you can specify the manual configuration through the command.

The problem is solved: the command is as follows: CODE_SIGN_STYLE=Manual

4. Compilation error:

ld: could not reparse object file in bitcode bundle: 'Invalid bitcode version (Producer: '1001.0.46.3.0_0' Reader: '1000.11.45.5_0')', using libLTO version 'LLVM version 10.0.0, (clang-1000.11.45.5)' for architecture arm64
clang: error
: linker command failed with exit code 1 (use -v to see invocation)

Cause of the problem: The cause of the problem is that the code does not support bitcode, just turn off the bitcode. Note that the bitcode setting during export does not work at compile time.

The problem is solved: the command is as follows: ENABLE_BITCODE=No

 

references:

1、https://help.apple.com/xcode/mac/current/#/itcaec37c2a6

2、https://issues.jenkins-ci.org/browse/JENKINS-38777

3、https://www.jianshu.com/p/4f4d16326152?nomobile=yes

Guess you like

Origin blog.csdn.net/xlyrh/article/details/89494348