website logo
โŒ˜K
๐Ÿš€Welcome to Eyrene
๐ŸŽ‰What's New
๐Ÿ˜ŽTutorials
๐Ÿ“ฑMobile App
๐Ÿ’ปWeb Portal
๐Ÿ”ŒAPI
Docs powered byย archbeeย 

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:

ObjectiveC
|

Token

Access token to the Eyrene app. It is needed to start the visit.

ObjectiveC
|

AgentID

AgentID - user ID for identification in the system.

ObjectiveC
|

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

ObjectiveC
|

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

ObjectiveC
|

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:

ObjectiveC
|

Request parameters

visitId string

๏ปฟRequired. Visit ID.

customerIdย string

๏ปฟ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:

ObjectiveC
|

To receive visit information from the Eyrene app, subscribe to the ICDeepLinkDelegate.

ObjectiveC
|

In this case, the method

ObjectiveC
|

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.

Updated 14 Apr 2022
Did this page help you?
Yes
No
Docs powered byย archbeeย 
TABLE OF CONTENTS
1. Install and configure the SDK
Scheme
Token
AgentID
2. Sync Master Data
Request example
Response example
Response parameters
3. Start a visit
Request parameters
4. Return from the Eyrene app