admin管理员组文章数量:1356241
I'm trying to manually integrate ffmpegkit.framework into my Expo Bare Workflow iOS app (built with React Native + native modules via Xcode) because the ffmpegkit will be deprecated and the binaries will be deleted.
So far
- I've downloaded the latest LTS release of FFmpegkit from here.
- I've created 3 files: FFmpegModule.m , FFmpegModule.swift and SoundBud-Bridging-Header.
- Added the frameworks to my projectDir/ios manually, which shows in my XCode under projectDir/Frameworks
- Added all the frameworks into "Frameworks, Libraries and Embedded Content" and make them "Embed and Sign"
- As Framework Search Path in Project Settings, I've set it to "$(PROJECT_DIR)" and recursive
- In "Build Phases" I've added all the frameworks under "Embed Frameworks",set the destination to "Frameworks" and checked "Code Sign on Copy" to all of them and unchecked "Copy Only When Installing"
- Also under "Link Binary With Libraries" I've added all the frameworks and marked them "Required"
Here are the errors I'm getting:
- The framework is not recognized by Swift (No such module 'ffmpegkit')
- A build cycle error: Cycle inside SoundBud; building could produce unreliable results. Target 'SoundBud' has copy command from '.../Frameworks/ffmpegkit.framework' ...
Below you can see my swift file and the ffmpegkit module file: Swift:
import Foundation
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 "Level.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 provide you with more info if you need it. I've been trying non stop for 7 days and it's driving me crazy. I would appreciate any help greatly
本文标签: react nativeIncluding FFmpegframework Into My IOS AppStack Overflow
版权声明:本文标题:react native - Including FFmpeg.framework Into My IOS App - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744046775a2581670.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论