Safari on iPhone has a feature that lets you create a shortcut on your home screen for a web page. Is it possible for other apps to implement similar functionality? I'd like to give my users a quick way to jump to a specific item in my iPhone application.
There is no officially sanctioned way to do this. Third-party apps on the iPhone have very limited scope for interaction with other parts of the system. They can look into the address book and the photo library and they can invoke other applications with certain arguments but they can't do anything with the home screen.
Not sure.. but there is application like 'One Tap Dial' that is doing it tho
I spent few hours to find ways to this - seems only safari has this capability
'One Tap Dial' eventually uses Safari to get this done
Related
I am trying to register my application to show up in Safari's "Open-in..." dialog when a user clicks the share button on any html webpage.
I have added the public.html (and public.data for good measure) content types to the Document Types in Xcode, as suggested in many answers: (See this question, this question, or this apple documentation.)
And, it seems to work. If I open a .pdf in Safari, I get the "open in My App" dialog at the top.
I can also use the "open in..." dialog from other apps to share the document with My App.
To test it, I built DocInteraction as recommended in this answer, and if I create an html file, My App shows up in the share dialog.
However, My App still doesn't show up in the share dialog in Safari.
When I run it in iOS7 on the iOS Simulator, I only get Mail, Twitter, and Facebook showing up:
The same goes when I test it on my real iOS device:
BUT, I would like you to note that it does seem to be possible! Look at the above screenshot.. SOMEHOW, Weibo has managed this feat. I don't know how, but for some reason Weibo shows up in this list even though My App doesn't.
And you know, actually, this sort of makes sense, given how many apps can probably open html pages. Here is DocInteraction running on my iOS device trying to share an html page:
There it is! My App! (It's actually called "Wulu Podify"). But there are so many apps who are hungry for .html pages, I guess Safari thinks it might be a bit overwhelming to provide them all.
BUT, this still begs the question, how did Weibo get themselves on that list? But, some further digging seems to show that actually Weibo seems to have gotten itself on EVERY list.
I'm not sure how they managed it, but maybe they are going about this differently.
Weibo's "I-will-open-any-document-you-throw-at-me-c'mon-try-it-c'mon" approach might solve this problem, but it's not ideal. I really only want to open html pages.
So. I guess my questions is three-fold:
Is there a way to actually have my app show up in Safari's "Open In..." dialog?
If not, how can I achieve what Weibo achieved, and show up in ALL the dialogs?
Should I want to do that? It seems like it might be a bad idea.
Thanks for any help! I've been at this for a while!!
Update:
So, actually, I didn't realize it but I think Weibo might be a built-in option just like Facebook and Twitter. I assumed it was just there because I have it installed on my phone, but maybe it was one of the iOS6 defaults. I say that because when I test on the iOS6.0 Simulator, I suddenly see Weibo show up in the share screen, even though I definitely haven't installed it on my simulator.
So maybe there is no way around this except for having it built in to Safari by apple..
I know this is years later, but if anyone runs into this old question, as of IOS 8, Apple now allows app creators to make "extensions" which do allow you to add your app to the share menus.
Here is some documentation:
https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html
I fear what you want is not possible.
There is a difference between the Share dialog and the Open With dialog.
For the latter it's possible to register your app with document interaction, but the Share dialog only provides the native types (which Weibo is one of - see here: UIActivityViewController).
Also see this question on StackOverflow: is-it-possible-to-add-an-app-to-the-native-share-dialog
its , called extension , fist create a new project and than -->
file ->new -> target -> application Extension -> ####
and select your required extension and done....
I'm curious, is the standard "Share" dialog you see throughout a lot of iOS apps a standard SDK dialog or is everyone just mimicking the ones that Apple created for their apps like Safari? Or perhaps everyone is using ShareKit?
For instance, on iPhone you get a nice 3/4 modal dialog which does a vertical cover appearance, containing a bunch of shiny buttons:
While on iPad you see a "speech bubble" type dialog appear:
This seems too standard across apps to just be coincidence/people ripping off the look and feel.
The situation you presented in this specific case is caused by the fact that on iPad, the UIActionSheet is always presented within a popover controller, and on the iPhone it displays as in your example, withouth a Popover Controller (which is only available on the iPad)
I've written my own code for sharing using Facebook's SDK and the iOS5 Twitter integration so I've never used it but I believe there is a library you can use called ShareKit that will create the action sheets and sharing capability that you'd like. The "up-to-date"/"2.0" (I believe the original is no longer maintained) version is available here:
https://github.com/ShareKit/ShareKit
Apple provides the tools to make UI objects. The one you are looking at is "UIActionSheet".
Developers can bind methods to the tap events of the actionsheet.
Apple encourages developers to keep a consistent UI in order to make the overall use easier on the user.
Check out the Apple Human Interface Guidelines.
link
This morning I had a look at my blog on my iPhone and noticed that when I view a specific page a Reader icon comes up next to the URL in the address bar:
When I press it, I get an interface like this:
This functionality was completely unintentional (I wasn't even previously aware of it) but I think really nice, so I want to try and implement it intentionally on a few other pages on my website (and other sites that I work on).
How do I work with and enable this feature?
You don't need any work on your site. This is build-in feature on iOS Safari.
I am a meganoob in iPhone Application programming.
All I want to do is make an application with a single button. When you press the button, it plays an audio file.
The button is just two images, one for the normal state and one for the pressed state.
I have no clue how to get from point A to point B, it seems so straightforward in web design, why can't it be like that for this too?
Anyone out there willing to drop some hints?
iPhone development is nothing like web design. Nearly all programming is not like web design, for that matter.
Start with a good introduction to iPhone development.
To answer this specific question, once you have learned the basics of iPhone development, you might look at the Audio Session portion of the SDK. You'll know how to hook up actions to buttons at this point, such as a play action for an audio file.
Then do this as a web app. Seriously. Originally, that was Apple's solution to writing all apps for the iPhone. They gave it an HTML 5 browser and wanted people to design custom web pages. So if you can do this on the web (BTW: I could not but could do this in Objective-C in little time), do it that way.
You can create a link to your web page on the homescreen so it looks like an app.
start from hello world for iPhone dude
do you know in which ways is it possible to launch an application?
I know that it is possible by clicking on the icon, and it is possible by clicking an url with a cistom protocol,
Anyone know if there ae more ways?
For example is it possible to make an application be launched when the users touch 3 times the home button?
or when the user start a call?
thank you
Paolo
The only ways that it is possible to launch an application are the ways you describe:
Clicking the application's icon
Via a custom URL scheme
The above applies to non-jailbroken iPhones. I would imagine it is techinically possible to hack a jail-broken iPhone to launch apps in other ways, but naturally such functionality would not be permitted on the App Store
Jailbroken phones can use libactivator. It has a set of predefined touch and physical button events that can start an application. Of course it is not viable if you plan to publish your app in the store.