tangram-es: Can't create iOS Archives when using Tangram-es binary framework because of bitcode weirdness

Went through testing Xcode’s archive generation (which is how most independent developers generate their IPAs to distribute) and I get this error:

screen shot 2016-12-06 at 10 29 41 am

This seems to be related to an error I ran across before, describe here: (https://github.com/Alamofire/Alamofire/issues/835#issuecomment-145404118) but wasn’t able to reliably reproduce it. It seems that in Xcode 8, bitcode generation for regular builds versus archives is a different process.

When I attempt to reproduce this by building the ios-sdk I get a slightly different error:

2016-12-06 15:06:31 +0000 [MT] Presenting: Error Domain=IDEFoundationErrorDomain Code=1 "Failed to verify bitcode in TangramMap.framework/TangramMap:
error: Bundle only contains bitcode-marker /var/folders/ty/20jr0dzn5_z9s6vw3ttczj400000gp/T/XcodeDistPipeline.epy/Root/Payload/ios-sdk.app/…" UserInfo={NSLocalizedDescription=Failed to verify bitcode in TangramMap.framework/TangramMap:
error: Bundle only contains bitcode-marker /var/folders/ty/20jr0dzn5_z9s6vw3ttczj400000gp/T/XcodeDistPipeline.epy/Root/Payload/ios-sdk.app/…}

I believe this is the actual error, and the test project I’m using is obfuscating that.

To Reproduce the first error:

  1. Download the Tangram-es binary framework from https://github.com/tangrams/ios-framework
  2. Start a new iOS project
  3. Add the binary framework and make sure to embed the binary in xcode like so: screen shot 2016-12-06 at 10 37 27 am
  4. Attempt to archive the build (Product Menu -> Archive)

Or you could just use this project I made (you’ll have to change the codesigning credentials for this one): test-tangram-archive.zip

To reproduce the ios-sdk you’ll need to follow the directions at https://github.com/mapzen/ios and then once you’ve pod installed and everything, attempt to archive the build.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 20 (6 by maintainers)

Most upvoted comments

Right, the naming should reflect the build type, https://github.com/tangrams/tangram-es/pull/1594 should give enough information. We decided to only provide Debug build for snapshots for development (we don’t expect users to publish/archive from a snapshot) and Release build for releases (with bitcode enabled), available from both CocoaPods and the website.

@msmollin yep those are Release builds.

I must’ve had a debug version installed as well. I rm -rf Pods and re-installed, and now 0.7.1 from Cocoapods is installing / archiving correctly.

hey @Buthrakaur, the S3 snapshots version available on http://ios.mapzen.com/ are debug version and we don’t produce bitcode when we build for Debug. Is there any reason you would need bitcode support for Debug frameworks?

@Buthrakaur Thanks for the note. We recently overhauled the entire build process for iOS, so it’s possible we introduced a regression. I am also seeing the issue now.

ld: bitcode bundle could not be generated because '/Users/Smollinger/coding/git_projects/ios-sdk/Pods/Tangram-es/TangramMap.framework/TangramMap' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build for architecture arm64