This is the official BLOCKv SDK. It allows you to easily build your own Vatom Viewer app, or integrate your own apps into the BLOCKv platform.
- iOS 11.0+
- Xcode 11.4+
- Swift 5.2+
Simply add the package dependency to your Package.swift:
dependencies: [
.package(url: "https://github.com/BLOCKvIO/ios-sdk", from: "4.0.0"),
]
and specify "BLOCKv" as a dependency in the appropriate targets.
To install, simply add the following line to your .podfile:
pod 'BLOCKv', => '4.0.0'
Within the AppDelegate
be sure to set the App ID.
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Set app id
BLOCKv.configure(appID: "your-app-id")
// Check logged in state
if BLOCKv.isLoggedIn {
// show interesting ui
} else {
// show authentication ui
}
// Handle user re-authentication
BLOCKv.onLogout = {
// show authentication ui
}
return true
}
}
The sample app lets you try out the BLOCKv SDK. It's a great place to start if you're getting up to speed on the platform. It offers the following features:
- Authentication (registration & login)
- Profile management
- Fetching the user's inventory of Vatoms
- Fetching individual Vatoms
- Searching for Vatoms on the BLOCKv platform
- Responding to Web socket events
- Displaying Vatoms in a
UICollectionView
- Visually representing Vatoms using faces
To run the example project, clone the repo, and run pod install
from the Example directory first.
The SDK has two logical modules: Core and Face. The responsibilities are as follows:
- API integration
- Provides platform endpoints with a strongly typed API.
- User token management
- Handles platform authentication.
- Web socket integration
- Simplified layer for interacting with the websocket.
- Data Pool
- Vends 'regions' which monitor a collection of Vatoms. Enables real-time synchronization for some regions.
- Face view infrastructure
- Embedded face views e.g.
ImageFaceView
- Convenience classes to assist in displaying Vatoms e.g.
VatomView
This SDK adheres to semantic versioning.
If you believe you have identified a security vulnerability with BLOCKv, you should report it as soon as possible via email to support@blockv.io. Please do not post it to a public issue tracker.
BLOCKv is available under the BLOCKv AG license. See the LICENSE file for more info.