-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed ios address book pop up bug #9
Conversation
ios/ContactPicker.m
Outdated
@@ -43,6 +43,11 @@ - (instancetype)init { | |||
self.resolve = resolve; | |||
self.reject = reject; | |||
self.pickerController.peoplePickerDelegate = self; | |||
|
|||
dispatch_async(dispatch_get_main_queue(), ^{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block needs to go in the two places that currently call presentViewController instead of up here, so it still checks for the permissions. Also need to do the same sort of block around dismissViewControllerAnimated inside of peoplePickerNavigationController.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated, please let me know if this is correct. I'm not entirely knowledgeable in this code
You need to bump the version in package.json |
ios/ContactPicker.m
Outdated
} | ||
} | ||
- (void)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker | ||
didSelectPerson:(ABRecordRef)person { | ||
ABMutableMultiValueRef emailProperty = ABRecordCopyValue(person, kABPersonEmailProperty); | ||
NSArray *emails = (__bridge_transfer NSArray *)ABMultiValueCopyArrayOfAllValues(emailProperty); | ||
[self.root dismissViewControllerAnimated:YES completion:nil]; | ||
dispatch_async(dispatch_get_main_queue(), ^{ | ||
[self.root dismissViewControllerAnimated:YES completion:nil]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're going to need UIViewController *root = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
here too, and just get rid of self.root
, so you make sure you have the right root controller when you need it.
No description provided.