Rebuild IJKMediaFramework to Support Bitcode
First follow the ijkplayer README:
git clone https://github.com/Bilibili/ijkplayer.git ijkplayer-ios
cd ijkplayer-ios
git checkout -B latest k0.8.8
./init-ios.sh
cd ios
./compile-ffmpeg.sh clean
./compile-ffmpeg.sh all
Then you'll see this error:
CC libavcodec/arm/blockdsp_init_arm.o
./libavutil/arm/asm.S:50:9: error: unknown directive
.arch armv7-a
^
make: *** [libavcodec/arm/aacpsdsp_neon.o] Error 1
make: *** Waiting for unfinished jobs....
clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
Make change to do-compile-ffmpeg.sh folling this fix, compile again:
./compile-ffmpeg.sh clean
./compile-ffmpeg.sh all
After it's done, open IJKMediaPlayer.xcodeproj. To enable Bitcode for Archive, go to Build Settings, click on the + sign to add a User-Defined Setting: BITCODE_GENERATION_MODE=bitcode
.
Now ⌘B to get the Bitcode-enabled framework. You can also use my Pod to avoid the fuss.
pod 'IJKMediaFramework', :git => '[email protected]:muyexi/IJKMediaFramework.git'