Rebuild IJKMediaFramework to Support Bitcode
1 min read

Rebuild IJKMediaFramework to Support Bitcode

First follow the ijkplayer README:

git clone ijkplayer-ios
cd ijkplayer-ios
git checkout -B latest k0.8.8


cd ios
./ clean
./ 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 folling this fix, compile again:

./ clean
./ 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'