iOS インストルメンテーションのトラブルシューティング

このページでは、いくつかの一般的な iOS インストルメンテーションの問題を解決するための手順とヒントについて説明します。

エージェントがリクエストを検出しない

最初に、 または クラスのどちらを使用しているか確認します。デフォルトでは、ネットワークリクエストを行う必要があります。カスタム HTTP ライブラリを使用している場合は、「カスタム HTTP ライブラリでのエージェントの使用」に記載されている手順に従っていることを確認してください。

を使用している場合は、iOS エージェントを初期化した後に のインスタンスを作成してください。これは、インストゥルメンテーションが初期化される前に作成されたオブジェクトをエージェントが認識していない可能性があるためです。

認識されないセレクタのエラー

手動方式を使用してアプリケーションをインストゥルメント化する場合、次のエラーメッセージが表示されます。

CODE
+[NSURLConnection ADEumInsertHooks]: unrecognized selector sent to class <hex value>

つまり、リンクフラグに -ObjC が追加されていません。手順については、「-ObjC フラグの設定」を参照してください。

CocoaPods Builds Blocked by User Script Sandbox

This topic describes the User Script Sandbox issue that blocks the CocoaPods build scripts in Xcode.

When installing the iOS Agent SDK using CocoaPods, builds in Xcode 26 or later may fail for new projects. This issue occurs because the User Script Sandbox feature blocks CocoaPods build scripts.

To resolve this issue, disable the User Script Sandbox feature as follows:

  1. Open the project in Xcode.

  2. Select the app target.

  3. Go to Build Settings.

  4. Set the Enable User Script Sandbox field to No.

  5. Clean and rebuild the project.

Build Errors in Objective-C Projects

When you have only Objective-C projects, the following error may occur:

CODE
Could not find or use auto-linked library '<library_name>': library '<library_name>' not found

To prevent these build errors, configure the Swift runtime within your Objective-C projects.