API
Deeplink
iOS
to work with eyrene deeplink on ios 1\ install and configure the sdk to install the sdk, add the icdeeplink framework file to the project to start working with the eyrene api, configure the scheme , token , and agentid parameters scheme a scheme is needed so that you can return to your application add a new scheme under url types and run \[icdeeplink shared] scheme = @"string"; token access token to the eyrene app it is needed to start the visit \[icdeeplink shared] token = @"string"; agentid agentid user id for identification in the system \[icdeeplink shared] agentid = @"string"; 2\ sync master data to work with the app offline, sync master data note we recommend syncing data once at the beginning of the day, with stable internet to synchronize master data, specify a token, a list of stores, and a synchronization command request example \[\[icdeeplink shared] startsynclistcustomerid @\[ @"id1", @"id2", @"id3" ]]; when synchronization is complete, control from the eyrene app will be back to the calling application the calling application receives the synchronization status in the delegate method if synchronization fails, an error code will be returned in the response response example (void)syncstatus (bool)status witherrorcode (nsnumber nullable)errorcode; response parameters status boolean sync status if the value is yes synchronization was successful, no there was a problem with the exchange in this case, retry synchronization errorcode integer error code 1201 — no internet connection; 1202 — sync canceled by the user; 1203 — time limit exceeded; 1204 — problems with sync in eyrene 3\ start a visit to start or view a visit, call the function (void)openvisitid (nsstring nonnull)visitid withcustomerid (nsstring nonnull)customerid withfilter (nsstring nullable)filter withreadonly (bool)readonly; request parameters visitid string required required visit id customerid string required required store id for the visit filter string task filter a regular expression for filtering tasks by name if you have specified a filter, the visit will display tasks that match the specified filter readonly boolean opens the visit read only tasks are view only 4\ return from the eyrene app after the user clicks "return", control from the eyrene app will be back to the calling application to handle this event, define a function (bool)application (uiapplication )app openurl (nsurl )url options (nsdictionary\<uiapplicationopenurloptionskey, id> )options { return \[\[icdeeplink shared] proceeddeeplink\ url]; } to receive visit information from the eyrene app, subscribe to the icdeeplinkdelegate \[icdeeplink shared] delegate = self; in this case, the method (void)recivevisitid (nsstring nonnull)visitid customerid (nsstring nonnull)customerid userinfo (nsdictionary nonnull)userinfo; will be called during control transfer to the calling application additional data arrives in the userinfo dictionary the following keys are available in the current version total images — the total number of photos in the visit in future versions of the sdk, the set of keys in userinfo may be expanded