|
14 | 14 |
|
15 | 15 | /* Post build processor for configuring the XCode project generated by Unity. |
16 | 16 | * |
17 | | - * Requires Unity 5.0 or higher. |
| 17 | + * Requires Unity 2019 or higher. |
18 | 18 | * |
19 | 19 | * Given that Unity generates the XCode project, we cannot configure a project |
20 | 20 | * in advance with the necessary frameworks and capabilities. Instead, we do so |
21 | 21 | * programmatically via a post build processor. This will automatically run |
22 | 22 | * once Unity is finished building for iOS. |
23 | 23 | * |
24 | | - * There are three main operations performed by this script: |
25 | | - * (1) Copy over an existing entitlement to the XCode project. |
26 | | - * (2) Patch the project's Info.plist for certain capabilities. |
27 | | - * (3) Add frameworks to the project. |
| 24 | + * There are two main operations performed by this script: |
| 25 | + * (1) Generate an entitlements file with the necessary ones for products. |
| 26 | + * (2) Turn off bitcode. |
28 | 27 | * |
29 | | - * For (1), the entitlement is generated manually in advance by |
30 | | - * configuring a separate XCode project to use the desired capabilities |
31 | | - * and frameworks, and saving the generated entitlement. That entitlement |
32 | | - * is then copied into the Unity project before building for iOS, and is saved |
33 | | - * as 'dev.entitlements'. |
| 28 | + * For (1), the entitlement is generated using ProjectCapabilityManager, |
| 29 | + * into a file called `dev.entitlements`. Based on the name of the project, |
| 30 | + * it adds the capabilities that are expected. |
34 | 31 | * |
35 | | - * For (2), we similarly see the difference between a project with the |
36 | | - * capabilities/frameworks versus without them, and patch the Info.plist |
37 | | - * using Unity's plist API. We could have saved a copy of an Info.plist |
38 | | - * and copied that over, like we did in (1), but the Info.plist contains a |
39 | | - * large amount of other critical information. Patching the plist appears |
40 | | - * to involve less of a maintenance burden. |
41 | | - * |
42 | | - * For (3), Unity has an API for adding frameworks. |
43 | | - * |
44 | | - * Note that starting with Unity 2017, there is a much more powerful |
45 | | - * API for enabling XCode capabilities which would significantly simplify |
46 | | - * this script. If support for 5.x is deprecated, then moving to that API |
47 | | - * is recommended. See the ProjectCapabilityManager in Unity's documentation |
48 | | - * for reference. |
| 32 | + * For (2), we modify the project to turn off bitcode, since XCode has |
| 33 | + * deprecated it, but some versions of Unity turn it on by default, causing |
| 34 | + * issues. |
49 | 35 | */ |
50 | 36 |
|
51 | 37 | #if (UNITY_IOS || UNITY_TVOS) |
|
0 commit comments