I am attempting to manually combine ffmpegkit.framework into my Expo Naked Workflow iOS app (constructed with React Native + native modules by way of Xcode) as a result of the ffmpegkit can be deprecated and the binaries can be deleted.
Up to now
- I’ve downloaded the most recent LTS launch of FFmpegkit from right here.
- I’ve created 3 recordsdata: FFmpegModule.m , FFmpegModule.swift and SoundBud-Bridging-Header.
- Added the frameworks to my projectDir/ios manually, which exhibits in my XCode underneath projectDir/Frameworks
- Added all of the frameworks into “Frameworks, Libraries and Embedded Content material” and make them “Embed and Signal”
- As Framework Search Path in Undertaking Settings, I’ve set it to “$(PROJECT_DIR)” and recursive
- In “Construct Phases” I’ve added all of the frameworks underneath “Embed Frameworks”,set the vacation spot to “Frameworks” and checked “Code Signal on Copy” to all of them and unchecked “Copy Solely When Putting in”
- Additionally underneath “Hyperlink Binary With Libraries” I’ve added all of the frameworks and marked them “Required”
Listed here are the errors I am getting:
- The framework isn’t acknowledged by Swift (No such module ‘ffmpegkit’)
- A construct cycle error: Cycle inside SoundBud; constructing might produce unreliable outcomes.
Goal ‘SoundBud’ has copy command from ‘…/Frameworks/ffmpegkit.framework’ …
Under you may see my swift file and the ffmpegkit module file:
Swift:
import Basis
import ffmpegkit
import React
@objc(FFmpegModule)
class FFmpegModule: NSObject, RCTBridgeModule {
static func moduleName() -> String {
return "FFmpegModule"
}
@objc
func runCommand(_ command: String, resolver resolve: @escaping RCTPromiseResolveBlock,
rejecter reject: @escaping RCTPromiseRejectBlock) {
FFmpegKit.executeAsync(command) { session in
let returnCode = session?.getReturnCode()
resolve(returnCode?.getValue())
}
}
@objc
static func requiresMainQueueSetup() -> Bool {
return false
}
}
and the module:
framework module ffmpegkit {
header "AbstractSession.h"
header "ArchDetect.h"
header "AtomicLong.h"
header "Chapter.h"
header "FFmpegKit.h"
header "FFmpegKitConfig.h"
header "FFmpegSession.h"
header "FFmpegSessionCompleteCallback.h"
header "FFprobeKit.h"
header "FFprobeSession.h"
header "FFprobeSessionCompleteCallback.h"
header "Degree.h"
header "Log.h"
header "LogCallback.h"
header "LogRedirectionStrategy.h"
header "MediaInformation.h"
header "MediaInformationJsonParser.h"
header "MediaInformationSession.h"
header "MediaInformationSessionCompleteCallback.h"
header "Packages.h"
header "ReturnCode.h"
header "Session.h"
header "SessionState.h"
header "Statistics.h"
header "StatisticsCallback.h"
header "StreamInformation.h"
header "ffmpegkit_exception.h"
export *
}
I can give you extra information should you want it. I have been attempting non cease for 7 days and it is driving me loopy. I might admire any assist tremendously