Faile to Compile Bundle Xcode 10 BETA 6

Hi


I have 2 projects, 1 is a framework, the other being an app that uses the fraemwork. Both build settings specify the following:


iOS Deployment target = iOS 10.0

Swift Language Version = Swift 4.2

Architectures = Standard architectures

Supported Platforms = iOS

Valid Architectures = arm64 armv7 armv7s

Enable Bitcode = Yes


The framework uses a Run Script in the Build Phases to create a universal build of the framework. In the app, the Run Script Build Phrase copies a "thinned" version of the framework depending on the target i.e device or simulator.


Both project build successfully and I can generate an archive from the app project. However when I attempt to generate the distribution which involves compiling for bitcode, the export IPA fails to to create with the following error:


error: Failed to compile bundle: /var/folders/qk/pl28fvfj6fqfwmvhg98n9xy80000gn/T/IBMVerifyKitrIN5Ft/MyApp.armv7.xar\n \n\nStderr:\n\n>\n /Applications/Xcode-beta.app/Contents/Developer/usr/bin/ipatool:248:in `run'\n /Applications/Xcode-beta.app/Contents/Developer/usr/bin/ipatool:2399:in `block in CompileOrStripBitcodeInBundle'\n /Applications/Xcode-beta.app/Contents/Developer/usr/bin/ipatool:2338:in `each'\n /Applications/Xcode-beta.app/Contents/Developer/usr/bin/ipatool:2338:in `CompileOrStripBitcodeInBundle'\n /Applications/Xcode-beta.app/Contents/Developer/usr/bin/ipatool:2543:in `ProcessIPA'\n /Applications/Xcode-beta.app/Contents/Developer/usr/bin/ipatool:3346:in `<main>'";

info = {

};

level = ERROR;

type = exception;

}

);

thinnableAssetCatalogs = (

"/var/folders/qk/pl28fvfj6fqfwmvhg98n9xy80000gn/T/XcodeDistPipeline.zof/Root/Payload/MyApp.app/Assets.car"

);

}



-= Output =-

Undefined symbols for architecture armv7:

"___llvm_profile_runtime", referenced from:

__hidden#436_ in 01.o

__hidden#436_ in 02.o

__hidden#436_ in 03.o

__hidden#436_ in 05.o

__hidden#436_ in 06.o

__hidden#436_ in 07.o

__hidden#436_ in 08.o

...

ld: symbol(s) not found for architecture armv7

Exited with 1

error: Failed to compile bundle: /var/folders/qk/pl28fvfj6fqfwmvhg98n9xy80000gn/T/MyFramworkKit2Q7zfl/MyFrameworkKit.armv7.xar



Any ideas? Impossible for me to proceed with uploading to Test Flight while this error occurs...


Thanks

Accepted Answer
      "___llvm_profile_runtime", referenced from:


Does your framework have instrumentation turned on? Take a look at this Q&A.

Hi Edford


Many thanks for putting me on the right path.


In the end I needed to "uncheck" Code Coverage in the Test schema of the project for both the Framework project and the App project that consumes it.


Figure 3 - Enable Code Coverage


Can you confirm this is the default setting in Xcode (new installs and BETA's). It causes enormous confusion and frustration and other than the link you provided, there is very little documentation.


Cheers


Craig

@craigaps


Thankyou so muchhhhh.. You saved me one week of headache and frustration. I could treat you

Faile to Compile Bundle Xcode 10 BETA 6
 
 
Q