uber / uber-ios-sdk

Uber iOS SDK (beta)
https://developer.uber.com/docs
MIT License
376 stars 125 forks source link

Uber native login flagging error #100

Closed MukeshMuteja786 closed 8 years ago

MukeshMuteja786 commented 8 years ago

I am currently running the example codes provided by Uber SDK (Swift version).

I encounter a problem when I clicked on the Native Login After setting up the app in Uber and also copied the Client ID to the info.plist, I counter the error below:

When I click at the Login Button, Uber App open and flag a UIAlert with a message of "There seems to be a problem connecting to Uber. Please go back to AppName and try again". What could be the problem? and not redirecting to my application

Btw, I fill in the redirect URL as "myapp://oauth/callback" on both the dashboard and the app info.plist.

Anything I miss out during the setup of this example?

Thanks.

jbrophy17 commented 8 years ago

Hi @MukeshMuteja786 sorry to hear you're having trouble. Not redirecting back to your app sounds like there could be an issue with how you have your redirect URL set up. I see that you added the url to your dashboard and the info.plist. Did you also add "myapp" as one of the URL types recognized by your app? You can either do this via the Info tab of your application target or by adding the following to your info.plist:

    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>myapp</string>
            </array>
        </dict>
    </array>

You also need to make sure that you have added your app's Bundle ID to the dashboard, in the App Signature field.

MukeshMuteja786 commented 8 years ago

Firstly Thank you for support and Faster Reponse ... Now App Redirecting Back but with error Error Domain=com.uber.rides-ios-sdk.ridesAuthenticationError Code=18 "The Redirect URI provided did not match what was expected." UserInfo={NSLocalizedDescription=The Redirect URI provided did not match what was expected.}

jbrophy17 commented 8 years ago

That error indicates that the redirect you specified in your info.plist doesn't match exactly what you have listed on the developer dashboard.

If on the dashboard I am using "exampleapp://connect" then for the callback in my info.plist I would also have "exampleapp://connect". And in my url types I would only need the scheme, "exampleapp"

On Wed, Aug 31, 2016 at 9:17 PM MukeshMuteja786 notifications@github.com wrote:

Firstly Thank you for support and Faster Reponse ... Now App Redirecting Back but with error Error Domain=com.uber.rides-ios-sdk.ridesAuthenticationError Code=18 "The Redirect URI provided did not match what was expected." UserInfo={NSLocalizedDescription=The Redirect URI provided did not match what was expected.}

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/uber/rides-ios-sdk/issues/100#issuecomment-243971837, or mute the thread https://github.com/notifications/unsubscribe-auth/AFPJ4Esg09TiqpuNjbXPC8EpNokYNnWxks5qllH1gaJpZM4JxUwf .

MukeshMuteja786 commented 8 years ago

Thank you @jbrophy17 for your support and Faster response

jbrophy17 commented 8 years ago

no problem :)