How to pass any object to other apps in the iOS app openURL

Asked 2 years ago, Updated 2 years ago, 37 views

I want to give you more than one free object when I start my own app using openURL from my iOS app. Is there a way to do this?

If you can pass Dictionary, you can freely put a free mold in Dictionary, so I think you can do what you want.

I also considered DocumentInteractionController, but I gave up because I thought DocumentInteractionController could not directly specify which application to launch.

Please let me know if anyone knows.
I look forward to your kind cooperation.

ios

2022-09-30 11:16

1 Answers

The only way to achieve this with URL Scheme is to pass data in the form of query parameters.For example, if you pass JSON as a query parameter, you can do almost the same thing as pass the Dictionary.There is also a way to text the binary in Base64, etc.The URL length limit is not clearly stated, so you should be careful about the size of the data you want to pass.

However, I think it is better to use it because there are other flexible ways to share data with each other.

For example, with App Groups, you can share your data exactly where it's stored between apps you're offering.I think it would be more flexible to start the app using the URL Scheme and share the data using the App Groups container.


2022-09-30 11:16

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.