How to pass data from webpage to iPhone app - ios

I want to password marked in web page to my iPhone application. If I paste it to clipboard then I need to run my app in background which is not possible in iPhone. So, how I should do that?

You can define a Custom URL Scheme in your iPhone app. Then you can link to your iPhone app using a regular HTML link, so for example Click here to go to my app. For more information about this, go to the Apple documentation (scroll to the part about Custom URL schemes). You can also find a lot of information about this by googling.

Related

Opening file in an app from URL

I'm trying to create a link that, if clicked on a mobile device (ios), will open a PDF in a FileExplorer mobile app (or the App store if they don't have one installed). I've tried finding apps with their own URL scheme (similar to Facebook's "fb://" or YouTube's "youtube://"), but I'm not having any luck.
I've reviewed the content in the following pages and still have not found an answer:
iPhone apps: Can I open an app from a link in a website?
How to open ios app using url?
Opening an app from URL schema
There is the option to open the Files app at a specific location using the shareddocuments:// URL scheme, as described in this article.
There's no direct solution. Your best best is to let the user decide what to do with the PDF. Use a UIActivityViewController setup with the PDF. Then the user can choose. Typical options will be email, print, iBooks, Preview, other apps that handle PDFs, and as of iOS 11, the standard Files app.
You are not going to find URL schemes for "file explorer" apps in general. And there's little point to finding URL schemes to a few specific such apps. Any such apps the user may already have should appear in the activity view.

How can I show my app in the menu that is displayed when text is selected in another iOS app?

Let's say I am in Safari and I select some text on a web page. A menu pops up that shows "Copy" and possibly other options.
How can I show my app in that menu?
(The purpose would be to send that text to my app in a custom url scheme.)
Edit:
I thought I saw this behavior in safari, but I was mistaken. It was in an app called Equipd.
Here is an example:
![enter image description here][2]
Is this due to a collaboration between Equipd and Pleco? Or can Equipd just do this because it knows about Pleco's custom url scheme? Or is something else going on here?
It's not possible to edit this kind of menu without using jailbreak-methods. But Apple won't allow these kind of methods in their App Store apps.
But you can use the new App Extensions which Apple introduced with iOS 8. You should check the App Extension Programming Guide Apple provides.
There are different extension-types. What you will need is the Share Extension.

Kiosk App in iOS can we provide any identifer to that app to use from URL scheme.

I wanted, to give some identifier to the app that we create like a kiosk mode in iOS.
i.e. We make add to home screen and it has an icon on home page which browse further.
Is there any way, where I can give some identifier Name to that link of app getting created so that we can get that app access from our Native and we can provide URL Scheme for the same.
Thanks.
iOS will not give access of all the url schemas. You can refer this document where the url schemas for selected application is given :
http://wiki.akosma.com/IPhone_URL_Schemes#Phone
It may be that the only way you can achieve what you want to do is to build an app around an iOS UIWebView. You can then include the camera functionality directly in the app, although there can be issues as a UIWebview doesn't handle things like popups that Safari does.

Is it possible to have an iOS webapp call another regular app to open? Works with Mobile Safari.

I am working with my web developers that are stuck on a problem with a Web-app we are creating.
The webapp works great, you add the website to your home screen on the ipad, open it and use the website within the webapp interface outside of safari.
The issue is that we have one function that doesnt work, where when clicking a URL link within mobile safari, it calls an external app (Optiscan- a qr code reader), and then when scanning the code, then returns you to Mobile safari.
The question is - is there a way to call a URL that will open an external app, from within a webapp? Similar to how it would work from mobile safari?
If so - i am then wondering if an app can be written that calls the webapp to open. For example if i needed the QR code reader to then re-open the web app and pass it the QR code.
-Dana
In iOS, native Apps can define Custom URL Schemes. If you know the scheme of an App, you can simply open it by clicking on a link like Launch Facebook App. This should launch the Facebook App for iOS if installed.
There was a crowd-sourced list of known URL schemes on akosma.com but they seem to have some problems and the list is not available as of writing this. If the URL scheme of the App you need to open is not public, try contacting the developer and ask for it. I'm sure if you ask kindly, he will help you ;-)
Edit: Almost forgot to say, opening Apps like this won't return to your Web-App magically. That's something the developer of said App would have to implement.
Edit 2: I found another website that has many custom URL schemes in it's database: http://handleopenurl.com. It does not have a URL scheme for Optiscan but for other QR Readers, maybe this will help you.

How do Apple detect if an iphone app is installed when clicking on a pure html link?

I am trying to detect if my ipad app is installed on a device when visiting my website, in order to suggest different action to the visitor.
Thanks to this post :
https://stackoverflow.com/a/8310348/1128754
I found that the "store" application on iphone seems to have achieve to detect if the app is installed on the device. When you click on store links, it launch the app instead of going to the mobile web version.
For example, if you go to :
http://store.apple.com/xc/anythinghere
with an iphone on which apple store app is installed ( http://itunes.apple.com/app/id375380948 )
it automatically start the store app, instead of the web page.
I tried to follow the stack call with mitmproxy but safari doesn't seems to ask query before launching the app.
So, I guess they did custom url scheme recognition, with http:// links.
Do you think it is possible?
This is done with URL protocol handlers:
http://www.iphonedevfaq.com/index.php?title=URL_schemes#URL_Protocol_Handlers
You cannot detect if an app is installed from HTML, but you can launch an app. For example, the popular game "Doodle Jump" can be launched by going to doodlejump://, but if you don't have it installed, the link won't work. As mentioned, this is done with a custom URL scheme and needs to be coded into your app.

Resources