Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

415
Views
How to use Objective-C framework in a Swift written iOS part of a flutter plugin

In a Flutter plugin, I would like to use an Objective-C framework in my iOS part written in swift, and after that using it in a Flutter project that uses Swift as iOS language. After some research about it (I'm not an iOS developer) I find out that what I would like to do is possible by importing the header in the file that act as Bridging header between swift and Objective-C, but the bridging header in the flutter plugin is created automatically if use_frameworks! is defined in the Podfile (as far as I know), and I didn't understand how actually import the header from the Objective-C (I think by defining something in the podspec but I don't know) pod in that. In fact, if I try to import something from the Objective-C pod, XCode complains (and the compiler too) about it by saying that it "doesn't find the module with name <framework name>" or that it can't build Objective-C code. If I try to use the framework in an Objective-C plugin I'm able to use it but only if I comment out use_frameworks! from the project Podfile

At the end, I was wondering if it's possible to use Objective-c external framework in Swift plugin for developing a flutter plugin.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

I suggest you check out starflut package https://pub.dev/packages/starflut. But most likely what you are trying to accomplish has been done more simply for you in another package but if you are totally bent on doing it yourself I think you should try the package

over 4 years ago · Santiago Trujillo Report

0

If it's still a relevant issue for some of developers, here's the possible solution.

In the .podspec file of your plugin paste this string for remote frameworks

Pod::Spec.new do |s|
    ...

    s.dependency 'GoogleWebRTC'
end

Or, for local frameworks, paste these

Pod::Spec.new do |s|
    ...

    s.preserve_paths = 'WebRTC.framework'
    s.xcconfig = { 'OTHER_LDFLAGS' => '-framework WebRTC', 'ENABLE_BITCODE' => 'NO' }
    s.vendored_frameworks = 'WebRTC.framework'
end
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!