Exposes a new, Swift 5.5 future-based Native iOS SDK for Waas. (iOS 15+, Swift 5.5+)
Rebases the existing Waas react-native package on top of this.
Includes a new, simpler sample app for the new iOS native SDK.
Introduces tests on top of the rewritten iOS SDK.
WARNING
This PR has a few things that can't merge as-is in it.
Critical changes to WaasSdkGo (removing the x86 distro), which caused it to not build on my M2 mac.
Layout
ios/swift - The code-home of WaasSdk.podspec, the native iOS sdk.
ios/swift/Tests - Tests for the native SDK, exposed via the WaasSdk podspec.
ios/swift/WaasSdk/models - Well-typed models on top of the codegenned V1.* types from Golang. These structs are also extended for the native SDK to make certain operations easier (i.e you can call .run() on MPC operations directly, to always use the correct method to run them..)
ios/react-native - The wrapper library for RN.
ios/react-native/Tests - The tests for the RN sdk, exposed via a test scheme on the RN sample app.
Architecture
waas-sdk-react-native (whose name is set to look like a JS package probably), depends on WaasSdk (the native iOS waas pod).
The class names between the two pods are duplicative, for convenience of the reader.
WaasSdk.* uses Combine and Swift futures to perform async operations with the cross-platform Go SDK.
The react-native SDK then rewraps these swift futures using the Operation.swift "bridge" method -- this awaits the future, and passes on either a resolution or rejection to React Native.
Usage
See README.md, but users can directly depend on WaasSdk.podspec from the root of this repo, which will pull in the code from ios/swift. Setup instructions are included.
Testing
Tested all example app scenarios via react-native, all working.
Notes / Feedback on M1 setup
WaasSdkGo.xcframework didn't work out of the box. Had to remove the x86 simulator binaries for the app to build. We should be able to address this by building the multi-arch binary using lipo in a different way.
SSL install also didn't work out-of-the-box, which lead to me using brew install openssl@1.1, and changing my header search paths. May have been something with my machine, but potentially a solution worth noting in the README.
Building with flipper takes forever, especially on a bad connection. Probably good to tell folks that they should build the sample app with NO_FLIPPER=1 pod install (we can maybe change the yarn script for this)
Native iOS SDK
Changelog:
Exposes a new, Swift 5.5 future-based Native iOS SDK for Waas. (iOS 15+, Swift 5.5+)
Rebases the existing Waas react-native package on top of this.
Includes a new, simpler sample app for the new iOS native SDK.
Introduces tests on top of the rewritten iOS SDK.
WARNING
This PR has a few things that can't merge as-is in it.
Layout
ios/swift
- The code-home ofWaasSdk.podspec
, the native iOS sdk.ios/swift/Tests
- Tests for the native SDK, exposed via the WaasSdk podspec.ios/swift/WaasSdk/models
- Well-typed models on top of the codegenned V1.* types from Golang. These structs are also extended for the native SDK to make certain operations easier (i.e you can call.run()
on MPC operations directly, to always use the correct method to run them..)ios/react-native
- The wrapper library for RN.ios/react-native/Tests
- The tests for the RN sdk, exposed via a test scheme on the RN sample app.Architecture
WaasSdk
(the native iOS waas pod).WaasSdk.*
usesCombine
and Swift futures to perform async operations with the cross-platform Go SDK.Operation.swift
"bridge" method -- this awaits the future, and passes on either a resolution or rejection to React Native.Usage
See README.md, but users can directly depend on
WaasSdk.podspec
from the root of this repo, which will pull in the code fromios/swift
. Setup instructions are included.Testing
Notes / Feedback on M1 setup
WaasSdkGo.xcframework
didn't work out of the box. Had to remove the x86 simulator binaries for the app to build. We should be able to address this by building the multi-arch binary usinglipo
in a different way.brew install openssl@1.1
, and changing my header search paths. May have been something with my machine, but potentially a solution worth noting in the README.NO_FLIPPER=1 pod install
(we can maybe change the yarn script for this)