i want to load another iphone application when i click the button on the current application. The application which has to be loaded is DataStore (appl name). I added URL scheme to this application in plist file. URL scheme is dbapp, URL identifier is com.dbapp.
In the current application(Testdb) i have the code is
-(IBAction) btnClicked {
[[UIApplication sharedApplication]openURL:[NSURL URLWithString:#"dbapp://"]];
}
But it is not invoking the DataStore application when i click the button. please help me out.
Thanks.
You can try to embed a link into a hmtl document and have the embedded Safari load that html - e.g. via an external server or maybe.
When you click on the link you should see the registered application load. If it doesn't then you have to look for the error in registration of the url-handler.
Related
I am not sure if this is grounds of app rejection or not:
In my app I receive JSON data from webserver and it has html content like
"[html] a href www.mycompany/view/regulations.html"... click for regulations...[/html]"
Is it okay to show the contents of the url above when clicking on "Click for regulations" link, or will this be rejected because I am under the impression that all html has to be carried locally?
That shouldn't be a problem. We have an app were our TOS is loaded from an (online) URL. What they usually don't like if your code loads from an external source.
I am developing an iPhone app that can be launching via a link to a custom URL scheme from an email.
When the app is launched from the email, I want to populate a text box with an order number that is appended to the launching URL (appname:\\?orderno=1234). I can launch the app from the URL fine.
My problem is extracting the orderno variable from the URL and adding the value to the textbox. I have achieved it with preferences but it only shows the value, the second time the app is launched. How can I extract the variable in the Appdelegate and then allow it for use in the view controller.
Please help!
Have you tried implementing -handleOpenUrl: in your applicationDelegate?
See also this question:
How to use UIApplication handleOpenURL Notifications
I've seen a lot of apps that can create icons for on the home screen. You add it through the normal Add on Home Screeen and when you click on the app it will directly start calling or whatever. This must be done by immediately redirecting to an url like sms:// or tel:// depending on what you are trying to do. But how is this accomplished?
How can you let a page be bookmarked normally so it will get the icon and then when it's pressed immediately redirect it to a specific url?
I THINK, these icons are made using Configuration Profiles & application links (url schemes).
Have a look at this thread: Installing a configuration profile on iPhone - programmatically
But they didn't find a solution in there. Profiles can only be installed via MobileSafari, they say. Not via a UIWebView. So i'm not sure how it's possible from native apps.
Anyhow the preference shortcuts aren't working anymore on iOS 5.1.
As soon as your app is opened, you call:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: #"http://www.google.com"]];
I'm currently working on an iPhone Application which allows the user to navigate to POIs. Those POIs are defined via lat/lon, and the user should have the possibility to start his navigation solution with one click to navigate to this POI.
This works fine with Navigon, using URL scheme navigon://myapp|name||||||lat|lon
Now I know that there is an URL scheme named tomtomplus:// for the TomTom iPhone app, I'm only able to start tomtom, no other action is possile.
I tried tomtomhome://geo:action=navigateto&lat=mylat&long=mylon&name=myname - but did not work. Only tomtom app is starting.
Even when I try to go over the http://addto.tomtom.com API, tomtom does only start, no action in adding and POI or chance to navigate to.
Codesniplet:
NSString* launchurl = [NSString stringWithFormat:#"tomtomhome://geo:action=navigateto&lat=%.8f&long=%.8f&name=%#", myEntry.getLon, myEntry.getLat, myEntry.name];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[launchurl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
Any suggestions?
I used Tomtom to send me an email from the route planning option on my iPhone. In that email is a tomtomhome:geo link which I used.
To test I clicked on the link on my Mac in Safari, and obviously nothing happened. Then I saved the link as a bookmark, which immediately is synced to my iPhone using MobileMe. I clicked on the bookmark on my iPhone Safari browser and viola Tomtom opens with a map centred to the location in the link. It pops up with a balloon with the links name, and an right arrow allows me to choose first option "Navigate there"
The link generated is:
tomtomhome:geo:action=show&lat=26.123456&long=28.123456&name=linkname
So that only a single contact is passed to the web application with the explicit permission of the user..
hum, in a "pure web app" (that you access from a URL in the mobile safari) I don't think you can.
However, you can :
embed a UIWebView (that accesses your webapp url) into a native app
when the user clicks in your webapp on a HTML button "contacts", you open a page with a custom protocol (let's say myapp://contacts)
then, in the delegate of the UIWebView, the callback shouldStartLoadWithRequest will be invoked. Check that the scheme of the URL from the NSURLRequest corresponds to myapp://contacts and based on that, trigger the opening of the ABPeoplePickerNavigationController to enable the selection of a "native" contact.
once the contact has been selected (delegate of the previous controller), you reinject this selection into your UIWebView using [myWebView stringByEvaluatingJavascriptFromString:myJsFunctionToInjectContactInfo
I'm using this approach and it works fine.