EEYatHo 앱 깎는 이야기

Swift ) 앱 실행방법에 따른 분기 - EEYatHo iOS 본문

iOS, Swift

Swift ) 앱 실행방법에 따른 분기 - EEYatHo iOS

EEYatHo 2021. 8. 9. 16:47
반응형

AppDelegate로 분기한다.

 

  • deepLink
func application(_ application: UIApplication, handleOpen url: URL) -> Bool {
    ...
    let deepLinkUrl = url
    ...
}

 

  • universerLink
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
    ...
    let universalLinkUrl = userActivity.webpageURL
    ...
}

 

  • push
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    ...
    if let launchOpts: NSDictionary = launchOptions as NSDictionary? {
        // some data
    }
    ...
}
Comments