Echo iOS Config Notes
See Echo Client iOS readme for minimum supported iOS version.
Table of contents
- Installation
- Privacy manifest
- Allowing cookies
- LSApplicationQueriesSchemes
- NSException Domains
- Use of webviews and cookies
Installation
In order to use Echo iOS with your product, you need to use CocoaPods.
Here is an example Podfile that includes Echo:
# This is required as Echo is published to the MAP repo
source 'git@github.com:bbc/map-ios-podspecs.git'
target 'MyApp' do
use_frameworks!
# Change the version number (x.x.x) as appropriate
pod 'echo-client-ios-swift', '~> x.x.x'
end
After adding the Echo dependency to your Podfile
, run pod install
to add Echo to your project.
Privacy manifest
Below you’ll find the privacy manifest settings that are included in Echo iOS
App Privacy Configuration
Key | Value |
---|---|
Privacy Tracking Domains | N/A |
Privacy Tracking Enabled | NO |
Privacy Nutrition Label Types
Key | Value |
---|---|
Collected Data Type | Product Interaction |
Linked to User | YES |
Used for Tracking | NO |
Key | Value | Value 2 |
---|---|---|
Collection Purposes | Product Personalization | Analytics |
Privacy Accessed API Types
Privacy Accessed API Type | Privacy Accessed API Reasons |
---|---|
System Boot Time | System Boot Time - 35F9.1: Measure time on-device, per documentation |
User Defaults | User Defaults - CA92.1: Access info from same app, per documentation |
XML Version of the Privacy Manifest
PrivacyInfo.xcprivacy <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeProductInteraction</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<true/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeProductPersonalization</string>
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
</array>
</dict>
</array>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
</array>
</dict>
</plist>
Xcode Screenshot of the Privacy manifest
Xcode Screenshot of the Privacy manifest Allowing cookies
Echo depends on the value of the following cookies being preserved. This applies to both webviews and HTTP clients. Please ensure that you add these cookies to the BBC auth toolkit whitelist, etc. You do not need to allow cookies for delegates that you do not utilise (ie at the moment this only applies to those products that report to BARB).
Delegate | Domain | Cookie | Notes |
---|---|---|---|
BARB | .2cnt.net | i00 | BARB/Kantar device ID |
LSApplicationQueriesSchemes
Apps built on the iOS9 SDK (or above) will need to whitelist the URL schemes (listed below) for which they need to be able to call canOpenURL.
When BARB is enabled the Echo library checks for the presence of the BARB panel application (presumably to see if the user is a member of that group). On iOS, it does this using the canOpenURL method on UIApplication to check whether the custom URL scheme barbPanelApp can be opened.
Here is the list of key/values that you will need to add to your Info.plist:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>barbPanelApp</string>
<string>gb.tns.ipm</string>
</array>
For further information please visit:
http://stackoverflow.com/questions/30987986/ios-9-not-opening-instagram-app-with-url-scheme
NSException Domains
If you are using iOS9 or above and you have NSAppTransportSecurity = false set in your Info.plist file, then you will need to add additional keys (listed below) to avoid NSAppTransportSecurity exceptions.
If you have NSAppTransportSecurity = true then you do not need to add any additional keys.
This is to allow Echo to communicate with non-secure (http) domains.
Here is the list of key/values that you will need to add:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSExceptionDomains</key>
<dict>
<key>bbc.co.uk</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>2cnt.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>scorecardresearch.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
For further information please visit:
Use of webviews and cookies
At this point in time Echo iOS only supports setting cookies within a WKWebView. Other webviews such as UIWebView and SFWebView are not supported. For more information on how and when to enable Webview Cookies see the IDv5 section.