@dynatrace/cordova-plugin 2.327.1 → 2.329.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +47 -4
  2. package/files/iOS/Dynatrace.xcframework/Info.plist +11 -11
  3. package/files/iOS/Dynatrace.xcframework/_CodeSignature/CodeDirectory +0 -0
  4. package/files/iOS/Dynatrace.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
  5. package/files/iOS/Dynatrace.xcframework/_CodeSignature/CodeResources +87 -87
  6. package/files/iOS/Dynatrace.xcframework/_CodeSignature/CodeSignature +0 -0
  7. package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Dynatrace +0 -0
  8. package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Headers/Dynatrace.h +150 -50
  9. package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Info.plist +0 -0
  10. package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  11. package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios.abi.json +19 -5
  12. package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios.private.swiftinterface +1 -1
  13. package/files/iOS/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios.swiftinterface +1 -1
  14. package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Dynatrace +0 -0
  15. package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace.h +150 -50
  16. package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Info.plist +0 -0
  17. package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  18. package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  19. package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.abi.json +19 -5
  20. package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1 -1
  21. package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -1
  22. package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.abi.json +19 -5
  23. package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1 -1
  24. package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +1 -1
  25. package/files/iOS/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/_CodeSignature/CodeResources +23 -23
  26. package/files/iOS/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Dynatrace +0 -0
  27. package/files/iOS/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Headers/Dynatrace.h +150 -50
  28. package/files/iOS/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Info.plist +0 -0
  29. package/files/iOS/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/arm64-apple-tvos.swiftsourceinfo +0 -0
  30. package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Dynatrace +0 -0
  31. package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace.h +150 -50
  32. package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Info.plist +0 -0
  33. package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/arm64-apple-tvos-simulator.swiftsourceinfo +0 -0
  34. package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/x86_64-apple-tvos-simulator.swiftsourceinfo +0 -0
  35. package/files/iOS/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/_CodeSignature/CodeResources +11 -11
  36. package/files/plugin.gradle +1 -1
  37. package/networking/NativeNetworkInterceptorUtils.js +11 -1
  38. package/other/DynatraceCordovaPlugin.js +24 -5
  39. package/other/DynatraceCordovaPlugin.m +0 -1
  40. package/package.json +1 -1
  41. package/plugin.xml +2 -2
