Closed wfltaylor closed 3 years ago
any one help?
Until the pod is updated by @tanersener you can build the xcframework with M1 arm64 slice locally by using ios.sh -x
script with XCode 12.2 toolchain installed. It should create xcframework with proper naming for maccatalyst and including arm64 slice.
The only problem with that is current master
appears to fail when building giflib
on my macbook.
I have a Catalyst project too, haven't updated it to arm64 mac yet - waiting for mobile-ffmpeg xcframework to include arm64-maccatalyst binary. If you have trouble building the project on XCode 12.2 even for x86_64 only - renaming slices inside the mobile-ffmpeg xcframework manually could help.
I think should add some code like ARCH_ARM64_MAC_CATALYST=7
https://github.com/tanersener/mobile-ffmpeg/blob/195a809cca79b645a66f686b668818e035c243d4/ios.sh#L3-L10
I've done some experimentation on this and I think the build / packaging scripts will need to be reworked to support the arm64 simulator and arm64 Mac catalyst targets.
I've been focusing on the arm64 simulator target and I've reached a point where I can build a framework for the arm64-simulator.
The problem is that when I try to package it with the x86_64-simulator framework into the xcframework, xcodebuild returns an error Both ios-x86_64-simulator and ios-arm64-simulator represent two equivalent library definitions.
From this post: https://developer.apple.com/forums/thread/666335 it appears that simulator (and Mac catalyst) frameworks need to be delivered as a fat binary in the xcframework.
The cleanest way to do this probably is to add a preprocessing step before xcodebuild --create-framework
to look for targets with -simulator or -maccatalyst and combine them to a fat binary (using lipo) and then pass that result to xcodebuild.
I completed refactoring the build scripts to support new apple
architectures and macos
. They are being tested at the moment. Also a new macos
test app is on the way. I'll push those changes when they're stable enough. The plan was to publish them on January but I had issues during testing. I'll need 1-2 weeks more to complete the tests.
Any news on the progress?
I implemented these changes under FFmpegKit, which is the continuation of MobileFFmpeg
. I suggest switching to FFmpegKit
if you want to use newer Apple architectures.
I implemented these changes under FFmpegKit, which is the continuation of
MobileFFmpeg
. I suggest switching toFFmpegKit
if you want to use newer Apple architectures.
Thanks, also is there any plan to migrate to swift in the future?
Unfortunately, merging the Swift API implemented in https://github.com/tanersener/mobile-ffmpeg/pull/599 wasn't possible. However, if someone implements a new Swift API identical to Objective-C API we have in FFmpegKit
then we can merge it and use it.
Description Currently MobileFFmpeg does not compile for arm64 on Mac Catalyst, only x86_64.
Environment