The Lens SDK allows you to easily integrate a Lens Protocol experience into your iOS or macOS app.
- From the File menu, select Add Packages….
- Enter package repository URL:
https://github.com/kevinwo/lens-ios-sdk
- Confirm the branch is set to
main
(first release TBD), and click Add Package. - After the package downloads, verify the target in your project you would like to add the SDK to, and then click Add Package.
If you want to use Lens in any other project that uses SwiftPM, add the package as a dependency in Package.swift
:
dependencies: [
.package(
url: "https://github.com/kevinwo/lens-ios-sdk",
.branch("main")
),
]
After installing the SDK, on initializing your app or library, configure the Lens client with your app name and bundle identifier (optional). For example:
LensClient.configure(appName: "MyApp")
The app name is currently used when generating a sign-in message for authentication. The bundle identifier is used when configuring the Keychain namespace for storing credentials.
After installing the SDK, from the Product menu in your project in Xcode, click Build Documentation. After the documentation finishes building and the documentation viewer appears, click Lens in the sidebar to browse.
After the initial release is published to the Swift Package Index, documentation will be available on the web, and a link will be included here.
There will likely be a number pre-release versions published, but my hope is to start accepting contributions in late May/early June, and will publish guidelines here! Until then, feel free to check out the progress.
The source code to Lens and the example app is available under the MIT license. See the LICENSE file for more information.
Although technically allowed by the licensing terms, please do not just copy pasta the example app's code and submit your own version to the App Store.
I'm looking for interesting opportunities around Web3 and NFTs. If you like the way I write code, please feel free to get in touch!
Kevin Wolkober