Skip to content
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

Merged
merged 6 commits into from
Jan 25, 2019

Conversation

phinguyen712
Copy link

No description provided.

@@ -43,6 +43,11 @@ - (instancetype)init {
self.resolve = resolve;
self.reject = reject;
self.pickerController.peoplePickerDelegate = self;

dispatch_async(dispatch_get_main_queue(), ^{
Copy link

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.

Copy link
Author

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

@doctadre
Copy link
Owner

You need to bump the version in package.json

}
}
- (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];
Copy link

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.

@doctadre doctadre merged commit b15c944 into doctadre:master Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants