Closed jbatra-umeey closed 1 year ago
Hi @jbatra-umeey,
gen_static_xcframework
is not meant to be run locally, and is currently unused and needs to be updated. May I ask what's your use case for this?
@agustinona , I have an older project which is still using .xcframework and we do not plan to move to SPM anytime soon. Hence, to maintain consistency, we want to use a .xcframework of SplitIO
I also tried a couple of other options
https://github.com/darrarski/xcframework-maker https://github.com/mstfy/spm-to-xcframework
Here, I get an issue with JFBCrypt
"No such Module"
@agustinona Can you please suggest the right way to generate .xcframework
of SplitIO
I am having the same issue, if I add Split via Cocoapods, no problem, but our SDK needs to also needs .xcframework and in this case I get the same error: JFBCrypt "No such Module" that @jbatra-umeey is having. This is blocking the release of our SDK, is there a workaround? A bit more background: when I integrate your SDK either via SPM or cocoapods all works fine even in the example app we have inside the SDK project. Once I build the .Xcframework of my library, if I try to integrate it into a third party app via cocoapods, adding my lib + split all works fine but when I add the framework manually as described here: https://www.simpleswiftguide.com/how-to-add-xcframework-to-xcode-project/, the build fails and then even if I add Split with SPM, I still get the error with JFBCrypt
@valllllll2000 adding another useful link https://mustafa-ysf.medium.com/creating-xcframework-from-swift-package-e8af6f44501f. Try to follow these steps and see if you can generate the framework
@agustinona I think instead of using JFBCrypt
https://github.com/jayfuerstenberg/JFCommon/issues?q=swift (pretty old repo)
We can consider using https://github.com/felipeflorencio/BCryptSwift
@valllllll2000 , I was able to generate the .xcframework
. Attaching it for your reference.
Few pre-requisites:
.xcframework
of Swiftier instead of SPM@jbatra-umeey thanks, that's really helpful unfortunately it does not work, the commands in that tutorial do not work for me.
How exactly did you replace JFBCrypt by https://github.com/360Learning/BcryptSwift, did you use cocoapods or added the files by hand. I tried to add them by hand but it does not work as the naming is different.
Also what do you mean by .xcframework of swiftier instead of SPM? you mean adding the swiftier dependency using also and .xcframework?
I tried using your xcframework just to check if it would work for my project but it doesn't work as my other framework, the one that needs the Split dependency, was built with a later swift version.
@valllllll2000 , I have attached the updated source files with swift support of JFBCrypt
.
You may skip the .xcframework
version of Swiftier
./spm-to-xcframework YourPackageName --path path_to_your_package --output path_to_output
thanks @jbatra-umeey that was really helpful! I ended up just adding the code to my project to avoid having to deal with 2 frameworks but your project really helped me to understand which classes to keep and which ones to not and how to replace the JBCrypt by the newer swift library
Hi @jbatra-umeey and @valllllll2000 ,
I'm sorry I wasn't able to get back to you earlier. We currently do not support XCFramework as a way of distributing our SDK., so it needs to be generated locally as I see you have already done.
We plan to support XCFramework in the future. There is no current timeline for that but you can check the repo's changelogs for its release.
Hi @jbatra-umeey and @valllllll2000 , The attached version of XCFramework is giving "unable to install" error while running my project on device,
What exactly is the script used to generate the XCFramework ?
@jbatra-umeey @valllllll2000 @Kratikavmp
We have released v2.19.1 which should make it easier to generate an xcframework, and have cleaned up the scripts that were causing issues. You can use this script as a starting point to generate the xcframework: https://github.com/splitio/ios-client/blob/2.19.1/scripts/generate_xcframework
@jbatra-umeey @valllllll2000 @Kratikavmp This issue has been inactive for a while now and has been addressed in a recent release, so I'm closing it now.
Hello,
I tried
gen_static_xcframework
script but its failing with the below error