End-to-end solution for building, managing and maintaining profitable mobile apps offering in-app purchases.
We have published iOS Kids SDK for kids category apps who want to use Deepwall.
Deepwall Kids SDK does not collect IDFA from user devices and excludes Adjust and AppsFlyer integrations, and ATT prompt support since Apple has specific requirements for kids category apps.
CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website.
DeepWall is available through CocoaPods. To install it, add the following lines to your Podfile
.
- Add DeepWall pod.
use_frameworks!
pod 'DeepWallKids'
- Run
pod install
orpod update
. - Then, you could use DeepWall by adding
import DeepWallKids
to your project files.
import DeepWallKids
let yourApiKey = "{YOUR_API_KEY}"
let environment: DeepWallKidsEnvironment = .sandbox
DeepWallKids.initialize(apiKey: yourApiKey, environment: environment)
Replace {YOUR_API_KEY}
with your app token. You can find this key in your dashboard.
Depending on whether you build your app for testing or for production, you must set environment with one of these values:
let environment: DeepWallKidsEnvironment = .sandbox
let environment: DeepWallKidsEnvironment = .production
Important:
This value should be set to
.sandbox
only during testing your application. Make sure to set the environment to.production
just before you publish the app.
We use this environment to distinguish between real traffic and test traffic from test devices. It is very important that you keep this value meaningful at all times!
DeepWall need to know following user properties for targeting.
- UUID:
String
- Unique identifer for specifying user profile or device.
- Country:
DeepWallCountry
- Two-letter country code -- ISO 3166-1 alpha-2
- Usage:
DeepWallCountryManager.getCountry(by: "TR") // TURKEY
- Language:
DeepWallLanguage
- Two-letter language code -- ISO 639-1
- Usage:
DeepWallLanguageManager.getLanguage(by: "tr") // TURKISH
- Environment Style:
DeepWallEnvironmentStyle
- Environment style for paywall appearance.
- Values:
automatic
: Uses system appearance (Default)light
: Light appearancedark
: Dark appearance
Important:
You must call
setUserProperties
method before requesting any paywall.
let userProperties = DeepWallKidsUserProperties(uuid: uuid, country: country, language: language)
DeepWallKids.shared.setUserProperties(userProperties)
You could update the following user properties with DeepWallKids.shared.updateUserProperties()
method.
func updateUserProperties(country: DeepWallCountry? = nil,
language: DeepWallLanguage? = nil,
environmentStyle: DeepWallEnvironmentStyle? = nil)
For pages to be displayed successfully, it is strongly recommended to wait for DeepWallKids.shared.readyStatus
before sending a page request.
You could use requestPaywall
method with action
parameter for showing paywalls.
// SomeUIViewController.swift
DeepWallKids.shared.requestPaywall(action: "{ACTION_KEY}", in: self)
Replace {ACTION_KEY}
with your related action key. You can find or create action keys in your dashboard.
You could also use extraData
parameter for sending extra data to paywalls.
// SomeUIViewController.swift
let deepwallExtraData: DeepWallExtraDataType = [
"some": "value"
]
DeepWallKids.shared.requestPaywall(action: "{ACTION_KEY}", in: self, extraData: deepwallExtraData)
You could use closePaywall
method to close paywalls.
DeepWallKids.shared.closePaywall()
DeepWall posts some various events depending on ....
-
deepWallKidsPaywallRequested
- Fired after paywall requested. Useful for displaying loading indicator in your app.
-
deepWallKidsPaywallResponseReceived
- Fired after paywall response received. Useful for hiding loading indicator in your app.
-
deepWallKidsPaywallOpened
- Paywall opened event
- Parameters:
- pageId:
Int
- pageId:
-
deepWallKidsPaywallNotOpened
- Paywall not opened event. Fired on error cases only.
- Parameters:
- pageId:
Int
- pageId:
-
deepWallKidsPaywallActionShowDisabled
- Paywall action show disabled event.
- Parameters:
- pageId:
Int
- pageId:
- Parameters:
- Paywall action show disabled event.
-
deepWallKidsPaywallClosed
- Paywall closed event
- Parameters:
- pageId:
Int
- pageId:
-
deepWallKidsPaywallResponseFailure
- Paywall response failure event
- Parameters:
- errorCode:
String
- reason:
String
- errorCode:
-
deepWallKidsPaywallPurchasingProduct
- Paywall purchasing product event
- Parameters:
- productCode:
String
- productCode:
-
deepWallKidsPaywallPurchaseSuccess
- Purchase success event. Fired after receipt validation if Ploutos service active.
- Parameters:
- type:
PloutosValidationType
- result:
PLPurchaseResponse
- subscriptions:
Array of SubscriptionItem
- products:
Array of ProductItem
- subscriptions:
- type:
-
deepWallKidsPaywallPurchaseFailed
- Purchase failed event
- Parameters:
- productCode:
String
- reason:
String
- errorCode:
String
- isPaymentCancelled:
Bool
- productCode:
-
deepWallKidsPaywallRestoreSuccess
- Restore success event
-
deepWallKidsPaywallRestoreFailed
- Restore failed event
- Parameters:
- reason:
RestoreFailedReason
- .noReceipt
- .failed
- errorCode:
String
- errorText:
String?
- isPaymentCancelled:
Bool
- reason:
-
deepWallKidsPaywallExtraDataReceived
- Extra data received event
- Parameters:
- DeepWallExtraDataType model
First implement DeepWallKidsNotifierDelegate
protocol to your class. Then you could use observeEvents
method for observing events.
DeepWallKids.shared.observeEvents(for: self)
For removing observer, you could use removeObserver
method.
DeepWallKids.shared.removeObserver(for: self)
- iOS 10.0+
- Xcode 11.0+
- Swift 5.0+
- Dark Mode support
- Automatic in app purchase flows