Skip to content

Commit

Permalink
Remove fatalError and replace with print
Browse files Browse the repository at this point in the history
  • Loading branch information
tapashmajumder committed Oct 21, 2021
1 parent 860806d commit 6854b7a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sample-apps/swiftui-sample-app/swiftui-sample-app/MainApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SwiftUI
struct MainApp: App {
@UIApplicationDelegateAdaptor
private var appDelegate: AppDelegate

var body: some Scene {
WindowGroup {
ContentView()
Expand All @@ -18,7 +18,7 @@ class AppDelegate: NSObject, UIApplicationDelegate {
NotificationsHelper.shared.setupNotifications()

IterableHelper.initialize(launchOptions: launchOptions)

return true
}

Expand All @@ -29,16 +29,16 @@ class AppDelegate: NSObject, UIApplicationDelegate {
}

func application(_: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
IterableHelper.register(token: deviceToken)
IterableHelper.register(token: deviceToken)
}

func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
fatalError()
print("Failed to register token: \(error.localizedDescription)")
}

func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
guard let url = userActivity.webpageURL else {
return false
return false
}

return IterableHelper.handle(universalLink: url)
Expand Down

0 comments on commit 6854b7a

Please sign in to comment.