Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of change
Objective
This fixes a few build warnings when integrating the Swift SDK package within an app:
It looks like Rust probably uses the latest iOS deployment target/min iOS version if not specified. I added
IPHONEOS_DEPLOYMENT_TARGET="13.0"
to set this to iOS 13, which matches the version in Package.swift.https://github.com/bitwarden/sdk/blob/c707fc9ff9a241b73ef7471f90a3d0b0e68c6e33/languages/swift/Package.swift#L9
We need to link the SDK within an iOS app extension to use for auto fill.
RUSTFLAGS="-C link-arg=-Wl,-application_extension"
enables a linker flag which specifies that this code is being linked for use in an extension. This prevents using some UIKit APIs that don't exist in extensions but shouldn't have any negative effects on the SDK.There's a bunch of build warnings from the SDK. These all appear to be around how Rust escapes argument parameters in the generated code, so it seems safe enough to ignore these and add the
-suppress-warnings
Swift flag. Xcode does a pretty good job of hiding warnings from SPM packages, but they still show up in build logs so it would be nice to hide these.Code changes