BundlBe
is a lightweight iOS SDK for subscription activation and paywall management.
It provides three main functions:
- Login — authenticate and verify subscription
- Logout — clear session and reset state
- Paywall Suppressor — check whether paywall should be hidden
Add the package in your Package.swift
:
dependencies: [
.package(url: "https://github.com/mpiatrou/BundlBe-SDK", from: "1.0")
]
Or in Xcode:
File
→ Add Packages...
→ paste repository URL → Add Package
.
Add to your Podfile
:
pod 'BundlBe', '~> 1.0'
Then run:
pod install
Use when a user enters an activation code and when the app launches (to check subscription status).
import BundlBe
BundlBe.login(
code: "USER_CODE",
appID: "APP_ID",
deviceID: "DEVICE_ID"
) { result in
switch result {
case .success(let response):
print("Login success:", response)
if BundlBe.isPaywallSuppressed {
print("Paywall hidden")
} else {
print("Paywall visible")
}
case .failure(let error):
print("Login error:", error.localizedDescription)
}
}
Calls /logout
and resets suppress state.
BundlBe.logout(
code: "USER_CODE",
appID: "APP_ID",
deviceID: "DEVICE_ID"
) { result in
switch result {
case .success:
print("Logged out")
case .failure(let error):
print("Logout error:", error.localizedDescription)
}
}
Use to check UI state:
if BundlBe.isPaywallSuppressed {
// show content without paywall
} else {
// show paywall
}