Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-canOpenURL: failed for URL: #247

Open
KrishnaPatell opened this issue Oct 2, 2018 · 0 comments
Open

-canOpenURL: failed for URL: #247

KrishnaPatell opened this issue Oct 2, 2018 · 0 comments

Comments

@KrishnaPatell
Copy link

Hello there,
I've integrate Uber SDK in my Objective C project.
Everything build up is good but when I clicked on my custom button with build parameter to execute deeplink, my console log displayed with the following warning and app is not redirecting to Safari or Uber app.

-canOpenURL: failed for URL: "uber://?action=setPickup&client_id=MocO99_vRc9CnqD1kn8-ygTGIM9VveMu&pickup%5Blatitude%5D=21.222264&pickup%5Blongitude%5D=72.795424&pickup%5Bnickname%5D=Surat&dropoff%5Blatitude%5D=21.20351&dropoff%5Blongitude%5D=72.83923&dropoff%5Bnickname%5D=Padam%20Dungri&user-agent=rides-ios-v1.0-deeplink" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"

My code for implementing this deeplinking feature is as below:

- (IBAction)btnRequestRideClicked:(id)sender { UBSDKRideParameters *rideParameters = [self _buildRideParameters]; UBSDKRequestDeeplink *deeplink = [[UBSDKRequestDeeplink alloc] initWithRideParameters:rideParameters]; [deeplink executeWithCompletion:nil]; }

  • (UBSDKRideParameters *)_buildRideParameters {
    UBSDKRideParametersBuilder *builder = [[UBSDKRideParametersBuilder alloc] init];
    LocationViewModel *model = [GlobalManager locationObject];
    NSString *latitude = [NSString stringWithFormat:@"%@", model.latitude];;
    NSString *longitude = [NSString stringWithFormat:@"%@", model.longitude];

    CLLocation *pickupLocation = [[CLLocation alloc] initWithLatitude:[latitude doubleValue] longitude:[longitude doubleValue]];
    [builder setPickupLocation:pickupLocation];
    [builder setPickupNickname:model.cityName];

    CLLocation *dropoffLocation = [[CLLocation alloc] initWithLatitude:[detailModel.latitude doubleValue] longitude:[detailModel.longitude doubleValue]];
    [builder setDropoffLocation:dropoffLocation];
    [builder setDropoffNickname:detailModel.placename];
    return [builder build];
    }

Please provide me some solution for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant