GoogleMobileAdsの設定をしていたら次のようなエラーに遭遇しました。
調べてみると、どうもシミュレーターのログの設定が悪さしている模様。。。
対処方法をまとめましたので、ぜひ参考にしてください。
2022-12-21 04:24:38.569534+0900 GPSLogger[92951:5002075] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
2022-12-21 04:24:38.569641+0900 GPSLogger[92951:5002040] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
2022-12-21 04:24:38.570022+0900 GPSLogger[92951:5002040] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
2022-12-21 04:24:38.570132+0900 GPSLogger[92951:5002075] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
2022-12-21 04:24:38.570315+0900 GPSLogger[92951:5002075] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
2022-12-21 04:24:38.570331+0900 GPSLogger[92951:5002040] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
2022-12-21 04:24:38.571768+0900 GPSLogger[92951:5002040] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
2022-12-21 04:24:38.571933+0900 GPSLogger[92951:5002040] [Client] Updating selectors after delegate addition failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
対処方法
はじめに com.apple.CoreTelephony の log config の状態を確認します。
おそらく以下の結果になると思います。
$ xcrun simctl spawn booted log config --status --subsystem com.apple.CoreTelephony
Mode for 'com.apple.CoreTelephony' INFO PERSIST_DEFAULT
次のコマンドで com.apple.CoreTelephony の log config の状態を書き換えます。
$ xcrun simctl spawn booted log config --mode "level:off" --subsystem com.apple.CoreTelephony
状態が OFF PERSIST_OFF になっていたらOKです。
$ xcrun simctl spawn booted log config --status --subsystem com.apple.CoreTelephony
Mode for 'com.apple.CoreTelephony' OFF PERSIST_OFF
再度、ビルド実行するとエラーメッセージが消えていると思います。
お疲れ様でした。
元に戻す方法
元に戻したい場合は次のコマンドを打つと元に戻ります。
$ xcrun simctl spawn booted log config --mode "level:info,persist:default" --subsystem com.apple.CoreTelephony
設定する値は log config の help を参考にしてください。
$ log config --help
usage: log config [options] --mode <modes>
or: log config [options] --status
or: log config [options] --reset
description:
Read or configure settings for the logging system. Configuration
can act system-wide; or on a subsystem, category, or process level.
options:
--category <name> Get/set settings for a given category
--mode <modes> Enable given modes
--process <pid> | <name> Get/set settings for a given process
--reset Reset settings to defaults
--status Show current settings
--subsystem <name> Get/set settings for a given subsystem
modes:
Modes can be specified as a comma-separated list of key:value pairs.
Valid keys and their values are:
level off | default | info | debug
persist off | default | info | debug
stream live | default