# Dynatrace OneAgent (iOS) auto-startup was not successful, error code = -3

**URL:** <https://community.dynatrace.com/t/dynatrace-oneagent-ios-auto-startup-was-not-successful-error-code-3/36829>\
**Category:** Open Q&A\
**Tags:** installation, ios, oneagent\
**Created:** [October 7, 2022, 10:59am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-ios-auto-startup-was-not-successful-error-code-3/36829 "2022-10-07T10:59:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ujjwal\_Singh](https://avatars.discourse-cdn.com/v4/letter/u/77aa72/32.png) [@Ujjwal\_Singh](https://community.dynatrace.com/u/Ujjwal_Singh)\
**Post date:** [October 7, 2022, 10:59am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-ios-auto-startup-was-not-successful-error-code-3/36829/1 "2022-10-07T10:59:27Z")

</div>

I have tried to set up Dynatrace for my dummy app, as I am trying to explore opportunities to use this platform in a real project. My Concern is, after following the steps given in the setup docs, I am still getting an error:&nbsp;**Dynatrace OneAgent (iOS) auto-startup was not successful, error code = -3**

Can someone please help me out with why I am facing the same? Thanks

---

<div class="post-metadata">

**Author:** ![Patrick\_H](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/patrick_h/32/37540_2.png) [@Patrick\_H](https://community.dynatrace.com/u/Patrick_H)\
**Post date:** [October 7, 2022, 11:15am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-ios-auto-startup-was-not-successful-error-code-3/36829/2 "2022-10-07T11:15:24Z")

</div>

Hi,

This is too little information - we would need the agent log, best with DTXLogLevel set to ALL.  
To not publish your log here publicly and expose your settings I suggest to create a support ticket at&nbsp;[https://support.dynatrace.com/](https://support.dynatrace.com/)

And just to make sure, you did add the configuration displayed in the instrumentation wizard to the Apps Info.plist?

---

<div class="post-metadata">

**Author:** ![Ujjwal\_Singh](https://avatars.discourse-cdn.com/v4/letter/u/77aa72/32.png) [@Ujjwal\_Singh](https://community.dynatrace.com/u/Ujjwal_Singh)\
**Post date:** [October 7, 2022, 11:42am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-ios-auto-startup-was-not-successful-error-code-3/36829/3 "2022-10-07T11:42:09Z")

</div>

Hi patrick, Yes I have added configuration in info.plist, I am suspecting that there is permission required from user for this, which I am not handling as of now as I am testing this on simulator.

Below I am attaching log as it is just dummy project on which I am testing.

**2022-10-07 16:32:55.725765+0530 weatherApp[10879:219272] ℹ INFO&nbsp; &nbsp; 😎 AgentSession &nbsp; [Dynatrace.m:179-259-1] Turning ON all diagnostic categories**

**2022-10-07 16:32:55.727954+0530 weatherApp[10879:219272] ℹ INFO&nbsp; &nbsp; 😎 AgentSession &nbsp; [Dynatrace.m:220-259-1] Auto-starting Dynatrace OneAgent (iOS) version 8.251.1.1005 built on 2022-09-21 03:48:03 +0000**

**2022-10-07 16:32:55.728217+0530 weatherApp[10879:219272] ℹ INFO&nbsp; &nbsp; 😎 AgentSession &nbsp; [DTXAgentBootController.m:83-259-1] ### Dynatrace OneAgent (iOS) 8.251.1.1005 built on 2022-09-21 03:48:03 +0000 ###**

**2022-10-07 16:32:55.728543+0530 weatherApp[10879:219272] +[NSString dtx\_sanitizeString:error:]: unrecognized selector sent to class \<some hexadecimal, not relevant\>**

\*\*2022-10-07 16:32:55.729387+0530 weatherApp[10879:219272] ❌ SEVERE&nbsp; 😎 AgentSession &nbsp; [DTXAgentBootController.m:258-259-1] agent startup -failed ex: NSInvalidArgumentException , desc: +[NSString dtx\_sanitizeString:error:]: unrecognized selector sent to class 0x10208bd58 ,

Removing Stacktrace here.\*\*

**2022-10-07 16:32:55.729738+0530 weatherApp[10879:219272] ❌ SEVERE&nbsp; 😎 AgentSession &nbsp; [DTXAgentBootConfig.m:31-259-1] Dynatrace OneAgent (iOS) auto-startup was not successful, error code = -3**

---

<div class="post-metadata">

**Author:** ![Patrick\_H](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/patrick_h/32/37540_2.png) [@Patrick\_H](https://community.dynatrace.com/u/Patrick_H)\
**Post date:** [October 7, 2022, 12:18pm UTC](https://community.dynatrace.com/t/dynatrace-oneagent-ios-auto-startup-was-not-successful-error-code-3/36829/4 "2022-10-07T12:18:21Z")

</div>

Thanks, this output is helpful - it looks like -ObjC is missing from the Other Linker Flags in your build settings - so I guess the agent framework was added manually and not via Cocoapods or Swift Package Manager OR you are you using the static framework. See&nbsp;[Set up OneAgent for your iOS apps in RUM Classic — Dynatrace Docs](https://www.dynatrace.com/support/help/shortlink/ios-instrumentation#set-up-oneagent)&nbsp;on how to add this linker flag.

And yes, also the Privacy setup needs to be done to get more data.

---

<div class="post-metadata">

**Author:** ![Ujjwal\_Singh](https://avatars.discourse-cdn.com/v4/letter/u/77aa72/32.png) [@Ujjwal\_Singh](https://community.dynatrace.com/u/Ujjwal_Singh)\
**Post date:** [October 7, 2022, 1:11pm UTC](https://community.dynatrace.com/t/dynatrace-oneagent-ios-auto-startup-was-not-successful-error-code-3/36829/5 "2022-10-07T13:11:23Z")

</div>

Thank you for such quick response, really appreciate it!
