{"action":"created","issue":{"url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts/issues/12","repository_url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts","labels_url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts/issues/12/comments","events_url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts/issues/12/events","html_url":"https://github.com/joshuapinter/react-native-unified-contacts/issues/12","id":177705581,"number":12,"title":"Cannot read property `getContacts` of undefined","user":{"login":"Jarred-Sumner","id":709451,"avatar_url":"https://avatars.githubusercontent.com/u/709451?v=3","gravatar_id":"","url":"https://api.github.com/users/Jarred-Sumner","html_url":"https://github.com/Jarred-Sumner","followers_url":"https://api.github.com/users/Jarred-Sumner/followers","following_url":"https://api.github.com/users/Jarred-Sumner/following{/other_user}","gists_url":"https://api.github.com/users/Jarred-Sumner/gists{/gist_id}","starred_url":"https://api.github.com/users/Jarred-Sumner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jarred-Sumner/subscriptions","organizations_url":"https://api.github.com/users/Jarred-Sumner/orgs","repos_url":"https://api.github.com/users/Jarred-Sumner/repos","events_url":"https://api.github.com/users/Jarred-Sumner/events{/privacy}","received_events_url":"https://api.github.com/users/Jarred-Sumner/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts/labels/Waiting%20On%20PR%20Author","name":"Waiting On PR Author","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":23,"created_at":"2016-09-19T05:19:31Z","updated_at":"2016-10-13T04:23:08Z","closed_at":"2016-10-11T22:30:09Z","body":"I feel like I must be doing something wrong here.\r\n\r\nTo import `react-native-unified-contacts`, at the top of the file, I have:\r\n```\r\nvar Contacts = require('react-native-unified-contacts');\r\n```\r\n(which is copy/pasted straight out of the readme)\r\n\r\nIn the code, I run:\r\n```\r\nContacts.getContacts( (err, contacts) => {\r\n\r\n\tif (err) {\r\n\t\treturn reject(err);\r\n\t}\r\n\r\n\tresolve(contacts);\r\n});\r\n```\r\n\r\nRunning `Contacts.getContacts` throws the error at the bottom. It's as though `Contacts` is undefined and so the module isn't exported?\r\n\r\nI've followed the other instructions in the `README` - adding the folder into the project in XCode, ensuring it's a top-level folder, `npm install`, etc. It's possible I did that wrong, but I checked twice.\r\n\r\nStacktrace:\r\n\r\n```\r\nPossible Unhandled Promise Rejection (id: 0):\r\nCannot read property 'getContacts' of undefined\r\nTypeError: Cannot read property 'getContacts' of undefined\r\n    at http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:84737:9\r\n    at tryCallTwo (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:25983:1)\r\n    at doResolve (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:26138:9)\r\n    at new Promise (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:26004:1)\r\n    at InviteFriends.getContacts (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:84735:8)\r\n    at new InviteFriends (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:84772:7)\r\n    at ReactCompositeComponentWrapper._constructComponentWithoutOwner (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:18187:19)\r\n    at ReactCompositeComponentWrapper._constructComponent (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:18169:13)\r\n    at ReactCompositeComponentWrapper.mountComponent (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:18081:15)\r\n    at Object.mountComponent (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false:16531:29)\r\n```\r\n\r\nThis is running in the simulator on iOS 10 in XCode 8."},"comment":{"url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts/issues/comments/253411172","html_url":"https://github.com/joshuapinter/react-native-unified-contacts/issues/12#issuecomment-253411172","issue_url":"https://api.github.com/repos/joshuapinter/react-native-unified-contacts/issues/12","id":253411172,"user":{"login":"jignamru","id":11587674,"avatar_url":"https://avatars.githubusercontent.com/u/11587674?v=3","gravatar_id":"","url":"https://api.github.com/users/jignamru","html_url":"https://github.com/jignamru","followers_url":"https://api.github.com/users/jignamru/followers","following_url":"https://api.github.com/users/jignamru/following{/other_user}","gists_url":"https://api.github.com/users/jignamru/gists{/gist_id}","starred_url":"https://api.github.com/users/jignamru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jignamru/subscriptions","organizations_url":"https://api.github.com/users/jignamru/orgs","repos_url":"https://api.github.com/users/jignamru/repos","events_url":"https://api.github.com/users/jignamru/events{/privacy}","received_events_url":"https://api.github.com/users/jignamru/received_events","type":"User","site_admin":false},"created_at":"2016-10-13T04:23:08Z","updated_at":"2016-10-13T04:23:08Z","body":"So are you currently running this example on xcode 7 or 8?\n\nOn Wed, Oct 12, 2016, 9:18 PM Joshua Pinter <notifications@github.com>\nwrote:\n\n> @jignamru <https://github.com/jignamru> Not sure actually. I never\n> intentionally installed it but maybe it was there with XCode 7.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/joshuapinter/react-native-unified-contacts/issues/12#issuecomment-253410627>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ALDQWteqh6_GXjMzW_kAZI03wGXBspvIks5qzbEigaJpZM4KAJIv>\n> .\n>\n-- \n-Jigna\n"}}
{"actor":{"display_login":"jignamru"}}