iOS Question How to include xcframework

Biswajit

Active Member
Licensed User
Longtime User
To include a third party framework we can use <lib_name>.framework.3

But when I'm using .3 for xcframework, like <lib_name>.xcframework.3 its showing framework not found.
But this same thing is working when I'm compiling a library from B4i.

B4X:
Binary/B4i\ Example
ld: library not found for -lnanopb.xcframework.3
clang: error: linker command failed with exit code 1 (use -v to see invocation)

For example here I'm attaching a xcframework.
 

Attachments

  • nanopb.xcframework.zip
    153.6 KB · Views: 208
Last edited:

Biswajit

Active Member
Licensed User
Longtime User
Extract the internal framework (ios-armv7_arm64) and use it instead.
Yes unfortunately this is the only way I found. When I'm building the app for Real device ios-armv7_arm64 is working fine. But its not working for Simulator. For Simulator I am replacing that framework with ios-i386_x86_64-simulator.

So basically every time I have to replace the framework with the one I need for building the app.

But how nanopb.xcframework.3 is working while compiling a library but not for normal builds?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
But how nanopb.xcframework.3 is working while compiling a library but not for normal builds?
The IDE doesn't know how to handle xcframeworks. It is probably not needed for the library compilation.

So basically every time I have to replace the framework with the one I need for building the app.
Download the firebase frameworks. I'm pretty sure that you will find this framework there with all the required binaries.
 
Upvote 0

Biswajit

Active Member
Licensed User
Longtime User
The IDE doesn't know how to handle xcframeworks. It is probably not needed for the library compilation.
Download the firebase frameworks. I'm pretty sure that you will find this framework there with all the required binaries.
I have tried with those but the app is crashing. The latest google AdMob requires three frameworks that has xcframework extension.
https://developers.google.com/admob/ios/download
  1. GoogleUtilities
  2. PromisesObjC
  3. nanopb
I need the latest AdMob for GADFullScreenContentDelegate which is not available in the AdMob version available here.
 
Upvote 0
Top