iOS Agent troubleshooting

Using -ObjC creates linker errors

Some 3rd-party libraries have problems using -ObjC as a linker flag. The solution is to use -force_load instead. Follow these steps to use -force_load:

  1. Remove the Mobile Agent library from the Link Binary With Libraries setting in Build Phases.
  2. Remove -ObjC from Other Linker Flags and add -force_load <path of libDynatrace.a>
-force_load $(PROJECT_DIR)/Dynatrace/libDynatrace.a

SQLite Databases

The iOS Mobile Agent uses a SQLite database to temporarily store performance metrics that it collects. The agent issues the sqlite3.shutdown() command to properly configure this database to be serialized. If your application also uses a SQLite database, this shutdown command also shuts down your application's SQLite database. Therefore, it is recommend to not open your application's SQLite database until after you call the iOS Mobile Agent [startupWithApplicationName](/support/doc/appmon/user-experience-management/mobile-uem/how-to-instrument-an-ios-app/ios-manual-setup/#anchor_instrumentation) command. If this is not possible, check whether your SQLite database is open before using it. If it is not, reopen it.