yoonjaepark / flutter_naver_login

A Flutter plugin for Naver Sign In.
BSD 2-Clause "Simplified" License
47 stars 70 forks source link

xcode13 appDelegate.swift 리턴 메서드 변경 #55

Open jinsyu opened 2 years ago

jinsyu commented 2 years ago

@objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { return super.application(application, didFinishLaunchingWithOptions: launchOptions) } }

문서에 나온 url 파라미터가 없습니다. 어떻게 집어 넣어야 할까요? 로그인 하고 놀아온 앱에서 아무런 정보도 받아오고 있지 않습니다.

hottestchilipepper commented 1 year ago

파일 최상단에 import NaverThirdPartyLogin 넣으시고, class AppDelegate 내부에, 원래 있는 override func application 은 그대로 두시고, 아래에다가

override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
    var applicationResult = false
    if (!applicationResult) {
       applicationResult = NaverThirdPartyLoginConnection.getSharedInstance().application(app, open: url, options: options)
    }
    // if you use other application url process, please add code here.

    if (!applicationResult) {
       applicationResult = super.application(app, open: url, options: options)
    }
    return applicationResult
}

추가하시면 됩니다