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

contacts don't always load on iOS 10.2 #15

Closed
mlevkovsky opened this issue Dec 15, 2016 · 29 comments
Closed

contacts don't always load on iOS 10.2 #15

mlevkovsky opened this issue Dec 15, 2016 · 29 comments

Comments

@mlevkovsky
Copy link

Some users of our app were saying how they can no longer load contacts.
It used to work and now it just doesn't for them.

The only common thread that I was able to find between them is that they are on iOS 10.2
However, I am also using 10.2 and it loads fine.

Unfortunately I can't repro this.
I was wondering if anybody else was experience this issue :/

@joshuapinter
Copy link
Owner

@mlevkovsky Anything iOS 9.0 and above should work just fine. I'm on iOS 10.2 and it works great.

One thing I would check is making sure that they have the Contacts permissions enabled on their phone.

If you can get me more information, we can debug this together.

@joshuapinter joshuapinter added the Waiting on OP Waiting on the Original Poster (OP) who submitted the Issue or Pull Request. label Dec 15, 2016
@mlevkovsky
Copy link
Author

@joshuapinter it works great for me as well (awesome library btw)
I am double checking that permissions are enabled with the users although I would be surprised that that's the issue (since they use it before)
I wish I had more details, feels like I'm flying blind 😞

@joshuapinter
Copy link
Owner

@mlevkovsky I know the feeling. 🙈 But seriously let me know what you find out and I'll get on it.

(And thanks for the compliment.) 👍

@mlevkovsky
Copy link
Author

ya permissions are not the issue it seems. The user told me that it was working just fine and then stopped. Going to keep digging but not even sure what to ask them at this point

@joshuapinter
Copy link
Owner

Ask what it's doing: i.e. does it just show a spinner with "Loading Contacts" or does it go blank or anything?

@joshuapinter
Copy link
Owner

Also, depending on if your app's data is saved, maybe try and reinstall and see if that helps.

@mlevkovsky
Copy link
Author

It's a fresh install, that's the weird part.
I got a screenshot from the user and it's just blank a blank page, which is odd.
So far this has been reported by 2 users. Very weird

@joshuapinter
Copy link
Owner

@mlevkovsky Strange. Keep me posted on any updates.

@mlevkovsky
Copy link
Author

@joshuapinter will do for sure

@mlevkovsky
Copy link
Author

@joshuapinter ok so I updated my xcode to 10.2 and I let Xcode update my swift version to the latest one.
Now the RNUnifiedContacts.swift won't build. I'm not sure if it's related or not to the issues some users are having.

@joshuapinter
Copy link
Owner

@mlevkovsky Follow the new instructions on the README. They changed the way things build in XCode.

@mlevkovsky
Copy link
Author

lol of course they did.
thanks for the heads up!

@mlevkovsky
Copy link
Author

@joshuapinter hmm ok so I re-added and re-installed the library but now, whenever I try to access the contacts I get this error
Unhandled JS Exception: undefined is not an object (evaluating 'UnifiedContacts.requestAccessToContacts')
and when I try to console.log the unified actions the object itself is undefined :/

@joshuapinter
Copy link
Owner

joshuapinter commented Dec 15, 2016

@mlevkovsky And when you added it, did you add the individual files, not the directory?

@mlevkovsky
Copy link
Author

yup, just followed step by step
added the files individually and then grouped them

@joshuapinter
Copy link
Owner

Can you go to your Build Settings and add $(SRCROOT)/../node_modules/react-native-unified-contacts/RNUnifiedContacts to the Header Search Paths?

@mlevkovsky
Copy link
Author

that didn't work :/

@joshuapinter
Copy link
Owner

@mlevkovsky Drats. Okay. I'm not sure about ideas but can you try a few different things and see if you can get it to work. I'll try on my end, too.

@mlevkovsky
Copy link
Author

@joshuapinter sure thing. I'll give it a shot on my end to see what's going on. I'll compare it against your example project as well

@mlevkovsky
Copy link
Author

mlevkovsky commented Dec 15, 2016

@joshuapinter aha so I figured it out.
This might be a new xcode bug ("feature") but when you add the files to your project it actually ads them outside of the main workspace.
All I had to do was drag them in in the side menu.

Still have no idea why contacts don't show up for some people, but at least I got it to building again heh

@joshuapinter
Copy link
Owner

@mlevkovsky 👏 Nicely done!

That's really bizarre. I'll play with it on my side and then look at updating the README.

@joshuapinter
Copy link
Owner

joshuapinter commented Dec 16, 2016

@mlevkovsky Can you test something for me?

Can you:

  1. Remove RNUnifiedContacts from your project's side bar and the iOS folder.

  2. Compile and confirm that it no longer works (i.e. Contacts is undefined, etc.).

  3. Drag and drop the RNUnifiedContacts folder from node_modules/react-native-unified-contacts into the sidebar.

  4. Check off Copy items if needed.

  5. Select Create groups

  6. Ensure your project is selected for a target.

  7. Click Finish.

  8. Recompile and see if it now works.

When you get a sec. Thanks!

Josh

@mlevkovsky
Copy link
Author

@joshuapinter sure thing. I will try this over the weekend and get back to you

@joshuapinter
Copy link
Owner

Awesome, thanks.

FYI, here's a GIF I made for the new README instructions if your test works out:
drag_and_drop_library_to_sidebar

@mlevkovsky
Copy link
Author

@joshuapinter ah ok so dragging the folder should work now?

@joshuapinter
Copy link
Owner

@mlevkovsky It should work. Works for me but I want you to try it out and then I'll update the README instructions.

@joshuapinter
Copy link
Owner

@mlevkovsky Did you get a chance to test out the drag-n-drop?

@mlevkovsky
Copy link
Author

@joshuapinter seems to work but only after I updated to swift 3 with the latest xcode 👍
I have to commend you on your work on this library man!

@joshuapinter
Copy link
Owner

@mlevkovsky Awesome, thanks for the update!

joshuapinter added a commit that referenced this issue Dec 22, 2016
@joshuapinter joshuapinter removed the Waiting on OP Waiting on the Original Poster (OP) who submitted the Issue or Pull Request. label Jan 2, 2017
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

No branches or pull requests

2 participants