Native iOS SDK for embedding SecondStreet promotions inside any iOS app — no browser takeover.
Supports iOS 13+ · Swift · Swift Package Manager
File → Add Package Dependencies
→ paste: https://github.com/secondstreet/ss-ios-sdk
→ Add Package
dependencies: [
.package(url: "https://github.com/secondstreet/ss-ios-sdk", from: "1.0.0")
]import SecondStreetSDK// Full screen
PromotionKit.show(promoId: "your-promo-id", from: self)
// 90% bottom sheet
PromotionKit.show(
promoId: "your-promo-id",
from: self,
heightPercent: 90
)let promoView = PromotionKit.inline(promoId: "your-promo-id")
stackView.addArrangedSubview(promoView)PromotionKit.attach(
promoId: "your-promo-id",
to: self,
icon: "🎁",
label: "Win a Prize"
)PromotionKit.show(
promoId: "your-promo-id",
from: self,
userId: currentUser.id,
token: currentUser.authToken,
delegate: self
)
extension MyViewController: PromotionDelegate {
func promotionDidComplete(promoId: String, reward: [String: Any]?) {
let coupon = reward?["couponCode"] as? String
showRewardBanner(coupon: coupon)
}
func promotionDidClose(promoId: String) {
resumeVideo()
}
}| Parameter | Type | Default | Description |
|---|---|---|---|
promoId |
String | required | Your promotion ID |
userId |
String? | nil | Optional user ID |
token |
String? | nil | Optional auth token |
baseUrl |
String | promos.secondstreet.com | Your platform base URL |
heightPercent |
Int | 100 | Screen height % for modal |
- iOS 13.0+
- Swift 5.5+
- Xcode 13+