iOS - 无法在真实设备 iPhone 11 中运行 Flutter 应用程序。iOS - 15.2,Xcode 13.2.1,它在模拟器中工作
Posted
技术标签:
【中文标题】iOS - 无法在真实设备 iPhone 11 中运行 Flutter 应用程序。iOS - 15.2,Xcode 13.2.1,它在模拟器中工作【英文标题】:iOS - Unable to Run Flutter App in Real Device iPhone 11. iOS - 15.2, Xcode 13.2.1 , It's working in simulator 【发布时间】:2021-12-29 14:16:42 【问题描述】:021-12-29 18:21:34.187991+0530 Runner[473:19732] Metal API Validation Enabled
2021-12-29 18:21:34.316468+0530 Runner[473:19732] Could not load the "LaunchImage" image referenced from a nib in the bundle with identifier "com.adit.betaapp"
2021-12-29 18:21:34.319981+0530 Runner[473:19732] Warning: Unable to create restoration in progress marker file
2021-12-29 18:21:34.325448+0530 Runner[473:19954] 8.8.0 - [Firebase/Core][I-COR000005] No app has been configured yet.
2021-12-29 18:21:34.378325+0530 Runner[473:19732] [Firebase/Crashlytics] Version 8.8.0
18:21:34.839 os_core_unix.c !pjlib 2.7.2 for POSIX initialized
18:21:34.842 sip_endpoint.c .Creating endpoint instance...
18:21:34.843 pjlib .select() I/O Queue created (0x107811e28)
18:21:34.844 sip_endpoint.c .Module "mod-msg-print" registered
18:21:34.844 sip_transport.c .Transport manager created.
18:21:34.844 pjsua_core.c .PJSUA state changed: NULL --> CREATED
2021-12-29 18:21:34.845420+0530 Runner[473:19732] 18:21:34.845 sip_endpoint.c .Module "mod-pjsua-log" registered
2021-12-29 18:21:34.845720+0530 Runner[473:19732] 18:21:34.845 sip_endpoint.c .Module "mod-tsx-layer" registered
2021-12-29 18:21:34.845807+0530 Runner[473:19732] 18:21:34.845 sip_endpoint.c .Module "mod-stateful-util" registered
2021-12-29 18:21:34.845990+0530 Runner[473:19732] 18:21:34.845 sip_endpoint.c .Module "mod-ua" registered
2021-12-29 18:21:34.846169+0530 Runner[473:19732] 18:21:34.846 sip_endpoint.c .Module "mod-100rel" registered
2021-12-29 18:21:34.846261+0530 Runner[473:19732] 18:21:34.846 sip_endpoint.c .Module "mod-pjsua" registered
2021-12-29 18:21:34.846668+0530 Runner[473:19732] 18:21:34.846 sip_endpoint.c .Module "mod-invite" registered
2021-12-29 18:21:35.053108+0530 Runner[473:19732] 18:21:35.052 coreaudio_dev.c .. dev_id 0: iPhone IO device (in=1, out=1) 8000Hz
2021-12-29 18:21:35.053404+0530 Runner[473:19732] 18:21:35.053 coreaudio_dev.c ..core audio initialized
2021-12-29 18:21:35.054515+0530 Runner[473:19732] 18:21:35.054 pjlib ..select() I/O Queue created (0x104818628)
2021-12-29 18:21:35.105823+0530 Runner[473:19985] flutter: Observatory listening on http://127.0.0.1:50305/WXni8xDbv2A=/
2021-12-29 18:21:35.147202+0530 Runner[473:19732] 18:21:35.147 sip_endpoint.c .Module "mod-evsub" registered
2021-12-29 18:21:35.147302+0530 Runner[473:19732] 18:21:35.147 sip_endpoint.c .Module "mod-presence" registered
2021-12-29 18:21:35.147337+0530 Runner[473:19732] 18:21:35.147 sip_endpoint.c .Module "mod-mwi" registered
2021-12-29 18:21:35.147366+0530 Runner[473:19732] 18:21:35.147 sip_endpoint.c .Module "mod-refer" registered
2021-12-29 18:21:35.147429+0530 Runner[473:19732] 18:21:35.147 sip_endpoint.c .Module "mod-pjsua-pres" registered
2021-12-29 18:21:35.147492+0530 Runner[473:19732] 18:21:35.147 sip_endpoint.c .Module "mod-pjsua-im" registered
2021-12-29 18:21:35.147528+0530 Runner[473:19732] 18:21:35.147 sip_endpoint.c .Module "mod-pjsua-options" registered
2021-12-29 18:21:35.147576+0530 Runner[473:19732] 18:21:35.147 pjsua_core.c .1 SIP worker threads created
2021-12-29 18:21:35.147603+0530 Runner[473:19732] 18:21:35.147 pjsua_core.c .pjsua version 2.7.2 for ios-15.2/arm-iPhone12,1/iOS-SDK initialized
2021-12-29 18:21:35.147628+0530 Runner[473:19732] 18:21:35.147 pjsua_core.c .PJSUA state changed: CREATED --> INIT
2021-12-29 18:21:35.147940+0530 Runner[473:19732] 18:21:35.147 tcptp:50306 SIP TCP listener ready for incoming connections at 2405:201:2022:30bc:75b2:7a91:aafe:5d3c:50306
2021-12-29 18:21:35.148086+0530 Runner[473:19732] 18:21:35.148 tlstp:50307 SIP TLS listener is ready for incoming connections at 2405:201:2022:30bc:75b2:7a91:aafe:5d3c:50307
2021-12-29 18:21:35.148197+0530 Runner[473:19732] 18:21:35.148 tcptp:50308 SIP TCP listener ready for incoming connections at 192.168.29.163:50308
2021-12-29 18:21:35.148288+0530 Runner[473:19732] 18:21:35.148 tlstp:50309 SIP TLS listener is ready for incoming connections at 192.168.29.163:50309
2021-12-29 18:21:35.148575+0530 Runner[473:19732] 18:21:35.148 pjsua_core.c PJSUA state changed: INIT --> STARTING
2021-12-29 18:21:35.148737+0530 Runner[473:19732] 18:21:35.148 sip_endpoint.c .Module "mod-unsolicited-mwi" registered
2021-12-29 18:21:35.148872+0530 Runner[473:19732] 18:21:35.148 pjsua_core.c .PJSUA state changed: STARTING --> RUNNING
2021-12-29 18:21:35.163544+0530 Runner[473:19961] [VERBOSE-2:shell.cc(94)] Dart Error: Can't load Kernel binary: Invalid kernel binary format version.
2021-12-29 18:21:35.164022+0530 Runner[473:19961] [VERBOSE-2:dart_isolate.cc(177)] Could not prepare isolate.
2021-12-29 18:21:35.165004+0530 Runner[473:19961] [VERBOSE-2:runtime_controller.cc(384)] Could not create root isolate.
providerDidBegin
2021-12-29 18:21:35.166794+0530 Runner[473:19961] [VERBOSE-2:shell.cc(574)] Could not launch engine with configuration.
2021-12-29 18:21:35.215898+0530 Runner[473:19958] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo=NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit>
2021-12-29 18:21:35.215938+0530 Runner[473:19958] [ProcessSuspension] 0x10b5f91a0 - ProcessAssertion: Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=475, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo=NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit
2021-12-29 18:21:39.298790+0530 Runner[473:19732] [VERBOSE-2:FlutterAppDelegate.mm(148)] Timeout waiting for the first frame when launching an URL.
AVAudioSession permission - granted
handleRouteChange ===>> name = AVAudioSessionRouteChangeNotification, object = Optional(<AVAudioSession: 0x283eef6d0>), userInfo = Optional([AnyHashable("AVAudioSessionRouteChangeReasonKey"): 3, AnyHashable("AVAudioSessionRouteChangePreviousRouteKey"): <AVAudioSessionRouteDescription: 0x283ed0410,
inputs = (
"<AVAudioSessionPortDescription: 0x283ed0310, type = MicrophoneBuiltIn; name = iPhone Microphone; UID = Built-In Microphone; selectedDataSource = Front>"
);
outputs = (
"<AVAudioSessionPortDescription: 0x283ed16a0, type = Speaker; name = Speaker; UID = Speaker; selectedDataSource = (null)>"
)>])
2021-12-29 18:22:05.215158+0530 Runner[473:19732] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
2021-12-29 18:23:07.936342+0530 Runner[473:19732] No windows have a root view controller, cannot save application state
错误发布在这里, 我正在尝试运行过去两天的应用程序。
当应用程序在模拟器中运行时,它运行良好,但无法在真实设备中安装。 因此,当我将构建上传到 testFlight 时,它在第一个屏幕上安装后崩溃。
【问题讨论】:
【参考方案1】:这是我不知道的flutter或repo的一些缓存问题,但在不同的目录上重新克隆项目并重新安装flutter完成这项工作。
现在我可以在真机上安装应用了。
我正在为可能有同样问题的其他人发布答案。
【讨论】:
以上是关于iOS - 无法在真实设备 iPhone 11 中运行 Flutter 应用程序。iOS - 15.2,Xcode 13.2.1,它在模拟器中工作的主要内容,如果未能解决你的问题,请参考以下文章
无法使用 appium 1.6.0 在 IOS 10 真实设备中启动 ipa 文件
以真实设备为目标时,无法在 IOS 中构建 react-native
音频引擎仅在运行 iOS 10 的设备(iphone 6)上失败,在所有模拟器设备上运行良好或真实设备直到 iphone 6s