Registering a Test Device
Add EZ-Push URL Scheme
You need to add a URL Type to your Info.plist. The URL Scheme must be ezpush, you can optionally specifiy a the bundle identifier of your app in the identifier field.
SwiftUI
min. Requirement: iOS 16
Apply the modifier .ezPushRegisterTestDeviceAlert() to your view, after you setup EZ-Push
import EZPush
var body: some View {
VStack {
Text("Hello World")
}
.ezPushRegisterTestDeviceAlert()
}
UIKit
You need to forward the entire deeplink from the handler of your AppDelegate (or Scene Delegate) to the Base ViewController of your App. There, create an object of type EZPushRegisterTestDeviceUI and call the registerTestDevice method, after receiving the deeplink.
import EZPush
class MyViewController: UIViewController {
var registerTestDeviceHelper = EZPushRegisterTestDeviceUI()
...
registerTestDeviceHelper.registerTestDevice(self, deeplink: deeplink) { success , _ in
if !success {
print("Failed to register Test Device")
}
}