shinydevelopment / SimulatorStatusMagic

Clean up your status bar for taking screenshots on the iOS simulator.
MIT License
2.35k stars 139 forks source link

Add BITCODE_GENERATION_MODE user defined setting. #59

Closed kenthumphries closed 6 years ago

kenthumphries commented 6 years ago

This ensures that generated framework will be correctly built with bitcode for archiving and submitting to Apple. Source: https://medium.com/@heitorburger/static-libraries-frameworks-and-bitcode-6d8f784478a9 Source: http://stackoverflow.com/a/34965178

This change is necessary when creating a Release build of SimulatorStatusMagiciOS.framework, then adding manually to a project (not via Carthage or CocoaPods). In order to use the framework in a Debug build (ie for automation of screenshots), the framework must be linked and also embedded within project. If bitcode is enabled for the project, all embedded frameworks must also contain bitcode, hence the requirement that SimulatorStatusMagiciOS.framework generates bitcode. Note: SimulatorStatusMagiciOS.framework is only invoked in Debug build, not Release build, but xcode currently has no built-in method for embedding frameworks based on configuration. Source: https://forums.developer.apple.com/thread/95424

kenthumphries commented 6 years ago

Definitely the wrong approach. SimulatorStatusMagic uses private APIs, so can't ship it to App Store, even if it's unused.

Will find a workaround to include framework only for debug in my project.

Pull request closed.

daveverwer commented 6 years ago

Both the opening and the subsequent closing of this PR all happened while I was on a plane today. You're absolutely right that it uses private APIs and so can never be shipped in an App Store build. Sorry!