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

Make iOS embedding to send full uri for deeplinks #41992

Merged
merged 4 commits into from
May 18, 2023

Conversation

chunhtai
Copy link
Contributor

related flutter/flutter#100624

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@chunhtai chunhtai marked this pull request as ready for review May 16, 2023 17:13
Copy link
Contributor

@vashworth vashworth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks good to me, just have a design question about using the http protocol (which was probably introduced in a framework pr?)

arguments:@{@"location" : @"/custom/route?query=test"}]);
OCMVerify([self.mockNavigationChannel
invokeMethod:@"pushRouteInformation"
arguments:@{@"location" : @"http://myApp/custom/route?query=test"}]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it weird to be using the "http" protocol for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An universal link is either a http or https protocol.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the framework pr flutter/flutter#119968, it just surface whatever url that is sent here to the developer in RouteInformation.url

The goal is to let developer to be able to handle differently based on what uri to launch the app, for example they may want to block certain route if the app is launch from example.com but not when it is launch from another-example.com

@chinmaygarde
Copy link
Member

Looks like @gaaclarke s question was answered. Can we land this please?

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label May 18, 2023
@auto-submit auto-submit bot merged commit c7c679d into flutter:main May 18, 2023
24 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 18, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request May 18, 2023
…127139)

flutter/engine@2c77c80...c7c679d

2023-05-18 47866232+chunhtai@users.noreply.github.com Make iOS embedding to send full uri for deeplinks (flutter/engine#41992)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
CaseyHillers pushed a commit to CaseyHillers/flutter that referenced this pull request May 24, 2023
…lutter#127139)

flutter/engine@2c77c80...c7c679d

2023-05-18 47866232+chunhtai@users.noreply.github.com Make iOS embedding to send full uri for deeplinks (flutter/engine#41992)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@astubenbord
Copy link

Is this supposed to solve the issue mentioned in flutter/flutter#100624 (which is unfortunately locked)? I experienced the same problem, but this doesn't seem to fix it. What URL will flutter receive when starting the app with "myapp://page/1", if the hostname is not set as described in flutter/flutter#100624?
I didn't want to open another issue yet and don't know where else to ask, maybe it's also just an issue with my setup. I've tested on master and 3.12.0. With which version was this fix introduced?

Thanks

@chunhtai
Copy link
Contributor Author

@astubenbord please use discord if you would like to discuss more. If you are using router API, myapp://page/1 is stored in https://master-api.flutter.dev/flutter/widgets/RouteInformation/uri.html

@punxti
Copy link

punxti commented Aug 21, 2023

Hi,

My deeplink works fine on Android device. On iOS, it only opens the App, but not the routed page. I followed the configuration mentioned in https://docs.flutter.dev/cookbook/navigation/set-up-universal-links.

I found a similar issue mentioned in another post . This post(Make iOS embedding to send full uri for deeplinks) seems to be resolving this matter. Do we need to do anything different with our code to incorporate the changes?

Could you advise on this?

Many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-ios
Projects
None yet
6 participants