Integrating iOS SDK
Integrating with the Sample iOS App
Procedure
- Add and copy Discover.framework (within the DiscoverDynamic folder created on Desktop) to the project.
- Also add Discover.framework to the , Libraries, and Embedded Content section.
- Remove the library added by default in , within Libraries section.
-
Add
DCXCoreSettingsand DCFResources folder to the sample project so that you can play around with the settings values. These resource bundle files are available in the Discover project. -
In the Appdelegate file, add import Discover and one
line of code to make the SDK track events and user actions.
Add
DCFApplicationHelper.sharedInstance().enableDiscoverFramework()in applicationdidFinishLaunchingmethod. -
To enable debug logs in the console, add the following code in the
environment variables section of edit scheme:
DCX_DEBUG = 1 DCF_DEBUG = 1 IDEPreferLogStreaming = YES
Using Discover Framework Added to the Project
Procedure
- Make changes and pass values to the SDK through the files added in the DCXCoreSettings and DCFResources folder.
- Post the data from the sample app to the endpoint by adding the post URL in .
-
To take screenshot, change the values for params in
HCLGlobalScreenSettingsdictionary as shown in the following example:"takeScreenShot": true, "screenShotBlur" : 10 -
To blur the screenshot, complete the following steps:
-
To take screenshots with different blur values for different screens,
complete the following steps:
-
To take screenshots without blur, pass
screenShotBlurvalue as 0 inHCLGlobalScreenSettings. No code changes are needed in theViewControllersor screens. This will create screenshots without blur.
Creating Distribution Builds or Creating Archives
Procedure
-
To create an archive or install the sample app with SDK in an actual iOS
device, add
arm64architecture to Excluded Architectures section of debug and release the app. -
Make the earlier changes for the following targets:
- Discover, AutoPackageDiscover of Discover project
- Discover, DiscoverFatFrameworkBeta of DynamicFrameworks project