Exposes a new, Swift 5.5 future-based Native iOS SDK for Waas.
Rebases the existing Waas react-native package on top of this.
Layout
ios/swift - The code-home of WaasSdk.podspec, the native iOS sdk.
ios/react-native - The wrapper library for RN.
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:
Layout
ios/swift
- The code-home ofWaasSdk.podspec
, the native iOS sdk.ios/react-native
- The wrapper library for RN.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)