{"__v":1,"_id":"57e0f0bc9ff1e21900a72197","category":{"project":"5540ce1b31827a0d007ab1cc","version":"5540ce1c31827a0d007ab1cf","_id":"57595bbb18760817001e8bbe","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-06-09T12:06:19.325Z","from_sync":false,"order":24,"slug":"react-native","title":"React Native"},"parentDoc":null,"project":"5540ce1b31827a0d007ab1cc","user":"55b8b82fdec1c9210013cfa1","version":{"__v":31,"_id":"5540ce1c31827a0d007ab1cf","project":"5540ce1b31827a0d007ab1cc","createdAt":"2015-04-29T12:27:08.390Z","releaseDate":"2015-04-29T12:27:08.390Z","categories":["5540ce1c31827a0d007ab1d0","5540d91bbb9e762d00f594ad","5540e5f131827a0d007ab212","5540e5febb9e762d00f594d3","5540e61331827a0d007ab213","5540e6195cf9682100d61afa","5540e62631827a0d007ab214","5540e63031827a0d007ab215","5540e63531827a0d007ab216","5540e63e5cf9682100d61afc","5540e6445cf9682100d61afd","5540e64a5cf9682100d61afe","55a4ff5b2e70c0250038050f","55acb28318eefd0d0071d504","55ae1abe8576b92300291c80","55ae453ef302af23000ac109","55af586d555b900d0036d296","55af91dac8a85321007a53c3","55b9fee204775a2f00628071","55b9ff0e04775a2f00628072","55b9ff4604775a2f00628073","55b9ff5fd72d1e1900276a38","55b9ff7f04775a2f00628074","55b9ff90eb08801900f833e5","55b9ffa5d72d1e1900276a39","55b9ffca04775a2f00628075","55b9fffdd72d1e1900276a3a","56bc2f033ee9e70d008b46af","56c2f6efbbf9ec2d00e0fe4f","57595bbb18760817001e8bbe","57d8d9793916800e003dde53"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-09-20T08:18:04.018Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[**Download Sample**](https://github.com/Pushwoosh/pushwoosh-react-native-sample)\n[**Module API Docs**](http://docs.pushwoosh.com/docs/reactnative-api-reference) \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Step 1 – Install plugin\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"npm install pushwoosh-react-native-plugin --save\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Step 2 – Include PushwooshPlugin project\"\n}\n[/block]\nDrag the **PushwooshPlugin.xcodeproj** (located in **node_modules/pushwoosh-react-native-plugin/src/ios**) as a dependency project into your React Native XCode project.\nLink your project with **libPushwooshPlugin.a**, **libstdc++** and **libz** libraries.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Step 3 – Enable Push Notifications\"\n}\n[/block]\nEnable **Push Notifications** in the **Capabilities** section.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/c81a9f5-Screen_Shot_2016-09-20_at_14.39.50.png\",\n        \"Screen Shot 2016-09-20 at 14.39.50.png\",\n        751,\n        181,\n        \"#d8d7d2\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Step 4 – Use module\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"var Pushwoosh = require('pushwoosh-react-native-plugin');\\n\\nPushwoosh.init({ \\\"pw_appid\\\" : \\\"YOUR_PUSHWOOSH_PROJECT_ID\\\" });\\nPushwoosh.register();\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"react-native-ios-module","type":"basic","title":"React Native iOS Module"}

React Native iOS Module


[**Download Sample**](https://github.com/Pushwoosh/pushwoosh-react-native-sample) [**Module API Docs**](http://docs.pushwoosh.com/docs/reactnative-api-reference) [block:api-header] { "type": "basic", "title": "Step 1 – Install plugin" } [/block] [block:code] { "codes": [ { "code": "npm install pushwoosh-react-native-plugin --save", "language": "shell" } ] } [/block] [block:api-header] { "type": "basic", "title": "Step 2 – Include PushwooshPlugin project" } [/block] Drag the **PushwooshPlugin.xcodeproj** (located in **node_modules/pushwoosh-react-native-plugin/src/ios**) as a dependency project into your React Native XCode project. Link your project with **libPushwooshPlugin.a**, **libstdc++** and **libz** libraries. [block:api-header] { "type": "basic", "title": "Step 3 – Enable Push Notifications" } [/block] Enable **Push Notifications** in the **Capabilities** section. [block:image] { "images": [ { "image": [ "https://files.readme.io/c81a9f5-Screen_Shot_2016-09-20_at_14.39.50.png", "Screen Shot 2016-09-20 at 14.39.50.png", 751, 181, "#d8d7d2" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "Step 4 – Use module" } [/block] [block:code] { "codes": [ { "code": "var Pushwoosh = require('pushwoosh-react-native-plugin');\n\nPushwoosh.init({ \"pw_appid\" : \"YOUR_PUSHWOOSH_PROJECT_ID\" });\nPushwoosh.register();", "language": "javascript" } ] } [/block]