cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OneAgent SDK for iOS - DTXAction.enter returns nil

rspeakman
Visitor

I am building an app using Swift and SwiftUI on Xcode 13.3.1. As part of the development I need to create a number of manual actions. I have found in several instances that nil is returned when I invoke DTXAction.enter("some event"). In the SDK documentation it says that nil is returned if an error occurred. Is there any way to see what the error is when nil is returned? I have the log level set to ALL but I don't see an error in the output.

3 REPLIES 3

Patrick_H
Dynatrace Champion
Dynatrace Champion

Have you applied the privacy level snippet as shown in the instrumentation wizard? Actions are custom data and they are not created when privacy level is off which is the default configuration.

iOS help: https://www.dynatrace.com/support/help/shortlink/ios-hub

Yes in the app we have set the privacy configuration to the following:

  • dataCollectionLevel = .userBehavior
  • crashReplayOptedIn = true
  • crashReportingOptedIn = true

I worked with my infrastructure team and found that a firewall rule was applied yesterday afternoon that blocked access to the beacon url. The rule was backed out and I am no longer seeing the problem. I believe that this was the root cause of the issue.

 

I was under the impression that data collection on the mobile device would take place regardless of whether the client could connect to the beacon url. Is that not the case for custom actions?

Patrick_H
Dynatrace Champion
Dynatrace Champion

data collection is started, but agent shuts down capturing after some retries to reach the beacon endpoint as this is also needed for the agent to get its configuration

iOS help: https://www.dynatrace.com/support/help/shortlink/ios-hub

Featured Posts