iOS SDK
Start the SDK
forterMobileUID
8 min
ios unique identifiers why does forter need a unique identifier? in the sdk forter's sdk requires a unique mobile device identifier to connect connect the activity and behavioural data collected by the sdk to the specific device and user this identifier should be specific to ios device in the order api if/when a customer makes a purchase from the mobile app, the unique identifier must be included as the fortermobileuid value in the connectioninformation object of the forter orders api https //docs forter com/reference/order v3 since the orders api call is made entirely from your system's backend, this id should be retrievable from the https request headers and in the same casing as the value generated in the forter sdk in the case of native mobile app orders, make sure that the following fields are populated ordertype "mobile", "ios", or "android" depending on your os (mobile can be used for either os) fortermobileuid should be populated instead of the fortertokencookie if your app is fully native, including your checkout page mobileappversion should reflect the version of the app the user is on { "orderid" "example order fdse0rr489", "ordertype" "ios", "timesenttoforter" 1415287568000, "checkouttime" 1415273168, "connectioninformation" { "customerip" "107 57 208 5", "useragent" "teststore 18 4 1 rv 184100001 (iphone; ios 12 4 1; en us; iphone10,3)", "fortermobileuid" "6a9798ag16ff41f7b6b9878dd488add5 c2vzc2lvbnrva2vuagvyzq== cf4 es4", "mobileappversion" "18 4 1" }, "totalamount" { "amountusd" "99 95" } } getting the right identifier for sdk version 3 0 0 and above the value returned by \[fortersdk getfortertoken] should be used as the fortermobileuid in the connectioninformation https //portal forter com/api/data objects/connectioninformation object of the server side order api do not store or reuse a previously retrieved token the token is refreshed throughout the sdk lifecycle, so you must always call fortersdk getinstance() getfortertoken() at checkout and send the latest value to the server side order api for sdk versions prior to 3 0 0 the value passed to fortersdk's setdeviceuniqueidentifier method should be used as the fortermobileuid in the connectioninformation https //portal forter com/api/data objects/connectioninformation object of the server side order api casing ensure that the fortermobileuid is passed to the order api in exactly the same casing as returned by the sdk forter does not enforce uppercase or lowercase, but any mismatch will prevent correct linkage between sdk device data and backend order api data provide account identifiers (recommended) if your app also leverages a separate account identifier and/or social network connectors/3rd party authentication mechanisms, please provide us with the account ids received from those 3rd party services note account identifiers should be passed to the accountowner accountid field in the order api and not the fortermobileuid field for example if you use a facebook social connector, you can provide us with the account id by calling \[\[fortersdk sharedinstance] setaccountidentifier @"the fb account id" withtype\ ftrsdkaccountidtypefacebook]; to pass any existing account identifiers currently used by your mobile app, use \[\[fortersdk sharedinstance] setaccountidentifier @"the user's account id" withtype\ ftrsdkaccountidtypemerchant]; do not provide https //en wikipedia org/wiki/personally identifiable information as an identifier if you use the user's email address as an id, encode/hash it before sending