From a6f3cca703061c229e35aa4245b3d09a0429e6df Mon Sep 17 00:00:00 2001 From: Matt Czech Date: Wed, 13 Sep 2023 10:36:54 -0500 Subject: [PATCH 1/3] Fix Swift build warnings (#231) --- languages/swift/Package.swift | 3 ++- languages/swift/build.sh | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/languages/swift/Package.swift b/languages/swift/Package.swift index 40f8f0afd..817bdce11 100644 --- a/languages/swift/Package.swift +++ b/languages/swift/Package.swift @@ -23,7 +23,8 @@ let package = Package( // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( name: "BitwardenSdk", - dependencies: ["BitwardenFFI"]), + dependencies: ["BitwardenFFI"], + swiftSettings: [.unsafeFlags(["-suppress-warnings"])]), .testTarget( name: "BitwardenSdkTests", dependencies: ["BitwardenSdk"]), diff --git a/languages/swift/build.sh b/languages/swift/build.sh index 655a49ebf..aebe458e3 100755 --- a/languages/swift/build.sh +++ b/languages/swift/build.sh @@ -8,6 +8,8 @@ mkdir tmp mkdir -p tmp/target/universal-ios-sim/release # Build native library +export IPHONEOS_DEPLOYMENT_TARGET="13.0" +export RUSTFLAGS="-C link-arg=-Wl,-application_extension" cargo build --package bitwarden-uniffi --target aarch64-apple-ios-sim --release cargo build --package bitwarden-uniffi --target aarch64-apple-ios --release cargo build --package bitwarden-uniffi --target x86_64-apple-ios --release From 85893a719a6a05e62deb1898d2e5e54e202ea20c Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Wed, 13 Sep 2023 19:18:22 +0200 Subject: [PATCH 2/3] Change cipher notes to be optional (#232) --- crates/bitwarden/src/vault/cipher/cipher.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bitwarden/src/vault/cipher/cipher.rs b/crates/bitwarden/src/vault/cipher/cipher.rs index c32f39c30..49586028d 100644 --- a/crates/bitwarden/src/vault/cipher/cipher.rs +++ b/crates/bitwarden/src/vault/cipher/cipher.rs @@ -44,7 +44,7 @@ pub struct Cipher { pub collection_ids: Vec, pub name: EncString, - pub notes: EncString, + pub notes: Option, pub r#type: CipherType, pub login: Option, @@ -78,7 +78,7 @@ pub struct CipherView { pub collection_ids: Vec, pub name: String, - pub notes: String, + pub notes: Option, pub r#type: CipherType, pub login: Option, From 8cae558e59004eb6d37710319cd1bac88e66c023 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Wed, 13 Sep 2023 20:36:49 +0200 Subject: [PATCH 3/3] Use the same urls for debug and release (#230) --- crates/bitwarden/src/client/client_settings.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/crates/bitwarden/src/client/client_settings.rs b/crates/bitwarden/src/client/client_settings.rs index 74a8080a1..68ef7b3a9 100644 --- a/crates/bitwarden/src/client/client_settings.rs +++ b/crates/bitwarden/src/client/client_settings.rs @@ -34,19 +34,6 @@ pub struct ClientSettings { pub device_type: DeviceType, } -#[cfg(debug_assertions)] -impl Default for ClientSettings { - fn default() -> Self { - Self { - identity_url: "https://localhost:8080/identity".into(), - api_url: "https://localhost:8080/api".into(), - user_agent: "Bitwarden Rust-SDK".into(), - device_type: DeviceType::SDK, - } - } -} - -#[cfg(not(debug_assertions))] impl Default for ClientSettings { fn default() -> Self { Self {