ld: ‘/Users/mlopes/projects/Personal/StarMiner/Export/ios/StarMiner/lib/arm64/libgamecenter.a(93fbcbe6_ExternalInterface.o)’ does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld build/StarMiner.build/Release-iphoneos/StarMiner.build/Objects-normal/arm64/StarMiner normal arm64
EDIT: I’ve just noticed that the problem seems to be with the Gamecenter library, which seems to be pre-compiled. How can I compile it locally?
I tried running lime rebuild extension-gamecenter ios which didn’t fail, but when I try openfl test ios it fails with the same error.
Perhaps we should try and fix the ENABLE_BITCODE=No case first. I noticed that in the pbxproj there were a couple “Debug” and “Release” project configuration settings, on “native” and one not. Perhaps we need to set this on both sets, and not just the “native” one? (you’ll get what I mean, I think, if you search the source for the templates/iphone/PROJ.xcodeproj)
Then if we can get it to disable, that should get you running, but as for the “enable” setting, we’ll have to look at how to manually compile something with clang for “enable bitcode” and add this to HXCPP’s toolchain files?
Is this in the OpenFL source code? There doesn’t seem to be a folder iphone inside templates:
Also I couldn’t find the file anywhere in OpenFL or in the Exports folder (using find ./ -iname "PROJ.xcodeproj" and find ./ -iname "*xcodeproj").
About the “enable” setting, I guess it depends on why this is happening, I assumed that this is some change that Apple made to the way Xcode 7.x works, and that it will affect everyone who upgrades their xcode, in which case it would be good to have a simple way to address it. But I can’t be sure that this is not something specific of my local system.
Ok, tried adding ENABLE_BITCODE = NO; to all the buildSettings on the templates/iphone/PROJ.xcodeproj/project.pbxproj file, but it still shows the same error. Sorry if I’m being thick here, but I don’t really have a lot of experience with Xcode or iOS development, this being my first attempt at an iOS project.
After doing that, I’ve managed to compile from xcode, I’m now trying to find which changes are relevant to add to the template file, without much success so far.
So for now, I can compile, if I go to xcode and disable bitcode every time I re-run openfl.
Here’s the diff, maybe it will help someone finding out what I’m missing there: