{"category":{"version":"588861fa165af631008ee1b8","project":"54861bb654b3ce0b00367292","_id":"588861fa165af631008ee1ba","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-12-08T21:55:25.679Z","from_sync":false,"order":1,"slug":"1-setup","title":"iOS / App Triggers"},"parentDoc":null,"project":"54861bb654b3ce0b00367292","user":"54861b9f3681d914006992a4","version":{"__v":1,"_id":"588861fa165af631008ee1b8","project":"54861bb654b3ce0b00367292","createdAt":"2017-01-25T08:29:46.061Z","releaseDate":"2017-01-25T08:29:46.061Z","categories":["588861fa165af631008ee1b9","588861fa165af631008ee1ba","588861fa165af631008ee1bb","588861fa165af631008ee1bc","588861fa165af631008ee1bd","588861fa165af631008ee1be","588861fa165af631008ee1bf","588861fa165af631008ee1c0","588861fa165af631008ee1c1","588861fa165af631008ee1c2","588861fa165af631008ee1c3","588861fa165af631008ee1c4","588861fa165af631008ee1c5","588861fa165af631008ee1c6","588861fa165af631008ee1c7","588861fa165af631008ee1c8","588861fa165af631008ee1c9"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"5.0.0","version":"5.0"},"_id":"588861fa165af631008ee1d2","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-09-08T09:26:33.843Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"ECSessionParams object has a \"settings\" property for defining the following pre defined settings:\n\n**On launch version** - version string for on launch moment\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"params.settings.onLaunchVersion = :::at:::\\\"1.0\\\";\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"params.settings.onLaunchVersion = \\\"1.0\\\"\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n**Connection timeout**\nThe maximum time the SDK awaits a response.\nDefault value: 20 seconds\n\nPlease see the fallback protocol here: [[Advanced] Response protocol](doc:advanced-response-protocol) \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[params.settings setConnectionTimeout:(20)];\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"params.settings.setConnectionTimeout(20)\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n**Image connection timeout**\nThe maximum time the SDK awaits image downloads.\nDefault value: 5 seconds per Image\n\nThe fallback protocol is displayed here: [[Advanced] Response protocol](doc:advanced-response-protocol) \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[params.settings setImageDownloadTimeout:(NSUInteger)];\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"params.settings. setImageDownloadTimeout(timeout: UInt)\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n**Offline mode**\nOffline mode allows you to build experiences and run them locally on your device without connecting to the Elasticode system. To get started, simply export the experiences to your device: [Export an Experience](doc:export-an-experience) )\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Please read before implementing:\",\n  \"body\": \"After using this function, you will not be able to update/change/AB test/personalize in production until the next version is resubmitted​ to production and released.\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[params.settings offlineMode];\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"params.settings. offlineMode()\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n**Disable onboarding**\nYou can disable On Launch moment all together via your code (you can also do it VIA the dashboard instead) \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[params.settings disableOnLaunch:(BOOL)];\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"params.settings. disableOnLaunch(disable: Bool)\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n**Disable on Launch on timeout**\nChoose the following to disable offline onboarding after timeout.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Relevant only in case of an offline \\\"app launch moment\\\" on the device\",\n  \"title\": \"When a local default experience is set\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[params.settings onTimeoutDisableOnLaunch:(BOOL)];\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"params.settings. onTimeoutDisableOnLaunch(disable: Bool)\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]","excerpt":"IOS / APP TRIGGERS: Extra session settings","slug":"extra-session-settings","type":"basic","title":"Extra session settings"}

Extra session settings

IOS / APP TRIGGERS: Extra session settings

ECSessionParams object has a "settings" property for defining the following pre defined settings: **On launch version** - version string for on launch moment [block:code] { "codes": [ { "code": "params.settings.onLaunchVersion = @\"1.0\";", "language": "objectivec" }, { "code": "params.settings.onLaunchVersion = \"1.0\"", "language": "swift" } ] } [/block] **Connection timeout** The maximum time the SDK awaits a response. Default value: 20 seconds Please see the fallback protocol here: [[Advanced] Response protocol](doc:advanced-response-protocol) [block:code] { "codes": [ { "code": "[params.settings setConnectionTimeout:(20)];", "language": "objectivec" }, { "code": "params.settings.setConnectionTimeout(20)", "language": "swift" } ] } [/block] **Image connection timeout** The maximum time the SDK awaits image downloads. Default value: 5 seconds per Image The fallback protocol is displayed here: [[Advanced] Response protocol](doc:advanced-response-protocol) [block:code] { "codes": [ { "code": "[params.settings setImageDownloadTimeout:(NSUInteger)];", "language": "objectivec" }, { "code": "params.settings. setImageDownloadTimeout(timeout: UInt)", "language": "swift" } ] } [/block] **Offline mode** Offline mode allows you to build experiences and run them locally on your device without connecting to the Elasticode system. To get started, simply export the experiences to your device: [Export an Experience](doc:export-an-experience) ) [block:callout] { "type": "danger", "title": "Please read before implementing:", "body": "After using this function, you will not be able to update/change/AB test/personalize in production until the next version is resubmitted​ to production and released." } [/block] [block:code] { "codes": [ { "code": "[params.settings offlineMode];", "language": "objectivec" }, { "code": "params.settings. offlineMode()", "language": "swift" } ] } [/block] **Disable onboarding** You can disable On Launch moment all together via your code (you can also do it VIA the dashboard instead) [block:code] { "codes": [ { "code": "[params.settings disableOnLaunch:(BOOL)];", "language": "objectivec" }, { "code": "params.settings. disableOnLaunch(disable: Bool)", "language": "swift" } ] } [/block] **Disable on Launch on timeout** Choose the following to disable offline onboarding after timeout. [block:callout] { "type": "info", "body": "Relevant only in case of an offline \"app launch moment\" on the device", "title": "When a local default experience is set" } [/block] [block:code] { "codes": [ { "code": "[params.settings onTimeoutDisableOnLaunch:(BOOL)];", "language": "objectivec" }, { "code": "params.settings. onTimeoutDisableOnLaunch(disable: Bool)", "language": "swift" } ] } [/block]