ibm-bluemix-mobile-services/bms-clientsdk-swift-push

Disable Code Coverage needed for xCode 9 - Carthage Compatibility

Closed this issue · 10 comments

when submitting to App Store I am getting the following warning:

Invalid Bundle - Disallowed LLVM instrumentation. Do not submit apps with LLVM profiling instrumentation or coverage collection enabled. Turn off LLVM profiling or code coverage, rebuild your app and resubmit the app.

It appears that this is being cause because Code Coverage is enabled on this framework.

For more information please visit:

Carthage/Carthage#2056

Carthage/Checkouts/bms-clientsdk-swift-push/Carthage/Checkouts/bms-clientsdk-swift-core/Carthage/Checkouts/bms-clientsdk-swift-analytics-api/BMSAnalyticsAPI.xcodeproj/xcshareddata/xcschemes/BMSAnalyticsAPI iOS.xcscheme: codeCoverageEnabled = "YES">
Carthage/Checkouts/bms-clientsdk-swift-push/Carthage/Checkouts/bms-clientsdk-swift-core/Carthage/Checkouts/bms-clientsdk-swift-analytics-api/BMSAnalyticsAPI.xcodeproj/xcshareddata/xcschemes/BMSAnalyticsAPI Tests.xcscheme: codeCoverageEnabled = "YES">
Carthage/Checkouts/bms-clientsdk-swift-push/Carthage/Checkouts/bms-clientsdk-swift-core/Carthage/Checkouts/bms-clientsdk-swift-analytics-api/BMSAnalyticsAPI.xcodeproj/xcshareddata/xcschemes/BMSAnalyticsAPI watchOS.xcscheme: codeCoverageEnabled = "YES">

Its a BMSAnalyticsAPI issue I guess. I will open A ticket there. Thanks for pointing this out ..

The issue is with both frameworks. Check out the bold line:

Carthage/Checkouts/bms-clientsdk-swift-analytics-api/BMSAnalyticsAPI.xcodeproj/xcshareddata/xcschemes/BMSAnalyticsAPI iOS.xcscheme: codeCoverageEnabled = "YES">
Carthage/Checkouts/bms-clientsdk-swift-analytics-api/BMSAnalyticsAPI.xcodeproj/xcshareddata/xcschemes/BMSAnalyticsAPI Tests.xcscheme: codeCoverageEnabled = "YES">
Carthage/Checkouts/bms-clientsdk-swift-analytics-api/BMSAnalyticsAPI.xcodeproj/xcshareddata/xcschemes/BMSAnalyticsAPI watchOS.xcscheme: codeCoverageEnabled = "YES">
Carthage/Checkouts/bms-clientsdk-swift-core/BMSCore.xcodeproj/xcshareddata/xcschemes/BMSCore Tests.xcscheme: codeCoverageEnabled = "YES">
Carthage/Checkouts/bms-clientsdk-swift-core/Carthage/Checkouts/bms-clientsdk-swift-analytics-api/BMSAnalyticsAPI.xcodeproj/xcshareddata/xcschemes/BMSAnalyticsAPI iOS.xcscheme: codeCoverageEnabled = "YES">
Carthage/Checkouts/bms-clientsdk-swift-core/Carthage/Checkouts/bms-clientsdk-swift-analytics-api/BMSAnalyticsAPI.xcodeproj/xcshareddata/xcschemes/BMSAnalyticsAPI Tests.xcscheme: codeCoverageEnabled = "YES">
Carthage/Checkouts/bms-clientsdk-swift-core/Carthage/Checkouts/bms-clientsdk-swift-analytics-api/BMSAnalyticsAPI.xcodeproj/xcshareddata/xcschemes/BMSAnalyticsAPI watchOS.xcscheme: codeCoverageEnabled = "YES">
Carthage/Checkouts/bms-clientsdk-swift-push/BMSPush.xcodeproj/xcshareddata/xcschemes/BMSPushTests.xcscheme: codeCoverageEnabled = "YES">
Carthage/Checkouts/bms-clientsdk-swift-push/Carthage/Checkouts/bms-clientsdk-swift-core/BMSCore.xcodeproj/xcshareddata/xcschemes/BMSCore Tests.xcscheme: codeCoverageEnabled = "YES">
Carthage/Checkouts/bms-clientsdk-swift-push/Carthage/Checkouts/bms-clientsdk-swift-core/Carthage/Checkouts/bms-clientsdk-swift-analytics-api/BMSAnalyticsAPI.xcodeproj/xcshareddata/xcschemes/BMSAnalyticsAPI iOS.xcscheme: codeCoverageEnabled = "YES">
Carthage/Checkouts/bms-clientsdk-swift-push/Carthage/Checkouts/bms-clientsdk-swift-core/Carthage/Checkouts/bms-clientsdk-swift-analytics-api/BMSAnalyticsAPI.xcodeproj/xcshareddata/xcschemes/BMSAnalyticsAPI Tests.xcscheme: codeCoverageEnabled = "YES">
Carthage/Checkouts/bms-clientsdk-swift-push/Carthage/Checkouts/bms-clientsdk-swift-core/Carthage/Checkouts/bms-clientsdk-swift-analytics-api/BMSAnalyticsAPI.xcodeproj/xcshareddata/xcschemes/BMSAnalyticsAPI watchOS.xcscheme: codeCoverageEnabled = "YES">

@zirinisp I have already removed it . Will release updated version in sometime .

@zirinisp Please do the following,

  1. Go to the carthage/checkouts
  2. Open the BMSxxxx project that you are facing issue in Xcode
  3. disable the Code coverage in build settings.
  4. Do carthage build in your project again. (Do not do Carthage Update)

This will solve your issue.

@zirinisp We are aware of this. Disabling the Code coverage on our SDKs will impact in the quality of SDKs. Its being monitored. I will try to get a permanent solution. Will come back to you soon... We are also following this Carthage/Carthage#2056

I am glad you are monitoring this.

For the moment a nice solution is in the answer of my stackoverflow question. It disables code coverage in all Carthage dependencies.

https://stackoverflow.com/questions/46160518/xcode-9-carthage-itunes-connect-error-invalid-bundle-disallowed-llvm-instr

In my opinion Carthage should implement that with a flag and make everyone’s life easier.

I hope a solution is found.

@zirinisp Exactly... Its not good go and disable code coverage in all frameworks we use. But for now thats the only neat solution we have. Carthage should fix it.

I am still experiencing this issue with Carthage 0.27.0 and some AWS iOS SDK frameworks, and some other frameworks.

@sarah-j-smith

Please do the following,

Go to the carthage/checkouts
Open the BMSxxxx project that you are facing issue in Xcode
disable the Code coverage in build settings.
Do carthage build in your project again. (Do not do Carthage Update)

This will solve your issue.