반응형
1. 받는쪽 셋팅
1. URL Type 정의
2. URL 체크
- AppDelegate 사용시
포그라운드
funcapplication(_app:UIApplication,openurl:URL,options: [UIApplication.OpenURLOptionsKey:Any] = [:]) ->Bool { } 사용
NotRunning 상태
link: launchOptions?[UIApplication.LaunchOptionsKey.url] as? URL
push: userInfo = launchOptions?[.remoteNotification] as? [AnyHashable: Any]
- SceneDelegate 사용시
포그라운드
NotRunning 상태
* host는 어떤 목적으로 들어왔는지 구분할때 쓰는데 여기서는 무시해주세요.
2. 보내는 쪽 셋팅
1. info plist
info plist에 보낼 App의 URL Scheme을 추가해주세요.
LSApplicationQueriesSchemes or Queried URL Schemes
2. canOpenUrl 사용
버튼 클릭 이벤트로 진행
이상입니다.
반응형
'Swift' 카테고리의 다른 글
iOS 페이스북 로그인 (0) | 2022.02.26 |
---|---|
iOS 네이버 로그인 (0) | 2022.02.26 |
iOS 카카오 로그인 (0) | 2022.02.26 |
FCM, APNS 연동 방법 (3) | 2022.02.25 |
Firebase Dynamic Link (0) | 2022.02.25 |