I'm writing an app where a user can store a list of documents. When the user adds a new document whose name is already in the list, I'd like to prompt the user for her/his consent to replace the old document. I've looked at UIActionSheet but looks like it should be used when the user clicks some sort of button. UIAlertView is more like warning the user "The document will be replaced, no matter you like or not." So my question is: what's the best way in this case to prompt the user for consent?
Alerts can be used to ask the user to confirm an action. It is done all of the time. Simply implement the proper alert view delegate methods to respond to the user's choice.
Action sheets can be shown at any time with any need for a button to trigger such an event. The action sheet provides several options for displaying the action sheet.
Related
How do I configure a custom unsubscribe page in mautic, I quite like how listmonk unsubscribe page looks like
I want a similar page in mautic.
When user clicks on the unsubscribe link on the email they should be taken to a page where they will see a button "Unsubscribe" they have to click that button to unsubscribe. In mautic, just clicking the link in email unsubscribes you right away. But I want an explicit user action from that page
I also want a check box that says "Also unsubscribe from all future emails", which will basically blocklist this user so no future marketing emails are sent
I have read a lot of documentation and I am not able to figure out how to do this
This is called a Preference Centre in Mautic. You will create a landing page and then select the option to make it a preference centre.
We have a feature coming to add the blocks to the new GrapesJS builder but until then you can use the tokens to position the relevant blocks.
Check out the docs here: https://docs.mautic.org/en/contacts/preference-center
https://docs.mautic.org/en/contacts/preference-center/customize-preference-center
Note: Screenshots are the legacy builder - we are in the process of updating the docs and replatforming but the variables are the same.
I need to display two different messages for Privacy - Camera Usage Description permission based on the view controller user reaches first.
But I can only add one text in info.plist file.
For example if user first goes to viewController1, I need to show a text for permission and if user goes to viewController2, I need to show a different text. Is that possible?
The permission text is set in info.plist, so you cannot change it at runtime.
The permission dialog is only shown the first time that you request access to the camera, so it doesn't really make sense to have action specific permission requests; once permission is either granted or denied there are no further prompts shown to the user.
Your permission text should describe why you need access to the camera, perhaps mentioning both uses. Something like
MyGroovyApp needs access to the camera to create awesome selfies and to scan barcodes
Before requesting permission you could display an alert that explains why you are going to request permission. You can use whatever text you like in this alert.
On my app there is a password reset page. if the textfield is blank and the user hits the submit it generates an alert with title : Invalid input however when user puts the password and clicks on submit he gets a different alert with title : password changed. when user clicks on ok of password changed alert he should gets directed to the different page but when he clicks on ok of invalid input alert he should stay on the same page.In order to redirect to the differen page I am using the method below
-(void)alertView:(UIAlertView *)alertViewclickedButtonAtIndex(NSInteger)buttonIndex
so,whenever user clicks on ok of any alert it's redirecting the user to the different page. How can I differentiate between both alert's ok button?
If you are developing for iOS 8 or later, good news: You can use UIAlertController instead, which solves this problem by its design. And if you are creating a new app now, with iOS 9 out, I'd seriously consider dropping support for iOS 7.
If you must support iOS 7, you can handle this in a couple different ways:
1) Add a class property to keep track of which alert view you last showed; in the click handler check that value and respond appropriately. This is the quick and dirty fix.
2) Create a little utility class that implements the UIAlertViewDelegate protocol. Create 2 objects of that class. Use one object for each alertview that you create. Have that class call back into code in your viewcontroller. You can use this utility class in the future when you need to do this again.
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.
Here's my scenario. As part of my app when someone is sent a message it sends an alert to the phone. If they click on the alert I want to open up the specific message they were alerted to. I have a view message controller that will show the specific message. Here are my questions:
What is the best way to handle a notification while the app is open? I get the alert in the appDelegate, should I show an alert box that's triggered from there and open the correct controller if they choose to view it? This seems like code that doesn't belong in the appDelegate, but I don't know how that would otherwise happen.
For the login, this is a very similar question. When they are logged in it logs them into the server, and they stay logged in for a period of time. When the app loads I want to fire off a check on the server to see if their login has timed out. If it has I want to push them to the login screen of the app. Would this also happen in the app delegate?
My third question is how to best handle getting the phone id. I have the method set up in my app delegate where I get the ID when they accept the push notifications. My plan is to check and see if they are logged in, and if they are check to see if I already have their id saved to the server. If not send it up to save. Is that the best way to do this?
Yes, you would want to show a notification (UIAlertView is perfect for this), so the app doesn't suddenly change views, or jump around when a notification comes in. You'll want the user to be in control of whether they want to view the content related to the notification, just like they can choose to ignore notifications from apps anyway.
Yes, or switch the view to whatever view controller handled the login (you could do this modally). Be sure to let the user know why they're seeing the login view: "Login is required to view [NOTIFICATION]" or something like that. But it depends on the rest of the flow of your app.*
Not entirely sure which ID you're referring to? You might want to store a unique token in the app which you communicate to your server. This token is generated on the first login, for example which enables you to match up the user's login with the token. A UUID might work, or you can roll your own.
*A note on your auto-logout, why do you have this? Most apps stay logged in at all times, and let's the user control when they want to logout (Facebook, Twitter, Instagram, etc. - unless it's a banking app or PayPal). Alternatively, you can let the user add a custom four-digit login code like the Dropbox app for example.