Skip to content

Installation

RakomiSDK ships exclusively via Swift Package Manager — there is no CocoaPods podspec and no Carthage support.

  1. File → Add Package Dependencies…

  2. Enter the repository URL:

    https://github.com/rakomidev/rakomi-swift
  3. Choose a version rule (Xcode defaults to “Up to Next Major Version”).

  4. Add the RakomiSDK library product to your app target.

If your app is itself a Swift package, or you prefer to edit the manifest directly:

5.10
import PackageDescription
let package = Package(
name: "YourApp",
dependencies: [
.package(url: "https://github.com/rakomidev/rakomi-swift", from: "0.1.0"),
],
targets: [
.target(
name: "YourApp",
dependencies: [
.product(name: "RakomiSDK", package: "rakomi-swift"),
]
),
]
)

Tagged releases use the namespace sdk-swift/vX.Y.Z.

  • Swift tools version 5.10 or later.
  • Deployment target: iOS 16 / macOS 13 / watchOS 9 / tvOS 16 / visionOS 1 at minimum — see Platform support for what each platform can actually do (watchOS links the package but has no interactive sign-in). The pre-built SwiftUI views need a higher floor (iOS 17 / macOS 14 / watchOS 10 / tvOS 17 / visionOS 1).
  • Zero transitive runtime dependencies — nothing else is pulled into your app’s dependency graph. (Test-only dependencies used by the SDK’s own test suite are not part of your app’s build.)

iOS / macOS / visionOS — register your redirect URL scheme

Section titled “iOS / macOS / visionOS — register your redirect URL scheme”

The OAuth callback on iOS, macOS, and visionOS is delivered through a custom URL scheme, so your app must declare one. In Info.plist:

<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array><string>myapp</string></array>
</dict>
</array>

Use a scheme unique to your app’s bundle identifier — a colliding scheme on a device with multiple apps installed is a scheme-hijack risk. Pass the matching redirectURI when constructing RakomiAuthConfiguration. Universal Links / Associated Domains support is planned and not available yet — until then, the custom-scheme approach above is what to use.

Enable the com.apple.developer.applesignin capability for your target in your Apple Developer account, then add the corresponding entitlement in Xcode’s Signing & Capabilities tab. The RakomiAppleSignInButton SwiftUI view (see Authentication) wraps Apple’s native SignInWithAppleButton.

Declare com.apple.security.network.client in your app’s .entitlements file so the sandboxed app can reach the Rakomi API.

tvOS does not use a redirect URL scheme at all — it authenticates via the OAuth device authorization grant (RFC 8628) instead, which requires no URL scheme registration. See Authentication for the flow.