1

bitcode bundle could not be generated because '/Users/Hadevs/Desktop/XCodeProjects/KartinaTV/TVVLCKit.framework/TVVLCKit(VLCMe‌​dia.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64

i know, that it solving by compiling TVVLCKit with full bitcode, but i can't to do it. There's much issues. How can i fix it?

user102008
  • 30,736
  • 10
  • 83
  • 104
HadevsCode
  • 188
  • 1
  • 12
  • https://code.videolan.org/videolan/VLCKit/issues/4 – JAL Feb 01 '16 at 19:28
  • how it works? i must enter this line after building framework? And whats next? – HadevsCode Feb 01 '16 at 21:12
  • Have you tried disabling bitcode on your project? Go to ''Build Settings" then go to "Build Options" and change "Enable Bitcode" to No – Alan Scarpa Feb 01 '16 at 21:33
  • @Alan_s it is tvos project. there is no disabling bitcode. – HadevsCode Feb 01 '16 at 21:34
  • TVVLCKit is not supposed to be used as a framework, but as a static library. If you did your own TVVLCKit framework target, chances are that there is a bitcode issue in there. – feepk Feb 06 '16 at 13:53

1 Answers1

2

in order to build the latest build of TVVLCKit successfully, execute the following commands from your terminal:

git clone http://code.videolan.org/videolan/VLCKit.git
cd VLCKit
./buildMobileVLCKit.sh -t

# it will probably stop on error about code.c missing string.h and it will state the declaration of memcpy is incorrect, execute the following lines:
sed -i .bak 's/git pull --rebase/#git pull --rebase/;s/git reset --hard ${TESTEDHASH}/#git reset --hard ${TESTEDHASH}/' buildMobileVLCKit.sh

sed -i .bak -e '/git reset --hard ${TESTEDHASH}/{' -e 'n;s?git am ../../patches/\*.patch?#git am ../../patches/\*.patch?' -e'}' buildMobileVLCKit.sh

cd MobileVLCKit/ImportedSources/vlc/contrib/AppleTVOS-aarch64/gsm/src
cp code.c code.bak
echo -e "#include <string.h>\n$(cat code.c)" > code.c
cd ../../../../../../..

cd MobileVLCKit/ImportedSources/vlc/contrib/AppleTVSimulator-x86_64/gsm/src
cp code.c code.bak
echo -e "#include <string.h>\n$(cat code.c)" > code.c
cd ../../../../../../..

./buildMobileVLCKit.sh -t

# now you should be able to see the "all done" message, now lets xCode build (you can change the tvOS version from 9.2 to 9.1 if you need), (note the bit code generation option)

xcodebuild -project "MobileVLCKit.xcodeproj" -target "TVVLCKit" -sdk appletvos9.2 -configuration Release ARCHS="arm64" IPHONEOS_DEPLOYMENT_TARGET=9.2 GCC_PREPROCESSOR_DEFINITIONS="" BITCODE_GENERATION_MODE=bitcode

xcodebuild -project "MobileVLCKit.xcodeproj" -target "TVVLCKit" -sdk appletvsimulator9.2 -configuration Release ARCHS="x86_64" IPHONEOS_DEPLOYMENT_TARGET=9.2 GCC_PREPROCESSOR_DEFINITIONS="" BITCODE_GENERATION_MODE=bitcode

# you can also create the framework file for both simulator and red apple tv with the following lines:

cd build
rm -rf TVVLCKit.framework
mkdir TVVLCKit.framework
lipo -create Release-appletvos/libTVVLCKit.a Release-appletvsimulator/libTVVLCKit.a -o TVVLCKit.framework/TVVLCKit
chmod a+x TVVLCKit.framework/TVVLCKit
cp -pr Release-appletvos/TVVLCKit TVVLCKit.framework/Headers

after this you can find the "libTVVLCKit.a" file for real apple tv at: "VLCKit/build/Release-appletvos" and the "libTVVLCKit.a" for the Xcode simulator at: "VLCKit/build/Release-appletvsimulator"

the framework file will be located at: "VLCKit/build/TVVLCKit.framework"

in order to test it drag the "TVVLCKit.framework" to your project and include the following frameworks as well in your project:

  • AudioToolbox.framework
  • OpenGLES.framework
  • CFNetwork.framework
  • CoreText.framework
  • libbz2.tbd
  • libiconv.tbd
  • CoreGraphics.framework
  • Security.framework
  • libc++.tbd
  • CoreVideo.framework
  • MediaPlayer.framework
  • QuartzCore.framework

not sure they are all required,

if you are using swift, then create a bridge header file and write this import statement:

#import <TVVLCKit/TVVLCKit.h>

here is a small swift example to play a stream / file:

var appDelegate: AppDelegate!
appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate

player = VLCMediaPlayer()
player.media = VLCMedia(URL: NSURL(string: "http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4"))
player.play()
player.drawable = appDelegate.window // or self.view if this code is in a UIViewController
Shaybc
  • 2,628
  • 29
  • 43
  • Hi Guys I've been trying to to this for days now, if you managed it I have an open freelancer project to achieve just this, TVVLCKit.framework that I can use in a project and archive from Xcode here is the freelancer if you fancy making a few $$$ i'd be willing to pay about $50 https://www.freelancer.co.uk/projects/Mobile-Phone/Compile-TVVLC-framework-MobileVLCKIt/ – gav Apr 23 '16 at 19:30
  • please can u explain how to make TVVLCKit works in more easily and well explained way ? I don't understand the whole process u explain ! – Essam Fahmi Oct 30 '18 at 11:08