commit | 3039cd0f7cb191d82919b0d5c951184a98d7e935 | [log] [tgz] |
---|---|---|
author | Aaron Zinman <aaron@azinman.com> | Tue Jun 21 18:02:30 2016 -0700 |
committer | Aaron Zinman <aaron@azinman.com> | Tue Jun 21 18:02:30 2016 -0700 |
tree | ab75a800ccf4509fdad3fac23cd3b27f39e2fa1f | |
parent | 46350cd4e5c9d3ed308cd68946f9674f52c2e0f4 [diff] |
swift: Refactor login for new configure/login flow. Updates the configure/login flow to match the updates to the CGO API, which fixes the blessings issue that was preventing unit tests in from passing. Also has a few other bug fixes listed below: - Checks if we're logged in at configure, and if so then starts serving. - Refactors post-login logic (creating default db, create-and-join, etc) to a central function that is only called once we have blessings. - Makes sure the HLAPI's queue and LLAPI's queue are the same. - Updates unit tests in SyncbaseCore to use new login flow. - Makes database/collection/syncgroup adopt CustomStringConvertible - Filter out internal userdata_syncgroup from listed collections - Rename erroneous syncbaseId to syncgroupId Change-Id: I60976427db035432dddae6015cfcbfdfe4f6b72a
#Vanadium & Syncbase Swift Demos
The Vanadium/Syncbase Swift implementation is very iOS/OS X specific at this point, especially since the open source release Linux is very early as of this writing (April 2016).
Currently the following are included in the iOS demo:
“Hello world” RPC with a hard coded endpoint (discovery coming soon)
Google Sign-In OAuth used to obtain a default blessing via dev.v.io. Currently broken until we update the security APIs for Syncbase.
Bluetooth discovery/advertisement tests (not using Vanadium itself, but a test hardness to validate BLE compatibility across hardware)
Requires Swift 2.2 which is available in Xcode 7.3. Any earlier versions won't compile, and a later version of Swift will also likely cause a problem as well.
Both the demo and the libraries target iOS 9.0+. We do not support 32-bit ARM, so therefore iOS 9.0 and ARM64 are the required minimum platforms.
The project is split into the following frameworks:
VanadiumCore.framework - This is the Swift bridge to the V23 runtime. It is intended for full Vanadium development, such as performing RPC and manual discovery management.
SyncbaseCore.framework - This is the simple & high-level framework that abstracts away VanadiumCore and exposes a direct Swift API for Syncbase. This is a lower-level building block for Syncbase.
Syncbase.framework - (COMING). We intend most apps will only need to work with APIs in Syncbase.framework for the near-future.
Eventually we will also distribute via Cocoapods, but until then it is required that a checkout of Vanadium is done correctly across multiple-repositories as Demo/VanadiumCore/Syncbase rely on code in the third-party repo separate from this swift-repo.
The repo does not include any of the built CGO libraries or header files. These must be built before the demo may be compiled and run using the following instructions:
In order to compile the CGO library for the iOS platform, we need to install a cross-compiling version of go first. It‘s important to do this for all supported platforms even if you’re only planning on compiling for the simulator, because our Xcode project expects to see files for all architectures (they can be kept out of sync while developing, however).
Install the 64-bit simulator Go profile:
jiri profile install -target amd64-ios v23:base
Install the 64-bit device Go profile:
jiri profile install -target arm64-ios v23:base
For simulator only (these are equivalent)
jiri swift build -project SyncbaseCore cgo # or jiri swift build -project SyncbaseCore -target amd64 cgo
For device:
jiri swift build -project SyncbaseCore -target arm64 cgo
For both:
jiri swift build -project SyncbaseCore -target all cgo
You may specify SyncbaseCore or VanadiumCore with the -project flags. Each are required to run their respective demos.