Anyway to custom permission alert view like: Contacts, Photo Album, Push Notifications... before they get access, they will pop up an alert view like this:
How to custom Contacts, photo album, push notifications alert view text?
UPdate:
See the update image above, translate into english:
"To seek for your family and friends, Path needs to transfer your
contacts to our server"
And click OK to get contacts access without any other access permission alert view pops up.
Under iOS 6 and above, these can be setup to show specific messages. Edit your Info.plist by adding a few new entries. The keys all begin with "Privacy - " (the raw keys are NSxxxUsageDescription where xxx is Contacts, Locations, Reminders, PhotoLibrary, or Calendards). The value is the text you wish to display to the user.
Related
CNAuthorizationStatus and the related documentation seems to suggest that you need permission to read or save to the CNContactStore. (And I've read most of the CNContact-based questions, and they are pretty consistent on that topic).
But I found an app that has a "Save Contact" button, and displays a contact in what looks like CNContactViewController, and when I pressed save, the app did save to contacts, but without any permissions dialog (and I never gave it permissions).
I uninstalled, re-installed and saved contact again, to confirm.
Has anyone done this before? I was on iOS 11.4.1.
I wrote an app that presents the Contact View for a new contact, and saves it to Contacts without:
requesting permission
using a purpose string NSContactsUsageDescription
The has been published in the app store for sometime now, as "DropCard".
The app also uses CNContactPickerViewController to select a single contact from the store, which interestingly says this:
The app using contact picker view does not need access to the user’s contacts and the user will not be prompted for “grant permission” access. The app has access only to the user’s final selection.
I conclude that similar-and-not-documented behavior is allowed for the creation of a single contact.
NOTE: This behavior does not allow a rogue app to programmatically jam large amounts of trash data into the Contacts store, because you still need the user to click on a button to save each new contact.
Here's the code I use for that portion
let contact = CNMutableContact()
let saveContactVC = CNContactViewController(forNewContact: contact)
saveContactVC.contactStore = CNContactStore()
saveContactVC.delegate = <your delegate here> as? CNContactViewControllerDelegate
saveContactVC.allowsActions = false
let navigationController = UINavigationController(rootViewController: saveContactVC)
root.present(navigationController, animated: false)
// NOTE: app *will* use right->left slide-over annimation...
// then the 'animated: false' supresses the NavUI's top->new VC animation.
I am using Appsee and using their video recording in my app.
I show an alert with confidential information. I know that I can hide the alert in appsee while using
+(void)markViewAsSensitive:(UIView*)view
and it's working.
However, this API doesn't remove the title and the message for the sensitive alert from the timeline.
See the attached
screenshot.
You should contact Appsee's support at support#appsee.com.
Meanwhile, you can use [Appsee pause]; before the alert and [Appsee resume]; after the alert. See docs.
In order to be aware of the alert, you can send a custom event with the details you want to be displayed in Appsee via +(void)addEvent:(NSString*)eventName. See docs.
I have developed a today extension using Contacts framework.
After allowing to access contacts in the main app (I touched down "OK" button on a alert that explaining "ABC app" would like to access your contacts), I checked CNAuthorizationStatus is CNAuthorizationStatusAuthorized.
But, when I logged the status on today extension, the value is CNAuthorizationStatusNotDetermined.
Why this problem is occurred? And how can I fix it?
I wanted to integrate below functionality:
I am passing one contact number of a user. If that contact number already exists, directly opens that user's chat screen when I press on WhatsApp button in my app.
If that contact does not exist in the address book, then first, store this contact in the address book and then open that contact's chat screen in WhatsApp (with refreshing contacts so I will get the name of that person on WhatsApp chat screen).
I have done below task:
If contact does not exist, then it first stored in the address book and then move to WhatsApp. If I press the WhatsApp button again for the second time, then it checks that contact if it exists or not. If it's already saved, then fetch its record identifier and passed with WhatsApp URL scheme.
The main problem is that it just moves to WhatsApp's contact list, but does not open specific chat screen of the user.
Note: This thing works perfectly in Android, so I hope that it's also possible to integrate into iOS/Swift app.
Check out whats app Custom URL Scheme
https://www.whatsapp.com/faq/en/iphone/23559013
There is no URL Scheme registered for specific chat screen of user.
Simply Append with ABID with your whatsapp url scheme and call this its worked.
ABID stands for the Address book Record ID,the code below works to get the AB Record ID. It is sensitive to the use of delimeters in the URL itself.
To send a note to a specific user use this - urlstring format: whatsapp://send?abid=12&text=Hello%20World - note the use of & to mark the second parameter.
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person
{
ARecordID = (ABRecordID)ABRecordGetRecordID(person);
....
whatsapp_string = [NSString stringWithFormat:#"whatsapp://send?abid=%d&text=%#;",ARecordID, "hello"];
....
}
I am doing one project in that I am sending messages to multiple user.
When I am composing message I took one textfield for enter contact. When I click on contact textfield I want to open phone contact (like In Phone default compose message view how the all contacts appears when user click on "To") view.
In Android development we can open the phone contacts bye using "contact intent" I want to create like the same.
By using ABAddressBook I am able to fetch all contacts. But I dont want to create custom phonebook contact. So please help me that is there any default method to get default phone contacts controller in iOS.
For example how we directly open the setting page by using
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs://"]];
this . I want the something like this to open the phone contact and once i finished any action(i.e selected any contact number) then it will get back to my app
Use the ABPeoplePickerNavigationController: https://developer.apple.com/library/ios/documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/Chapters/UI_Controllers.html#//apple_ref/doc/uid/TP40007744-CH5-SW1