1

My tvOS app repeatedly failed on server-side validation by Apple with email notification saying:

Invalid Executable - The executable 'VPK_FULL_TV.app/VPK_FULL_TV' does not contain bitcode

I've used the method described here: How to check if a framework is BITCODE supported for Xcode7 and all my libs/frameworks print out at least one line with segname __LLVM.

  1. I wonder, how sufficient is this test with otool? Could it happen that the test prints out the line segname __LLVM but some function is still left out without the bitcode?

  2. is there another way of testing the bitcode completeness?

  3. I also tried this test on std libs e.g. /Applications/Xcode-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/lib/libresolv.9.tbd but that prints NO segname __LLVM line thus showing that there is no bitcode included. I should be, right? What is this .tbd lib anyway?

BTW, here are some shortcuts for running the otool if you find it useful:

find . -name '*a' -type f -exec ./test_bitcode.sh {} \;

test_bitcode.sh

echo ""
echo "***** TESTING $1"
otool -l $1 | grep __LLVM | head -n1
Community
  • 1
  • 1
PerfectGamesOnline.com
  • 1,774
  • 1
  • 18
  • 31

1 Answers1

0

Check that your libraries are not being strip -x post being built with bitcode.

I found strip removes the bitcode from the libraries

Also kinda like your script: Bitcode Checking Script:

https://github.com/danoli3/Bitcode-Check-Script

Usage: bitcodeCheck "boost_system.a"

Results:

------------------
BITCODE=YES for: boost_system.a
------------------

It uses the basis of otool and __LLVM as specified by Apple

Danoli3
  • 3,203
  • 3
  • 24
  • 35