{"__v":1,"_id":"57d8da173916800e003dde56","category":{"project":"5540ce1b31827a0d007ab1cc","version":"5540ce1c31827a0d007ab1cf","_id":"57d8d9793916800e003dde53","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-09-14T05:00:41.375Z","from_sync":false,"order":25,"slug":"unreal-engine","title":"Unreal Engine"},"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-14T05:03:19.767Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"Supports iOS, Android\"\n}\n[/block]\n[**Download Plugin**](https://github.com/Pushwoosh/pushwoosh-unreal-engine/tree/master/Plugins/Pushwoosh)\n[**Download Sample**](https://github.com/Pushwoosh/pushwoosh-unreal-engine)\n[**Plugin API Docs**](https://github.com/Pushwoosh/pushwoosh-unreal-engine/blob/master/Plugins/Pushwoosh/Documentation/README.md) \n\nTo integrate Pushwoosh into your Unreal Engine project:\n\n**1.** Download [Pushwoosh Plugin](https://github.com/Pushwoosh/pushwoosh-unreal-engine/Plugins/Pushwoosh) and put it in your **Plugins** folder.\n\n**2.** Enable **Pushwoosh** module in **YourProjectName.uproject**:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"Plugins\\\": [\\n  {\\n    \\\"Name\\\": \\\"Pushwoosh\\\",\\n    \\\"Enabled\\\": true\\n  }\\n],\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n**3.** Add `Pushwoosh` module to the dependency list of you project:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"PrivateDependencyModuleNames.AddRange(new string[] { \\\"Pushwoosh\\\" });\",\n      \"language\": \"csharp\",\n      \"name\": null\n    }\n  ]\n}\n[/block]\n**4.** Recompile your project.\n\n**5.** Specify **Pushwoosh Application Id** and **GCM Project Number** in **Project Settings...-> Plugins -> Pushwoosh**\n\n**6.** Initialize Pushwoosh plugin and register for push notifications:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"if (FPushwooshModule::IsAvailable())\\n{\\n\\t\\tFPushwooshModule& pushwoosh = FPushwooshModule::Get();\\n\\t\\tpushwoosh.Initialize();\\n\\t\\tpushwoosh.RegisterForPushNotifications();\\n}\",\n      \"language\": \"cplusplus\"\n    }\n  ]\n}\n[/block]\n**7.** (Optional) set push registration and push notification listeners before initializing plugin:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"void YourComponent::InitPushwooshListeners()\\n{\\n\\tFPushwooshModule::PushRegistrationSucceeded.AddUObject(this, &YourComponent::PushRegistrationSucceeded_Handler);\\n\\tFPushwooshModule::PushRegistrationError.AddUObject(this, &YourComponent::PushRegistrationError_Handler);\\n\\tFPushwooshModule::PushAccepted.AddUObject(this, &YourComponent::PushAccepted_Handler);\\n}\\n\\nvoid YourComponent::PushRegistrationSucceeded_Handler(FString token)\\n{\\n\\t// TODO: handle successful registration\\n}\\n\\nvoid YourComponent::PushRegistrationError_Handler(FString error)\\n{\\n\\t// TODO: handle push registration error\\n}\\n\\nvoid YourComponent::PushAccepted_Handler(FString data)\\n{\\n\\t// TODO: handle push open\\n}\",\n      \"language\": \"cplusplus\"\n    }\n  ]\n}\n[/block]\n**8.** For iOS add **Push Notifications** Capability to your project. This can be done by adding following key-value pair in **Intermediate/ProjectFilesIOS/build/${YourProject}.build/${Configuration}-iphoneos/${YourProject}.build/${YourProject}.app.xcent**:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<key>aps-environment</key>\\n<string>development</string>\",\n      \"language\": \"xml\",\n      \"name\": \"development\"\n    },\n    {\n      \"code\": \"<key>aps-environment</key>\\n<string>production</string>\",\n      \"language\": \"xml\",\n      \"name\": \"production\"\n    }\n  ]\n}\n[/block]\n**9.** For Android [make sure](http://docs.pushwoosh.com/docs/resolving-google-play-services-conflicts#4-unreal-engine) Unreal Engine and Pushwoosh Plugin does not have conflicting libraries.","excerpt":"","slug":"unreal-engine-cpp","type":"basic","title":"C++"}
[block:callout] { "type": "success", "body": "Supports iOS, Android" } [/block] [**Download Plugin**](https://github.com/Pushwoosh/pushwoosh-unreal-engine/tree/master/Plugins/Pushwoosh) [**Download Sample**](https://github.com/Pushwoosh/pushwoosh-unreal-engine) [**Plugin API Docs**](https://github.com/Pushwoosh/pushwoosh-unreal-engine/blob/master/Plugins/Pushwoosh/Documentation/README.md) To integrate Pushwoosh into your Unreal Engine project: **1.** Download [Pushwoosh Plugin](https://github.com/Pushwoosh/pushwoosh-unreal-engine/Plugins/Pushwoosh) and put it in your **Plugins** folder. **2.** Enable **Pushwoosh** module in **YourProjectName.uproject**: [block:code] { "codes": [ { "code": "\"Plugins\": [\n {\n \"Name\": \"Pushwoosh\",\n \"Enabled\": true\n }\n],", "language": "json" } ] } [/block] **3.** Add `Pushwoosh` module to the dependency list of you project: [block:code] { "codes": [ { "code": "PrivateDependencyModuleNames.AddRange(new string[] { \"Pushwoosh\" });", "language": "csharp", "name": null } ] } [/block] **4.** Recompile your project. **5.** Specify **Pushwoosh Application Id** and **GCM Project Number** in **Project Settings...-> Plugins -> Pushwoosh** **6.** Initialize Pushwoosh plugin and register for push notifications: [block:code] { "codes": [ { "code": "if (FPushwooshModule::IsAvailable())\n{\n\t\tFPushwooshModule& pushwoosh = FPushwooshModule::Get();\n\t\tpushwoosh.Initialize();\n\t\tpushwoosh.RegisterForPushNotifications();\n}", "language": "cplusplus" } ] } [/block] **7.** (Optional) set push registration and push notification listeners before initializing plugin: [block:code] { "codes": [ { "code": "void YourComponent::InitPushwooshListeners()\n{\n\tFPushwooshModule::PushRegistrationSucceeded.AddUObject(this, &YourComponent::PushRegistrationSucceeded_Handler);\n\tFPushwooshModule::PushRegistrationError.AddUObject(this, &YourComponent::PushRegistrationError_Handler);\n\tFPushwooshModule::PushAccepted.AddUObject(this, &YourComponent::PushAccepted_Handler);\n}\n\nvoid YourComponent::PushRegistrationSucceeded_Handler(FString token)\n{\n\t// TODO: handle successful registration\n}\n\nvoid YourComponent::PushRegistrationError_Handler(FString error)\n{\n\t// TODO: handle push registration error\n}\n\nvoid YourComponent::PushAccepted_Handler(FString data)\n{\n\t// TODO: handle push open\n}", "language": "cplusplus" } ] } [/block] **8.** For iOS add **Push Notifications** Capability to your project. This can be done by adding following key-value pair in **Intermediate/ProjectFilesIOS/build/${YourProject}.build/${Configuration}-iphoneos/${YourProject}.build/${YourProject}.app.xcent**: [block:code] { "codes": [ { "code": "<key>aps-environment</key>\n<string>development</string>", "language": "xml", "name": "development" }, { "code": "<key>aps-environment</key>\n<string>production</string>", "language": "xml", "name": "production" } ] } [/block] **9.** For Android [make sure](http://docs.pushwoosh.com/docs/resolving-google-play-services-conflicts#4-unreal-engine) Unreal Engine and Pushwoosh Plugin does not have conflicting libraries.