In iOS 8 you're allowed to easily delete assets from Camera Roll.
I already use this function in my App but I wan't to change the text of the alert, which is visible.
Image:
http://i.stack.imgur.com/uhSAv.png
Now I want to change the title of the alert.
Did everybody know, what I have to do that i can change the title of the alert?
I use Objective-C in Xcode.
There isn't a (sanctioned) way to modify the content of messages of this type where the iOS framework is cautioning the user about access to shared data. This is for security reasons: imagine if someone changed the meaning entirely. The user would answer a different question and the app could delete photos without the user knowing until it is too late.
Related
I have a requirement to display a different camera permissions message, one for when the user starts the QR scanner, and one for taking a photo.
The user can start with either one, and product don't want to use a generic message for both.
Is there a way to set NSCameraUsageDescription programmatically, or can this only be done within Info.plist?
Thanks
You can't edit the Info.plist of your app. You don't have write access to that file. In fact an app's bundle is read-only. You can't save changes to your bundle.
You should use a generic message mentioning both cases in the permission message. This way user knows that this permission will also be utilised in other places too.
As pointed out, .plist files cannot be edited at runtime. Anyways they can be localized. It's possible to create multiple Localizable.strings files containing different values for your NSCameraUsageDescription.
Right after, you could change the localization file your app is pointing to, obtaining the correct text that will be displayed in the alert.
Besides the general message, you may present your customized alert message before request authorization somewhere, even with cooling animations.
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.
I am working on app in which there is a textview with save button. On the click of save button I suppose to open the Notes app and save the text on notes. Same as we done to post the sms.
I also go through this given pdf file iPhoneURLScheme_Reference
But didn't find out the way to save the text/open the notes app from the app. If someone has ever done this type of functionality or having some idea please help me out.
Thanks in advance.
I don't expect there to be an URL scheme if it is not present in the PDF you linked to.
I wold expect it to be on this list however.
Looks like you can't do that.
If you consider the URL schemes in Apple's document you will notice that all of the schemes refer to an application the user is expected to interact with immediately (navigating with Maps, making a call,...). All these applications provide something you can't do your own. What would be the benefit of your app if it just allowed the user to write a note once?
I have a couple apps on the Apple App Store and would like some way to send announcements to users whenever I want. Basically, I want to remotely change the text of an IUAlertview and only trigger it to appear if I want it to (upon app opening and only if I updated the message).
So far I have no problem making the IUAlertview appear on when the app opens, and I can easily program an NSUserDefault flag to only make the IUAlertview appear under certain circumstances, but really have no idea how to dynamically change the UIAlertview text without resubmitting my app to Apple continuously.
Can someone please explain how this is done? Thanks!
One way to do this is to have your app periodically (or upon each launch) check a file on a website that you control and if there is changed text (or a version number, or newer date than the last time an alert was displayed) there, then display that changed text in your UIAlertView.
I was testing my app, part of which allows the user to take a photo and save it. When the alert appeared on the screen asking me to give my app access to the photo library I accidentally hit "No" (Stupid touch feature : D ). Now each time I run the app I cannot save images. Is there a way to reset that?
Just turn access on in the settings. Settings->Privacy->Photos->Your App.