package/README.md CHANGED
@@ -31,8 +31,8 @@ For information as to why this is necessary, read more [here](#migration-from-ma
31
31
 
32
32
  These agent versions are configured in this plugin:
33
33
 
34
- * Android Agent: 8.327.2.1004
35
- * iOS Agent: 8.327.1.1020
34
+ * Android Agent: 8.329.1.1014
35
+ * iOS Agent: 8.329.1.1017
36
36
 
37
37
  ## Quick Setup
38
38
 
@@ -55,6 +55,7 @@ These agent versions are configured in this plugin:
55
55
  * [Plist Path](#plist-path)
56
56
  * [Mobile Agent configuration](#mobile-agent-configuration)
57
57
  * [Hybrid related configuration](#hybrid-related-configuration)
58
+ * [iOS only configuration](#ios-only-configuration)
58
59
  * [JavaScript Agent configuration](#javascript-agent-configuration)
59
60
  * [JavaScript Agent Snippet Mode](#javascript-agent-snippet-mode)
60
61
  * [HTML Instrumentation Requirements](#html-instrumentation-requirements)
@@ -218,7 +219,7 @@ There is flag for updating the CSP (Content Security Policy). By default this va
218
219
 
219
220
  ### Cookie Proxy
220
221
 
221
- Issues with cookies are somehow a persistent companion in Ionic or Capacitor applications. Therefore we provide a proxy script which is wrapping the document.cookie API and are storing the cookies which are important for the Dynatrace Agents in the session storage. Of course this wrapping is still calling the original API. Please see the [Capacitor Cookie Proxy](#capacitor-cookie-proxy) section below if you are using `CapacitorCookies` in your application. If not, please see the configuration below.
222
+ Issues with cookies are somehow a persistent companion in Ionic or Capacitor applications. Therefore, we provide a proxy script which is wrapping the document.cookie API and are storing the cookies which are important for the Dynatrace Agents in the session storage. Of course this wrapping is still calling the original API. Please see the [Capacitor Cookie Proxy](#capacitor-cookie-proxy) section below if you are using `CapacitorCookies` in your application. If not, please see the configuration below.
222
223
 
223
224
  Per default the cookie proxy is turned off. To make use of this proxy you need to enable it in the cordova configuration in the dynatrace.config.js:
224
225
 
@@ -324,6 +325,40 @@ module.exports = {
324
325
 
325
326
  * `DTXSetCookiesForDomain` or `hybridWebView.domains` : For hybrid applications using the JavaScript agent, cookies need to be set for each instrumented domain or server the application communicates with. You can specify domains, host or IP addresses. Domains or sub-domains must start with a dot. Separate the list elements with a comma.
326
327
 
328
+ ### iOS only configuration
329
+
330
+ The `DTXHybridApplicationMode` flag is available for iOS only.
331
+
332
+ Using the default value of `cookies` will set the behavior of the iOS agent to inject Javascript into the webview which allows the JS agent and iOS agent to correlate the mobile and web session via cookies and or local storage.
333
+
334
+ ```js
335
+ module.exports = {
336
+ ios : {
337
+ config : `
338
+ <key>DTXHybridApplicationMode</key>
339
+ <string>cookies</string>
340
+ `
341
+ }
342
+ }
343
+ ```
344
+
345
+ Using the value of `useragent` will result in modifying the UserAgent header, which appends specific key/values that will allow the JS agent to correlate mobile and web sessions properly. This option requires cluster version (or JavaScript Agent version) 327 or higher.
346
+
347
+ **Note:** Using this setting will preserve the original UserAgent header and append the following string: `DTHybrid/x.x dtAdk=... dtAdkSettings=...`
348
+
349
+ ```js
350
+ module.exports = {
351
+ ios : {
352
+ config : `
353
+ <key>DTXHybridApplicationMode</key>
354
+ <string>useragent</string>
355
+ `
356
+ }
357
+ }
358
+ ```
359
+
360
+ * `DTXHybridApplication` or `hybridWebView.enabled` : Set to `true` if you have a Hybrid application. This property is automatically set to true if you are using the dynatrace.config.js file downloaded from the Instrumentation Wizard. Otherwise, the default value is `false`.
361
+
327
362
  ## JavaScript Agent configuration
328
363
 
329
364
  Basically all needed properties for the JavaScript Agent are predefined by the downloadable `dynatrace.config.js`. There are four available properties:
@@ -884,6 +919,8 @@ Basically if you have problems with the plugin please have a look into the logs.
884
919
  * If you have problems retrieving the JavaScript Agent and you get error messages that the JavaScript Agent can not be retrieved, you probably don't have access to the API or there is a certificate issue. If this is the certificate use the [allow any certificate](#allow-any-certificate) feature. In any other case a workaround is possible to use the cli and add the `--jsagent=` custom parameter and download the full Javascript Agent and add the path to the downloaded JS Agent file to the custom parameter value - With this the plugin will not retrieve the JS agent and will use the one that is specified.
885
920
  * If you are not seeing data when using Capacitor 3+, please make sure you follow the steps in the [Capacitor Instrumentation](#capacitor-instrumentation) section (more specifically step 4 for the proper commands). Please read the note at the bottom of that section for more information.
886
921
  * For Android, if you see an error like "Gradle sync failed: Could not find com.dynatrace.tools.android:gradle-plugin:8.221.1.1005.", please see the [MavenCentral](#mavencentral-in-top-level-gradle-file) section for an example and more information.
922
+ * If you see a message like "Error: Could not retrieve JS Agent optionsForbidden", this means that the internal axios library is too old for processing the request correctly. The solution is to update the Cordova Plugin version, which internally uses a newer axios version to retrieve the JavaScript agent.
923
+
887
924
 
888
925
  ### iOS Session Correlation Issues
889
926
 
@@ -900,10 +937,16 @@ To resolve this issue and allow the Mobile and Web sessions to correlate properl
900
937
 
901
938
  When using Apple Pay with WKWebView, there are specific checks that WebKit (Apple) uses when loading the Apple Pay SDK. The Apple Pay SDK does not work when using script injection APIs which is what our iOS agent uses to properly communicate with the JS agent and to correlate the Mobile and Web User Sessions.
902
939
 
903
- **Workaround:** You can set the `DTXHybridApplication` flag to false which will remove the injection of our script. This will also remove the correlation of the Mobile and Web Sessions.
940
+ **Solution:** Set the `DTXHybridApplicationMode` flag to `useragent` that will allow our plugin to work properly with Apple Pay. For more information, see [iOS only configuration.](#ios-only-configuration)
941
+
942
+ **Other Workaround:** You can set the `DTXHybridApplication` flag to false which will remove the injection of our script. This will also remove the correlation of the Mobile and Web Sessions.
904
943
 
905
944
  ## Changelog
906
945
 
946
+ 2.329.1
947
+ * Updated Android (8.329.1.1014) & iOS Agent (8.329.1.1017)
948
+ * Updated logic for dynatraceMobile API for iOS to use messageHandler if there is no script injection in WKWebView (see [iOS only configuration](#ios-only-configuration))
949
+
907
950
  2.327.1
908
951
  * Updated Android (8.327.2.1004) & iOS Agent (8.327.1.1020)
909
952
 
@@ -8,7 +8,7 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>Dynatrace.framework/Dynatrace</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>tvos-arm64</string>
11
+ <string>ios-arm64</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>Dynatrace.framework</string>
14
14
  <key>SupportedArchitectures</key>
@@ -16,13 +16,13 @@
16
16
  <string>arm64</string>
17
17
  </array>
18
18
  <key>SupportedPlatform</key>
19
- <string>tvos</string>
19
+ <string>ios</string>
20
20
  </dict>
21
21
  <dict>
22
22
  <key>BinaryPath</key>
23
23
  <string>Dynatrace.framework/Dynatrace</string>
24
24
  <key>LibraryIdentifier</key>
25
- <string>tvos-arm64_x86_64-simulator</string>
25
+ <string>ios-arm64_x86_64-simulator</string>
26
26
  <key>LibraryPath</key>
27
27
  <string>Dynatrace.framework</string>
28
28
  <key>SupportedArchitectures</key>
@@ -31,7 +31,7 @@
31
31
  <string>x86_64</string>
32
32
  </array>
33
33
  <key>SupportedPlatform</key>
34
- <string>tvos</string>
34
+ <string>ios</string>
35
35
  <key>SupportedPlatformVariant</key>
36
36
  <string>simulator</string>
37
37
  </dict>
@@ -39,32 +39,32 @@
39
39
  <key>BinaryPath</key>
40
40
  <string>Dynatrace.framework/Dynatrace</string>
41
41
  <key>LibraryIdentifier</key>
42
- <string>ios-arm64_x86_64-simulator</string>
42
+ <string>tvos-arm64</string>
43
43
  <key>LibraryPath</key>
44
44
  <string>Dynatrace.framework</string>
45
45
  <key>SupportedArchitectures</key>
46
46
  <array>
47
47
  <string>arm64</string>
48
- <string>x86_64</string>
49
48
  </array>
50
49
  <key>SupportedPlatform</key>
51
- <string>ios</string>
52
- <key>SupportedPlatformVariant</key>
53
- <string>simulator</string>
50
+ <string>tvos</string>
54
51
  </dict>
55
52
  <dict>
56
53
  <key>BinaryPath</key>
57
54
  <string>Dynatrace.framework/Dynatrace</string>
58
55
  <key>LibraryIdentifier</key>
59
- <string>ios-arm64</string>
56
+ <string>tvos-arm64_x86_64-simulator</string>
60
57
  <key>LibraryPath</key>
61
58
  <string>Dynatrace.framework</string>
62
59
  <key>SupportedArchitectures</key>
63
60
  <array>
64
61
  <string>arm64</string>
62
+ <string>x86_64</string>
65
63
  </array>
66
64
  <key>SupportedPlatform</key>
67
- <string>ios</string>
65
+ <string>tvos</string>
66
+ <key>SupportedPlatformVariant</key>
67
+ <string>simulator</string>
68
68
  </dict>
69
69
  </array>
70
70
  <key>CFBundlePackageType</key>