Skip to content

Adding xcframework as dependency to native modules #292

Answered by dnelsonlivecurrence
Kahan asked this question in Q&A
Discussion options

You must be logged in to vote

iOS

I was able to add the following to my podspec to get the native module I was working with imported:

For the XCFramework:
s.vendored_frameworks = 'ios/MiSnapSDK/*.{xcframework}'

For the needed resources (in this case there were multiple language resources and I had to make sure to import only English):
s.resources = "ios/MiSnapSDK/MiSnapUX/**/*.{png,jpeg,jpg,storyboard,xib,xcassets}","ios/MiSnapSDK/MiSnapUX/UX_Resources/en.lproj/MiSnapSDKLocalizable.strings"

And I modified the source files to only import the bridge code, and the .h / .m files that weren't imported with the vendor frameworks:
s.source_files = "ios/*.{h,m,mm}","ios/MiSnapSDK/MiSnapUX/UX_Files/*.{h,m,mm}","ios/MiSnapSDK/M…

Replies: 7 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@atlj
Comment options

atlj Aug 24, 2023
Maintainer

Answer selected by atlj
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
7 participants
Converted from issue

This discussion was converted from issue #255 on October 14, 2022 15:32.