{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","params":[],"results":{"codes":[]}},"next":{"description":"","pages":[]},"title":"Pulsate Inbox","type":"basic","slug":"showing-hiding-the-feed","excerpt":"","body":"[block:api-header]\n{\n  \"title\": \"Showing the Inbox\"\n}\n[/block]\nOne of the core parts of the Pulsate SDK is the Pulsate inbox. The message inbox is a fully featured interface that sits directly within your mobile App, it allows incoming campaign and conversation content to be rendered to your customers. It also allows customers to compose new messages directly to you.\n[block:image]\n{\n  \"images\": [\n    {\n      \"caption\": \"\",\n      \"image\": [\n        \"https://files.readme.io/WyyVqFK0SyKQjQfPCHMq_Screen%20Shot%202015-06-12%20at%2013.47.02.png\",\n        \"Screen Shot 2015-06-12 at 13.47.02.png\",\n        \"373\",\n        \"645\",\n        \"#5d3026\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nIn order to show the Feed / Inbox you need to get the Feed Navigation Controller and present it\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"PULPulsateManager* manager = [PULPulsateFactory getDefaultInstance];\\nUINavigationController* controller = [manager getFeedNavigationController];\\n[self presentViewController:controller animated:YES completion:^{\\n}];\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\nThe piece of code above will show the message inbox.\n\nThe message inbox can be closed by tapping on the *Back Button*.\n\nThe list of messages are fetched from the Pulsate server and cached locally for offline reading. Pulsate also offers campaign distribution to allow you to send custom campaigns via the message inbox.\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Feed Orientation\",\n  \"body\": \"We've designed the Pulsate Feed in Portrait mode in mind. It's highly recommended to use it in Portrait mode exclusively. Using landscape mode is possible, but not recommended for best UX experience.\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/2zY6zwmSjORe079FbFRV_Screen%20Shot%202015-11-17%20at%2010.19.41.png\",\n        \"Screen Shot 2015-11-17 at 10.19.41.png\",\n        \"1518\",\n        \"584\",\n        \"#152640\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Enabling / Disabling users from creating new Threads\"\n}\n[/block]\nThe Floating Action Button in the Feed allows users to create threads and send feedback from the App to Pulsate. By default this button is enabled, if you want to disable it all you need to do is call \"*setNewThreadButtonEnabled(false)*\". Make sure to call it in the onCreate methd of your Application.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// You can decide if you want the floating new thread button in Feed to be visible\\n// This is optional, the floating button is visible by default\\n[manager setNewThreadButtonEnabled:YES];\\n\\nUINavigationController* pulsateFeedNavController = [pulsateManager getFeedNavigationController];\\n\\n// present the Pulsate Navigation Controller\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// You can decide if you want the floating new thread button in Feed to be visible\\n// This is optional, the floating button is visible by default\\nmanager.newThreadButtonEnabled(true)\\n\\nvar pulsateFeedNavController: UINavigationController = pulsateManager.getFeedNavigationController()\\n\\n// present the Pulsate Navigation Controller \",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Showing the Feed in a UISplitViewController\"\n}\n[/block]\nFor bigger screens like iPads you might want to use the UISplitViewController to show the feed in size it was designed for.\n\nCreate a *UISplitViewController* either in the graphic designer or in code and just show the Pulsate Feed navigation controller in the detail pane. It’s that simple:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[mySplitViewController showDetailViewController:pulsateNavigationController sender:nil]\\n\\n\\n/*The Pulsate Feed was designed with iPhones in mind which are narrow, meanwhile iPads are very wide in Landscape mode. In order to make the detail pane more narrow:*/\\n\\nmySplitViewController.maximumPrimaryColumnWidth = 1000000; // enter your maximum\\nmySplitViewController.preferredPrimaryColumnWidthFraction = 0.5 // it’ll be divided in half\\n\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5f44d5c2084081031b8cdbea","createdAt":"2020-08-25T09:11:30.051Z","user":"57bc3654b9c7f0220009c77b","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"SDK Basic","slug":"sdk-basic","order":2,"from_sync":false,"reference":false,"_id":"5f44d202a2e3eb02b1c4c806","createdAt":"2020-08-25T08:55:30.447Z","version":"5e5013741b3b20006532951d","project":"54aa7f773b56130b0056c86e","__v":0},"version":{"version":"2.7","version_clean":"2.7.0","codename":"iOS SDK","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5e5013741b3b200065329486","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","5e5013741b3b200065329487","5e5013741b3b200065329488","5e5013741b3b200065329489","5e5013741b3b20006532948a","5e5013741b3b20006532948b","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","5e5013741b3b20006532948c","5e5013741b3b20006532948d","5c73dd27e8fdc000572a206a","5e5013741b3b20006532948e","5e53d9a2f75c0b0020de8935","5f44d1fbd1c58d040fdf03ba","5f44d202a2e3eb02b1c4c806","5f44d209703f05006a2a4fa9","5f44d210b1ba9f004200b689"],"_id":"5e5013741b3b20006532951d","project":"54aa7f773b56130b0056c86e","forked_from":"5e4fbbbda8fb41028f1861fe","__v":5,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z"},"project":"54aa7f773b56130b0056c86e","__v":0,"parentDoc":null}
[block:api-header] { "title": "Showing the Inbox" } [/block] One of the core parts of the Pulsate SDK is the Pulsate inbox. The message inbox is a fully featured interface that sits directly within your mobile App, it allows incoming campaign and conversation content to be rendered to your customers. It also allows customers to compose new messages directly to you. [block:image] { "images": [ { "caption": "", "image": [ "https://files.readme.io/WyyVqFK0SyKQjQfPCHMq_Screen%20Shot%202015-06-12%20at%2013.47.02.png", "Screen Shot 2015-06-12 at 13.47.02.png", "373", "645", "#5d3026", "" ] } ] } [/block] In order to show the Feed / Inbox you need to get the Feed Navigation Controller and present it [block:code] { "codes": [ { "code": "PULPulsateManager* manager = [PULPulsateFactory getDefaultInstance];\nUINavigationController* controller = [manager getFeedNavigationController];\n[self presentViewController:controller animated:YES completion:^{\n}];", "language": "objectivec" } ] } [/block] The piece of code above will show the message inbox. The message inbox can be closed by tapping on the *Back Button*. The list of messages are fetched from the Pulsate server and cached locally for offline reading. Pulsate also offers campaign distribution to allow you to send custom campaigns via the message inbox. [block:callout] { "type": "danger", "title": "Feed Orientation", "body": "We've designed the Pulsate Feed in Portrait mode in mind. It's highly recommended to use it in Portrait mode exclusively. Using landscape mode is possible, but not recommended for best UX experience." } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/2zY6zwmSjORe079FbFRV_Screen%20Shot%202015-11-17%20at%2010.19.41.png", "Screen Shot 2015-11-17 at 10.19.41.png", "1518", "584", "#152640", "" ] } ] } [/block] [block:api-header] { "title": "Enabling / Disabling users from creating new Threads" } [/block] The Floating Action Button in the Feed allows users to create threads and send feedback from the App to Pulsate. By default this button is enabled, if you want to disable it all you need to do is call "*setNewThreadButtonEnabled(false)*". Make sure to call it in the onCreate methd of your Application. [block:code] { "codes": [ { "code": "// You can decide if you want the floating new thread button in Feed to be visible\n// This is optional, the floating button is visible by default\n[manager setNewThreadButtonEnabled:YES];\n\nUINavigationController* pulsateFeedNavController = [pulsateManager getFeedNavigationController];\n\n// present the Pulsate Navigation Controller", "language": "objectivec" } ] } [/block] [block:code] { "codes": [ { "code": "// You can decide if you want the floating new thread button in Feed to be visible\n// This is optional, the floating button is visible by default\nmanager.newThreadButtonEnabled(true)\n\nvar pulsateFeedNavController: UINavigationController = pulsateManager.getFeedNavigationController()\n\n// present the Pulsate Navigation Controller ", "language": "swift" } ] } [/block] [block:api-header] { "type": "basic", "title": "Showing the Feed in a UISplitViewController" } [/block] For bigger screens like iPads you might want to use the UISplitViewController to show the feed in size it was designed for. Create a *UISplitViewController* either in the graphic designer or in code and just show the Pulsate Feed navigation controller in the detail pane. It’s that simple: [block:code] { "codes": [ { "code": "[mySplitViewController showDetailViewController:pulsateNavigationController sender:nil]\n\n\n/*The Pulsate Feed was designed with iPhones in mind which are narrow, meanwhile iPads are very wide in Landscape mode. In order to make the detail pane more narrow:*/\n\nmySplitViewController.maximumPrimaryColumnWidth = 1000000; // enter your maximum\nmySplitViewController.preferredPrimaryColumnWidthFraction = 0.5 // it’ll be divided in half\n", "language": "objectivec" } ] } [/block]