为什么我的 Flutter 应用无法在 iOS 模拟器上运行 Xcode?
Why is my Flutter app not working on iOS emulator with Xcode?
我的 Flutter 应用程序通过 Android Studio 在模拟器(iOS 和 Android)上编译和 运行s。它在真实设备上执行 运行(通过 Android Studio 和 Xcode),但在模拟器上通过 Xcode 不执行。应用程序锁定在加载屏幕上。
谁能告诉我为什么?这意味着我无法在 Apple App Store 上发送工作版本。
这是我得到的错误:
2019-10-06 23:22:10.949096+0200 Runner[58237:200800] [Client] Updating selectors failed with:
Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named
com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The
connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
以下对我有用:
1) 运行 在航站楼
xcrun simctl spawn booted log config --mode "level:off" --subsystem com.apple.CoreTelephony
2) 从 Xcode 菜单转到 Product > Scheme > Edit Scheme
找到环境变量所在的位置并设置 OS_ACTIVITY_MODE = disable
3) 重启模拟器
PS。如果您收到错误消息 xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
那么请转到 Xcode > Preferences > Locations
并分配命令行工具
我的 Flutter 应用程序通过 Android Studio 在模拟器(iOS 和 Android)上编译和 运行s。它在真实设备上执行 运行(通过 Android Studio 和 Xcode),但在模拟器上通过 Xcode 不执行。应用程序锁定在加载屏幕上。
谁能告诉我为什么?这意味着我无法在 Apple App Store 上发送工作版本。
这是我得到的错误:
2019-10-06 23:22:10.949096+0200 Runner[58237:200800] [Client] Updating selectors failed with:
Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named
com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The
connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
以下对我有用:
1) 运行 在航站楼
xcrun simctl spawn booted log config --mode "level:off" --subsystem com.apple.CoreTelephony
2) 从 Xcode 菜单转到 Product > Scheme > Edit Scheme
找到环境变量所在的位置并设置 OS_ACTIVITY_MODE = disable
3) 重启模拟器
PS。如果您收到错误消息 xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
那么请转到 Xcode > Preferences > Locations
并分配命令行工具