웹사이트를 클릭하면 앱으로 이동하던 기능이 갑자기 막혔다!
원인 : 이전에 사용하던 패키지가 더이상 안되서 발생
3년전에 업데이트된 패키지를 사용중이긴했지..
https://pub.dev/packages/uni_links
uni_links | Flutter package
Flutter plugin for accepting incoming links - App/Deep Links (Android), Universal Links and Custom URL schemes (iOS).
pub.dev
얘 대신 대체된 https://pub.dev/packages/app_links를 사용함
일단 안드로이드는 해결됨
안드로이드는 딥링크 assetlinks.json 파일이 오류가 나서 연결이 안됐다
수정하니까 바로 해결됨!
하지만 아이폰은 해결이 안됨
1. 유니버셜 공식문서를 살펴보자
info.plist파일 아래 항목 체크 하면안됨
충돌해서 해당 항목 삭제함 그랬더니 정상적으로 됨
공식문서 참고
The FlutterDeepLinkingEnabled property enables Flutter's default deeplink handler. If you use a third-party plugin, such as uni_links, setting this property breaks the third-party plugin. Skip this step if you prefer to use a third-party plugin.
2. AASA 파일 validation 체크하기
정상 (아래링크를 통해 체크 가능)
https://branch.io/resources/aasa-validator/
3. aasa에 webcredentials 추가해서 해결
"webcredentials": { "apps": [ "ABCDE12345.com.example.app" ] },
결론 : 문서를 잘 읽자
1 참고 공식 문서 : https://docs.flutter.dev/cookbook/navigation/set-up-universal-links#add-support-for-go_router
2 참고 : https://velog.io/@dmswls5115/Flutter-Universal-Link-%EC%A0%81%EC%9A%A9%EA%B8%B0-Deep-Link
3 참고 : https://developer.apple.com/documentation/xcode/supporting-associated-domains
'Flutter' 카테고리의 다른 글
Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module'firebase_messaging.FLTFirebaseMessagingPlugin': (3) | 2024.10.27 |
---|---|
플러터에서 TextFormField 하단 커서가 아래에서 한참 떨어지는 오류 (0) | 2024.09.29 |
flutter 3.22 migration android 오류 (0) | 2024.06.24 |
플러터 토스트 메시지 패키지 Flutter toast (1) | 2024.02.25 |
플러터 3.19.0 업데이트 기능 소개 (0) | 2024.02.17 |