9

So I recently had this issue when deploying to my device:

(null): error: bitcode_strip /Users/me/Library/Developer/Xcode/DerivedData/AppName-gximcjgdoodczthglfujqgpzamxl/Build/Products/Debug-iphoneos/Pods.framework/Pods: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip exited with 1

I didn't encounter this error when deploying to a simulator though.

I found a solution here which says that I should set a user defined attribute 'STRIP_BITCODE_FROM_COPIED_FILES' to no.

Since then, I now get "Found an uxexpected Mach-O header code: 0x72613c21" when trying to export an archive.

Before the bitcode_strip issue, I was having no problem exporting archives so I'm wondering if the fix caused the current issue I'm facing, or if perhaps they are unrelated? If they are unrelated, what could actually be causing this?

here is the verbose IDEDistribution log

critical distribution log

standard distribution log

Glenncito
  • 902
  • 1
  • 10
  • 23
  • Have you had any luck figuring this out? – Shane N Oct 21 '15 at 14:51
  • 1
    Yes. I started the project over, added all the relevant .swift files and then added all my PODs one by one. I have no idea what the issue was, but now its all working fine. – Glenncito Oct 22 '15 at 11:30
  • 1
    I had similar problem. The problem was with CocoaPods. Look at http://stackoverflow.com/a/25789145/1444496 and http://stackoverflow.com/a/33092433/1444496. These answers helped me. – Volodymyr Oct 25 '15 at 10:40

2 Answers2

1

I have the same issue. I solved the problem when:

  1. Uninstall cocoapods (I had installed cocoapods 0.39): sudo gem uninstall cocoapods
  2. Install cocoa pods 0.38.2: sudo gem install cocoapods -v 0.38.2
Marlon Ruiz
  • 1,774
  • 16
  • 14
1

For me, I went to TARGETS > General > Embedded Binaries

and removed my embedded binary (which was grey instead of yellow and happened to be Realm.framework)

Archive and submitted to iTunes then worked.

I wonder if it is because I had the Realm.framework embedded binary, but hadn't included the realm header or used realm yet - so maybe the compiler 'tried optimize away' my framework?

user1709076
  • 2,538
  • 9
  • 38
  • 59
  • I had been embedding the CouchbaseLite frameworks because I think that was the only way I could get the app to run in Xcode 8 on my iOS 10 device. But it also prevented me from uploading using Xcode 7.3.1. Once I removed CouchbaseLite and CouchbaseLiteListener from the Embedded Frameworks list, then the error went away and I was able to upload again. Phew! – Tap Forms Aug 26 '16 at 21:02