Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve "PBXSourceTree type compilation errors when iOS Build Support module is not installed" #42

Conversation

rfadeev
Copy link
Contributor

@rfadeev rfadeev commented Jan 11, 2020

Summary

Fix compilation error when opening project with iOS build support not installed. This was caused by commented PBXSourceTree enum type.

Details

Uncommenting the type did not fix the issue as type if defined in UnityEditor.iOS.Xcode.Stickers while code from UnityEditor.iOS.Xcode.PBX uses it.

To fix that, move all Xcode manipulation API code into separate namespace Agens.StickersEditor.UnityEditor.iOS.Xcode (was UnityEditor.iOS.Xcode before). Reason to use separate namespace vs UNITY_IOS define like in #39 is folowing. If Unity ever changes access level of types from UnityEditor.iOS.Xcode namespace, there will be type name conflicts when using this project. To avoid that and avoid populating Unity specific namespace, use separate one instead.

Note that now all editor code uses Agens.StickersEditor namespace rather than Agens.Stickers as before. This way editor code is separated from runtime code explicitely (will can get handy if project will ever be distributed via Unity Package Manager).

Also moved all XcodeAPI code into separate folder Assets/Stickers/Editor/Xcode to emphasize the code comes from external source (I assume from https://bitbucket.org/Unity-Technologies/xcodeapi/src/stable/

How to test

Install Unity with no iOS build support and open the project. Observe no compilation errors and check it builds for PC.

Install iOS build support, reopen the project and switch platform to iOS. Observe no compilation errors and check it builds for iOS exactly as before (should be the same Xcode project as an output).

Closes #41

…le is not installed

Move all XcodeAPI code into Agens.StickersEditor namespace to allow to uncomment PBXSourceTree definition.
@skjalgsm skjalgsm merged commit 57af8d7 into agens-no:master Mar 24, 2020
@rfadeev rfadeev deleted the 41-pbxsourcetree-type-compilation-errors-when-ios-build-support-module-is-not-installed branch March 25, 2020 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PBXSourceTree type compilation errors when iOS Build Support module is not installed
2 participants