-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failure with BUILD_LIBRARY_FOR_DISTRIBUTION=YES #196
Comments
v2.1.0 is very old, it was released in April 2022. Can you update to 2.6.0 and tell me if this reproduces? |
After updating to v2.6.0 we are getting the following compilation error Here you suggested to change the build setting And regarding the consumption of these APIs we are already importing using the Can you please guide on how to fix this? |
You must change the build setting for swift-crypto to disable You may subsequently link this library into a different library that you own which does have a stable ABI, which is where |
Additionally: are you actually using |
Changing the build setting I had updated this setting for both the targets (Crypto, _CryptoExtras) like below: Also, Btw this error can be seen in a standalone project as well when we try to archive it by running cli command. Anything else that we can try? |
Sorry, how do you reproduce this in a standalone project? |
xcodebuild archive -configuration Release -sdk iphoneos -scheme MySwiftCryptoCheckSDK BUILD_LIBRARY_FOR_DISTRIBUTION=YES SKIP_INSTALL=NO -derivedDataPath ./gen/out -archivePath ./gen/Archive |
Btw the failure is not related to visionOS, it fails for iphoneos as well (havent checked for other destinations) . |
So I believe that |
I noticed the archive commands succeeds when i remove |
Yeah, that setting is overriding your change to the Package. Why can't you change the build setting for the package? |
Renaming the issue to reflect the issue is not related to visionOS |
I did change the build setting for the Crypto and _CryptoExtras in my fork and used it in my code but still got the same error. |
Sorry, I meant to say: why does your project require setting |
Not all the targets in the project require this setting, just two of them. |
Is there any reason you cannot set this setting only for those two? |
@Lukasa can you help me tell how to set the build setting for individual targets?. Should i set this setting in xcode build settings ui and let terminal use the values from there or in command line i have to pass the setting to each target. For the latter case how will the xcodebuild command look like. |
You would set this in the Xcode build settings UI for the specific targets. |
Thanks @Lukasa i will try what you suggested. I also found this when looking for a solution. The archive command succeeds with this change. Will removing @inlineable like in above cause any kind of problem in our code? |
It may lead to worse performance, but that’s it |
Thanks @Lukasa for being patient in answering all the questions i have and for actively replying. The performance degrade youre saying is only during build time or when the code gets used when app is running? Also I tried what you suggested above and it fixes the archive failure problem, the only thing i want to know now is that we have 6 targets in our workspace (framework targets, unit tests, app targets) the setting BUILD_LIBRARY_FOR_DISTRIBUTION=YES is just to be passed to the framework target right?. We distribute xcframework so i guess only having this setting in framework target is enough but want your opinion on it. |
The performance degradation will be while the app is running. And yes, you should only need to pass that value to the framework target. |
Okay Thank you very much @Lukasa 🤝🎉 |
When will the support for visionOS be provided, for both simulator and physical device?
We have a SDK which consumes swift-cryto as a package dependency (v 2.1.0). We are updating our codebase to support the new OS from Apple. The SDK builds for iOS and MacCatalyst on intel and M1 machines.
Right now when i build from cli with command:
xcodebuild -workspace MySDK.xcworkspace -configuration Debug -sdk xrsimulator build -derivedDataPath ./out -scheme MySDK -destination "generic/platform=visionOS Simulator,OS=latest,name=Apple Vision Pro" "ARCHS=\x86_64 \arm64
if fails with the error:
no such module 'CCryptoBoringSSL'
@_implementationOnly import CCryptoBoringSSL
The text was updated successfully, but these errors were encountered: