{"_id":"56d9822add90610b002708a1","category":{"_id":"55a4ff5b2e70c0250038050f","pages":["55a4ff7d750a9a23005332af","55a4ff8b750a9a23005332b1","55a4ff9b750a9a23005332b3","55a60bfcaaf9cf1900114efb","55a6184880c8a30d00b32526","55a61ba780c8a30d00b32532","55a61c97aaf9cf1900114f40","55a61ea9aaf9cf1900114f48","55a6206580c8a30d00b32544","55a64277aaf9cf1900114fc2","55a694d1aaf9cf1900115102","55a6a23eaaf9cf19001151e2","55a6a9b389c9da1900e2a41d","55a6aba45f88a70d0065b255","55a90687c8bd450d000dd157","55af84f3aa902f1700300daa","55afa3e3902fd51700f5f858","55b0cc5cb3171b3700b153fa","56015bdc3aa0520d00da0ced","5603fe3490ee490d004404c2","5633dd18d28a340d004004f5","56448c697a8cb50d00a3ea3f","56d7a2ec5208281500a2506c","56d859b8b159f10b00304577","56d9822add90610b002708a1","56ef44c6e8d6fa17006f244f"],"version":"5540ce1c31827a0d007ab1cf","project":"5540ce1b31827a0d007ab1cc","__v":26,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-14T12:23:55.603Z","from_sync":false,"order":2,"slug":"features","title":"Features"},"user":"5540e0f5bb9e762d00f594c0","__v":9,"project":"5540ce1b31827a0d007ab1cc","parentDoc":null,"version":{"_id":"5540ce1c31827a0d007ab1cf","project":"5540ce1b31827a0d007ab1cc","__v":31,"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-03-04T12:40:10.792Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":25,"body":"Trust is something you can build over time and lose in a blink of an eye. Once you've brought people into your app, you want to have a long-term relationship with them, and app crashes can become a deal-breaker.  \n\nWhat if you had a chance to say \"I'm sorry\" in a very personal way? Such as your stats show that 30% of your users experiencing a crash with the latest release, and you just need to tell them to update in order to deliver a fix. However, other 70% might not be happy hearing about possible issues with the app they love so much. \n\nHere's where we step in to assist. Crashlytics and Pushwoosh integration is very simple. With just a few lines of code you would be able to target and notify only those users who experienced particular crash in the app, without having to bother the rest of your audience.\n\nLet's see how it works.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Integrating Crashlytics\"\n}\n[/block]\nFirst of all, we have to feed some identifier to Crashlytics that will help us to target user later.\nCrashlytics provides **setUserIdentifier** method for this purpose (link to [iOS](https://docs.fabric.io/ios/crashlytics/enhanced-reports.html#user-identifiers), link to [Android](https://docs.fabric.io/android/crashlytics/enhanced-reports.html#user-information)).\n\nIn our case we need to set it to Pushwoosh Hardware ID. As you may know Pushwoosh Hardware ID is *IDFV* (or *IDFA* if you link to *AdSupport.framework*) on iOS and in most of the cases *Android Id* or *Serial Number* on Android.\n\nThis code makes it simple:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"String userId = pushManager.getPushwooshHWID(this);\\nCrashlytics.setUserIdentifier(userId);\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"NSString * userId = [[PushNotificationManager pushManager] getHWID];\\n[Crashlytics setUserIdentifier:userId];\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\nThat's it! Now you are collecting user IDs with Crashlytics.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"2. Downloading User Ids from the crash reports in Crashlytics\"\n}\n[/block]\nPlease note that it may take up to 24 hours as per Fabric documentation for the \"Export Id's\" button to appear on the crash detail report in the Crashlytics dashboard.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/MAzhvEPTGahrd96g4V5w_crashlytics_export_id1.png\",\n        \"crashlytics_export_id1.png\",\n        \"620\",\n        \"403\",\n        \"\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nClick on the *Export Ids* button will download *user-data.csv* file.\nThe file has the following structure:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"userId,email,name,mostRecentTimestamp,count\\nXXXXXXXXXXXXXXXX,test:::at:::example.com,John Snow,MAR 03 2016 01:22,1\\nYYYYYYYYYYYYYYYY,another@example.com,John Snow Jr,MAR 03 2016 01:11,1\\n\",\n      \"language\": \"javascript\",\n      \"name\": \"user-data.csv\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"3. Using CSV file to send push notification\"\n}\n[/block]\nThen simply use Pushwoosh **\"Upload CSV\"** functionality to send pushes via the CSV file!\nUpload the file, select Push Preset and send!\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/6948dd6-Pushwoosh.png\",\n        \"Pushwoosh.png\",\n        1742,\n        976,\n        \"#eeeeef\"\n      ],\n      \"sizing\": \"full\",\n      \"border\": false\n    }\n  ]\n}\n[/block]","excerpt":"*Win your users back*","slug":"crashlytics-integration","type":"basic","title":"Crashlytics Integration"}

Crashlytics Integration

*Win your users back*

Trust is something you can build over time and lose in a blink of an eye. Once you've brought people into your app, you want to have a long-term relationship with them, and app crashes can become a deal-breaker. What if you had a chance to say "I'm sorry" in a very personal way? Such as your stats show that 30% of your users experiencing a crash with the latest release, and you just need to tell them to update in order to deliver a fix. However, other 70% might not be happy hearing about possible issues with the app they love so much. Here's where we step in to assist. Crashlytics and Pushwoosh integration is very simple. With just a few lines of code you would be able to target and notify only those users who experienced particular crash in the app, without having to bother the rest of your audience. Let's see how it works. [block:api-header] { "type": "basic", "title": "1. Integrating Crashlytics" } [/block] First of all, we have to feed some identifier to Crashlytics that will help us to target user later. Crashlytics provides **setUserIdentifier** method for this purpose (link to [iOS](https://docs.fabric.io/ios/crashlytics/enhanced-reports.html#user-identifiers), link to [Android](https://docs.fabric.io/android/crashlytics/enhanced-reports.html#user-information)). In our case we need to set it to Pushwoosh Hardware ID. As you may know Pushwoosh Hardware ID is *IDFV* (or *IDFA* if you link to *AdSupport.framework*) on iOS and in most of the cases *Android Id* or *Serial Number* on Android. This code makes it simple: [block:code] { "codes": [ { "code": "String userId = pushManager.getPushwooshHWID(this);\nCrashlytics.setUserIdentifier(userId);", "language": "java" }, { "code": "NSString * userId = [[PushNotificationManager pushManager] getHWID];\n[Crashlytics setUserIdentifier:userId];", "language": "objectivec" } ] } [/block] That's it! Now you are collecting user IDs with Crashlytics. [block:api-header] { "type": "basic", "title": "2. Downloading User Ids from the crash reports in Crashlytics" } [/block] Please note that it may take up to 24 hours as per Fabric documentation for the "Export Id's" button to appear on the crash detail report in the Crashlytics dashboard. [block:image] { "images": [ { "image": [ "https://files.readme.io/MAzhvEPTGahrd96g4V5w_crashlytics_export_id1.png", "crashlytics_export_id1.png", "620", "403", "", "" ] } ] } [/block] Click on the *Export Ids* button will download *user-data.csv* file. The file has the following structure: [block:code] { "codes": [ { "code": "userId,email,name,mostRecentTimestamp,count\nXXXXXXXXXXXXXXXX,test@example.com,John Snow,MAR 03 2016 01:22,1\nYYYYYYYYYYYYYYYY,another@example.com,John Snow Jr,MAR 03 2016 01:11,1\n", "language": "javascript", "name": "user-data.csv" } ] } [/block] [block:api-header] { "type": "basic", "title": "3. Using CSV file to send push notification" } [/block] Then simply use Pushwoosh **"Upload CSV"** functionality to send pushes via the CSV file! Upload the file, select Push Preset and send! [block:image] { "images": [ { "image": [ "https://files.readme.io/6948dd6-Pushwoosh.png", "Pushwoosh.png", 1742, 976, "#eeeeef" ], "sizing": "full", "border": false } ] } [/block]