How to change text of my app in "open in" dialog? - ios

I've used the code from this answer in order to add my application to the list of choices a user sees when they tap-and-hold on an attachment in Mail. Everything is working, but my problem is that my application's icon is labeled "Open in {my application}". We wish to have this instead say "Forward with {my application}" or even just "{my application}". Is there any way to change what this says here?

That text is fixed as part of the standard UIDocumentInteractionController. There is no setting or API that allows an app to specify a different label. Submit an enhancement request to Apple.

Related

Open iOS mail attachment directly in app bypassing "Open in..." menu

My app defines a custom document type and when I tap on an attachment my app appears in the "Open in..." menu however I was wondering if it was possible to not show this menu at all but rather open the file immediately in the app.
No, not possible. You have no control over what the Mail app shows to the user when an attachment is selected. The Mail app, like many other apps, uses a UIActivityViewController to give the user lots of other choices. Opening the attachment in your app is only one possible action a user may want to perform on the email attachment.

New app in FireBase

I have recently started to use FireBase to see how it works, as a possible replacement (at least in some cases) for Parse.com.
Here I have a few questions related to that.
1) I noticed from start that an app was automatically built for me. Am I allowed to change its name?
2) I now would like to create a second app. Is that possible or do I need to upgrade my account? Or how do I do? I can see no place in the dashboard for that purpose.
Thanks in advance for any useful indication.
To answer your questions:
You can change the name but not the url of you app. In your dashboard click on the cogwheel next to the name of your app, in the menu that pops up there is an option to change the name.
You can create a second app by simply filling in a name in the gray field on the left and click "CREATE NEW APP"

"Open in" feature in UIActivityViewController

I need your help with UIActivityViewController.
I need to present activity controller for the file where, except for default actions, the user will be able to open the file in other apps.
I know how to do this with UIDocumentController, which shows popover with all apps able to open the file.
But how can I show all these apps in UIActivityViewController?
P.S. This behavior can be seen in Apple Mail app, for example.
Look at TTOpenInAppActivity for a way to combine both a UIActivityViewController (for normal sharing), and an 'Open in' button on that which brings up a UIDocumentInteractionController. Pre-iOS 8, that is the best way to manage this.
The function and behavior is different between UIActivityViewController and UIDocumentController.
UIActivityViewController
Presents activities that are pre-defined, you can pass an array to select which ones should be excluded among the default ones that are presented, if you want to add more activities you have to use custom activities, unfortunately these will appear bellow the rest of the activities and even more, the icon will always be gray, your app never loses control since you can use delegates and other stuff to know what is going on on those apps. (Unless you manually make an activity which opens another app)
UIDocumentController
This one asks the system for all the registered applications for a certain file extension, many apps have registered their exclusive extensions which makes it so that this app will be the only one displayed. If you pass an image, you will see all the apps that can handle this file. When using this one your app will lose control since the other app will be opened.
What is your final objective?, If you describe it with more detail we could offer you a better solution.
From what i understand, you should see yourself what type of file the user is trying to open, and then yourself open it with the most suitable one.
Since you cant really emulate what apple is doing, you should handle this problem through your interface, offer the user to "share" or to "open with" for example.
The answer is very simple. There is no way to do it. You cannot add the apps except the defaults into the UIActivityViewControllers.
You are absolutley correct, you can acheive this through the UIDocumentInteractionController.

How does one create a "file handler" in iOS, that lets you open a URL in your app if you long press on it?

For example, if you open a PDF in Safari, you have the option to open in iBooks - I believe a number of apps have this ability.
How does one "register" the ability of your app to handle such files, and is it possible so that by "long pressing" a link in Safari, you can get the option to open the URL in your app instead of in Safari?
Yes, it is possible.
look at the documentation on "Registering the File Types Your App Supports"
here is a link: https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html
For the first part, you are going to want to take a look at Registering Your Support of File Types to add your app to the system list of apps that can open specific document types. That is handled by the system.
For the second part, I could be mistaken, but I don't believe you will be able to get that "long press" functionality as it would require changing Safari. If you control the content of the web page however, you could add a Custom URL Scheme to your app which would allow you to launch it from a web page.

facebook like action in ios

I have integrated facebook SDK in ios,and now want to use like action. For this, I have used like logo of facebook but this is rejected with following message-
"Please address the following feedback from our review team. Once you have made the changes listed below you may resubmit for review.
Thanks for making changes to your submission. This action type still doesn’t meet our criteria to become available to users. Here are the remaining changes that you need to make to your action type: Your button branding doesn’t follow Section 5.6 of the Facebook Terms and Section I.8 of the Platform Policy: https://developers.facebook.com/docs/guides/policy/examples_and_explanations/branding/ The graphics must reflect your own branding and the user experience of your site. Learn more about branding: https://developers.facebook.com/docs/opengraph/submission-process/#uex."
If I will use like button as my application theme, then how user will know that he is going to like on facebook.
According to facebook
You can use the Built-in Like action to create custom buttons in your
app, but the button must not emulate or otherwise copy the design of
Facebook’s Like buttons. For example, you may not use a “thumbs up”
image with the word “like” in your Open Graph actions without prior
written permission from Facebook, and any custom like button you
create must not confuse users into thinking that your Open Graph
action will result in a connection to a Facebook Page.
They have clearly stated that "you may not use a “thumbs up” image with the word “like”"
So what's best thing which you can do ??
just a thumbs Up button.
You may not be allowed to use same button as Facebook has, as per Apple's guidlines.
So, in that case, you can put the same button but with different color OR you can even change the sign of fingers and make a little change in the icon. It will create an impression of Facebook like button but it is not exactly same as it.

Resources