Make sure to add a property list file called SPDiagnoseConfig.plist
to your project. With the content:
<?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>appName</key>
<string>myApp</string>
<key>propertyId</key>
<integer>123</integer>
<key>accountId</key>
<integer>22</integer>
<key>key</key>
<string>YOUR KEY GOES HERE</string>
</dict>
</plist>
At this point, the Diagnose SDK can be declared as a dependency using Swift Package Manager (SPM).
Declare an @UIApplicationDelegateAdaptor
on your app:
@main
struct iOSExampleApp: App {
@UIApplicationDelegateAdaptor(SPDiagnoseAppDelegate.self) var appDelegate
}
On your app delegate, add a reference to SPDiagnose
and instantiate it during app launch:
public class SPDiagnoseAppDelegate: NSObject, UIApplicationDelegate {
var diagnose: SPDiagnose?
public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
diagnose = SPDiagnose()
return true
}
}
The Diagnose SDK leverages the iOS native URLProtocol
interface in order to intercept network calls made by your app and 3rd party libraries.
There are certain limitations, namely the fact that it can only intercept requests that use the URLSessionConfiguration.default
.
The SDK sends the request domain to Diagnose APIs. Our backend, based on a proprietary dictionary, maps the domain collected to a particular vendor name.
We're currently investigating whether we're able to intercept requests made by network libraries without interfering with Apple's App Store policies.
- Request domain (and domain only, no path, no query params, etc)
- The TCF consent string (stored by CMPs in the UserDefaults according to the TCF spec)
- Request timestamp
- IP address. IP is not collected in the client side, but is registered when our backend receives a request from the SDK.
No. The Diagnose SDK does not access the payload of the request and it is blind to the response as well. No access to cookie or any other data with the exception of the ones listed in the section above.