1

iOS 应用程序以 WebView 格式实现。在 WebView 中使用 html 实现的 YouTube 嵌入式播放器的行为无效。具体来说,有以下事件。使用 iframe 标记加载嵌入式 HTML 页面时,应用程序突然终止。该事件发生在iOS 10.2,其他版本不发生。有没有过去的案例和对策?

以下是应用程序崩溃日志的内容。

2018-07-02 10:45:22.943 mall[21103:352187] +[CURLProtocol 
clientCertificationData], Line:69, (null)
objc[21103]: Class PLBuildVersion is implemented in both /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 10.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x11ff06998) and /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 10.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x11fd28880). One of the two will be used. Which one is undefined.
2018-07-02 10:45:24.578459 mall[21103:352322] [] __nwlog_err_simulate_crash_libsystem libsystem simulate crash unavailable "libsystem_network.dylib: nw_host_stats_add_src :: received error for SRC_ADDED: [22] Invalid argument"
2018-07-02 10:45:24.579614 mall[21103:352322] [] nw_host_stats_add_src received error for SRC_ADDED: [22] Invalid argument, dumping backtrace:
        [x86_64] libnetcore-856.30.16
    0   libsystem_network.dylib             0x000000010e167666 __nw_create_backtrace_string + 123
    1   libsystem_network.dylib             0x000000010e17e2f6 nw_get_host_stats + 1083
    2   libnetwork.dylib                    0x000000010e45ee9f nw_endpoint_resolver_start_next_child + 1382
    3   libdispatch.dylib                   0x000000010dee4978 _dispatch_call_block_and_release + 12
    4   libdispatch.dylib                   0x000000010df0e0cd _dispatch_client_callout + 8
    5   libdispatch.dylib                   0x000000010deebe17 _dispatch_queue_serial_drain + 236
    6   libdispatch.dylib                   0x000000010deecb4b _dispatch_queue_invoke + 1073
    7   libdispatch.dylib                   0x000000010deef385 _dispatch_root_queue_drain + 720
    8   libdispatch.dylib                   0x000000010deef059 _dispatch_worker_thread3 + 123
    9   libsystem_pthread.dylib             0x000000010e2c2169 _pthread_wqthread + 1387
    10  libsystem_pthread.dylib             0x000000010e2c1be9 start_wqthread + 13

另外,with safari web inspector 的远程调试日志如下。

Blocked a frame with origin "https://www.youtube.com" from accessing a frame with origin "https://xxx". Protocols, domains, and ports must match
4

0 回答 0