12 C
Canberra
Thursday, May 1, 2025

react native – Together with FFmpeg.framework Into My IOS App


I am making an attempt to manually combine ffmpegkit.framework into my Expo Naked Workflow iOS app (constructed with React Native + native modules through Xcode) as a result of the ffmpegkit can be deprecated and the binaries can be deleted.

Thus far

  • I’ve downloaded the newest 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 reveals in my XCode below 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 Mission Settings, I’ve set it to “$(PROJECT_DIR)” and recursive
  • In “Construct Phases” I’ve added all of the frameworks below “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 below “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 will not be acknowledged by Swift (No such module ‘ffmpegkit’)
  • A construct cycle error: Cycle inside SoundBud; constructing may produce unreliable outcomes.
    Goal ‘SoundBud’ has copy command from ‘…/Frameworks/ffmpegkit.framework’ …

Under you’ll be able to 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 offer you extra data when you want it. I have been making an attempt non cease for 7 days and it is driving me loopy. I might admire any assist vastly

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

[td_block_social_counter facebook="tagdiv" twitter="tagdivofficial" youtube="tagdiv" style="style8 td-social-boxed td-social-font-icons" tdc_css="eyJhbGwiOnsibWFyZ2luLWJvdHRvbSI6IjM4IiwiZGlzcGxheSI6IiJ9LCJwb3J0cmFpdCI6eyJtYXJnaW4tYm90dG9tIjoiMzAiLCJkaXNwbGF5IjoiIn0sInBvcnRyYWl0X21heF93aWR0aCI6MTAxOCwicG9ydHJhaXRfbWluX3dpZHRoIjo3Njh9" custom_title="Stay Connected" block_template_id="td_block_template_8" f_header_font_family="712" f_header_font_transform="uppercase" f_header_font_weight="500" f_header_font_size="17" border_color="#dd3333"]
- Advertisement -spot_img

Latest Articles