2016-03-21 12 views
0

と呼ば得ていない私はユーバーを持つユーザーを認証し、でそこに実装され、いくつかのAPIメソッドを呼び出すためのObjective C Uberkitライブラリで働いている私のアプリはiOSの9UberKitアプリケーション:OpenURLを:sourceApplicationは

用にコンパイルされた私は正常に統合しました。 SDKとUberKitは、oauthフロー用のSafariを開いてユーザーを認証します。ただし、Uberからの認証コードを使用してリダイレクトURLを呼び出した後、サファリが停止します。

AppDelegateのapplication:openURL:sourceApplication:annotationメソッドが呼び出されないようです。以下は上記の方法が私のAppDelegateでどのように見えるかです。

- (BOOL) application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation 
{ 
    NSLog(@"Not Called"); 
    if([[UberKit sharedInstance] handleLoginRedirectFromUrl:url sourceApplication:sourceApplication]) 
    { 
     return YES; 
    } 
    else 
    { 
     return NO; 
    } 
} 

- (BOOL)application:(UIApplication *)app 
     openURL:(NSURL *)url 
     options:(NSDictionary<NSString *,id> *)options { 
     NSLog(@"URL scheme:%@", [url scheme]); 

     if([[UberKit sharedInstance] handleLoginRedirectFromUrl:url sourceApplication:[url scheme]]) 
     { 
     return YES; 
     } 
     return NO; 
} 

私のInfo.plistファイルの関連部分を以下に示します。

<key>CFBundleURLTypes</key> 
<array> 
    <dict> 
     <key>CFBundleTypeRole</key> 
     <string>Editor</string> 
     <key>CFBundleURLName</key> 
     <string>com.go.UberChat</string> 
     <key>CFBundleURLSchemes</key> 
     <array> 
      <string>uberkit</string> 
     </array> 
    </dict> 
</array> 
<key>CFBundleVersion</key> 
<string>1</string> 
<key>LSRequiresIPhoneOS</key> 
<true/> 
<key>UILaunchStoryboardName</key> 
<string>LaunchScreen</string> 
<key>UIMainStoryboardFile</key> 
<string>Main</string> 
<key>LSApplicationQueriesSchemes</key> 
<array> 
    <string>uber</string> 
    <string>https://www.example.com</string> 
</array> 
<key>NSAppTransportSecurity</key> 
<dict> 
    <!--Include to allow all connections --> 
    <key>NSAllowsArbitraryLoads</key> 
    <true/> 
</dict> 

https://www.example.comサファリがhttps://www.example.com/?code=3iSwJyxezGi41zliUaNj5SyXYZXYZでスタックしているとのOAuth流れの残りの部分は場所を取ることができるように私のアプリに戻っていないので、私のリダイレクトURLです。

紛失しているものはありますか?私はiOS 8のために私のアプリをコンパイルしようとしました。私はAppDelegateでも- (BOOL)application:(UIApplication *)app openURL:(NSURL *)urlメソッドを呼び出すことを試みましたが、運がまだありません。

Enabled Associated Domains

+0

あなたのアプリID –

+0

のドメインが有効であることを確認していますかどうかはわかりません。ご理解ください。 – nmvictor

+0

なぜ呼び出されていないのか分かりましたか?私も同様の問題を抱えていますが、iOS 8(iOS 9は期待通りに動作します)にのみ影響します。 –

答えて

0

私の問題SDKはapplication:openURL:sourceApplication:annotationが呼び出させていないため、問題であってもよいです。私はGoogle/SignInにも同様の問題がありました。私の解決策は、ポッドをpod 'Google/SignIn', '~> 2.0'に設定することでした。そしてそれは私の問題を解決しました。

関連する問題