ionic 2 和 iOS10 CSP 斗争
ionic 2 and iOS10 the CSP struggle
我正在为 android 和 iOS 10 使用 ionic 2/Angular 2.
开发应用程序
我的应用在 android(5.0~7.0) 上运行完美。但是在 iOS 10,我的应用程序在启动时不会通过白屏。
我的应用程序使用 angular2 http 请求从我的服务器获取 JSON,其他一些 cordova 插件(Zip、文件、文件传输)和 ionic2 存储(我没有安装 cordova sqlite)在使用.
我搜索了好几天,我相信解决方案是正确设置 Content-Security-Policy 元标记。
然而,我尝试了各种元标记,但不幸的是,我仍然在 iOS 10 上遇到白屏。
(Android 有或没有 CSP 标签的作品)
我已尝试更新、重新安装所有组件和插件。尝试添加、删除 os 平台、离子状态重置等...但仍然无望,没有解决方案。
这是我当前在“/src/index.html”中的元标记(在 head 标记内和 title 标记上方):
<meta http-equiv="Content-Security-Policy" content="default-src gap://ready file://* *; script-src 'self' 'unsafe-inline' 'unsafe-eval' data: *; style-src 'self' 'unsafe-inline' *; img-src 'self' data: blob: *; media-src 'self' mediastream: blob:; connect-src * blob:">
我的 iOS 模拟器(iPhone SE iOS10.2)控制台登录启动我的应用程序:
Jan 17 19:48:24 baksagimms-Mac-Pro CoreSimulatorBridge[32274]:
Pasteboard change listener callback port
registered Jan 17 19:48:41 baksagimms-Mac-Pro
CoreSimulatorBridge[32274]: Pasteboard change listener callback port
registered Jan 17 19:48:43
baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Pasteboard change
listener callback port registered Jan 17
19:48:43 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Pasteboard
change listener callback port registered
Jan 17 19:48:43 baksagimms-Mac-Pro CoreSimulatorBridge[32274]:
Pasteboard change listener callback port
registered Jan 17 19:48:44 baksagimms-Mac-Pro
CoreSimulatorBridge[32274]: Pasteboard change listener callback port
registered Jan 17 19:48:44
baksagimms-Mac-Pro DTServiceHub[32275]: Could not create service named
com.apple.instruments.server.services.processcontrol.posixspawn Jan 17
19:48:45 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Pasteboard
change listener callback port registered
Jan 17 19:48:45 baksagimms-Mac-Pro CoreSimulatorBridge[32274]:
Requesting installation of
file:///Users/blackstone/IdeaProjects/artistapp_dia/album_app/platforms/ios/build/emulator/album_app.app/
with options: {
CFBundleIdentifier = "com.ionicframework.albumapp837617";
PackageType = Developer;
SimulatorRootPath = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk";
SimulatorUserPath = "/Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data";
} Jan 17 19:48:45 baksagimms-Mac-Pro installd[32260]: 0x700001f6a000
-[MIClientConnection _doInstallationForURL:withOptions:completion:]: Install of
"/Users/blackstone/IdeaProjects/artistapp_dia/album_app/platforms/ios/build/emulator/album_app.app"
type Developer (LSInstallType = (null)) requested by
CoreSimulatorBridge (pid 32274) Jan 17 19:48:45 baksagimms-Mac-Pro
installd[32260]: 0x700001f6a000 MDMCreateDeltaDirectory: calling
MDMDirectoryDiff with: state->old_bundle:
/Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/E8A8A135-71C8-404A-8D36-501C7ECC02AC/album_app.app
state->new_bundle:
/Users/blackstone/IdeaProjects/artistapp_dia/album_app/platforms/ios/build/emulator/album_app.app
state->dst_bundle:
/Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Library/Caches/com.apple.mobile.installd.staging/temp.rfQKOU/extracted/Payload//album_app.app,
binaryDiff flag: FALSE dst_ipa:
/Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Library/Caches/com.apple.mobile.installd.staging/temp.rfQKOU/extracted
Jan 17 19:48:45 baksagimms-Mac-Pro installd[32260]: 0x700001de1000
__MDMDirectoryDiff_block_invoke.37: calling writeDictToFile with: /Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Library/Caches/com.apple.mobile.installd.staging/temp.rfQKOU/extracted/ManifestCache.plist
Jan 17 19:48:45 baksagimms-Mac-Pro installd[32260]: 0x700001de1000
writeDictToFile: ==== Successfully wrote Manifest cache to
/Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Library/Caches/com.apple.mobile.installd.staging/temp.rfQKOU/extracted/ManifestCache.plist
Jan 17 19:48:46 baksagimms-Mac-Pro SpringBoard[32264]:
[KeyboardArbiter] HW kbd: Failed to set (null) as keyboard focus Jan
17 19:48:46 baksagimms-Mac-Pro installd[32260]: 0x700001f6a000
-[MIInstaller performInstallationWithError:]: Installing Jan 17 19:48:46 baksagimms-Mac-Pro
installd[32260]: 0x700001f6a000 -[MIInstallableBundlePatch
applyPatchWithError:]: Attempting patch update of
com.ionicframework.albumapp837617 from 0.0.1 (0.0.1) to 0.0.1 (0.0.1)
Jan 17 19:48:46 baksagimms-Mac-Pro
com.apple.CoreSimulator.SimDevice.BA74E51F-A0B7-4662-B483-EE053FA53DAB.launchd_sim[32248]
(UIKitApplication:com.ionicframework.albumapp837617[0x6f91][32345]):
Service exited due to Killed: 9 Jan 17 19:48:46 baksagimms-Mac-Pro
backboardd[32266]: [Common] Unable to get short BSD proc info for
32345: No such file or directory Jan 17 19:48:46 baksagimms-Mac-Pro
backboardd[32266]: [Common] Unable to get proc info for 32345: No such
file or directory Jan 17 19:48:46 baksagimms-Mac-Pro
assertiond[32269]: notify_suspend_pid() failed with error 7 Jan 17
19:48:47 baksagimms-Mac-Pro syslogd[32250]: Disabling module
com.apple.appinstallation writes to
/var/mobile/Library/Logs/CrashReporter/DiagnosticLogs/AppInstallation/AppInstallation.log
following 6 failures (Operation Failed) Jan 17 19:48:47
baksagimms-Mac-Pro installd[32260]: 0x700001f6a000
-[MIInstallableBundle _refreshUUIDForContainer:withError:]: Data container for com.ionicframework.albumapp837617 is now at
/Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Data/Application/1EE6DD04-3B43-4E5B-9A00-01841C9DD3A1
Jan 17 19:48:47 baksagimms-Mac-Pro installd[32260]: 0x700001f6a000
-[MIContainer makeContainerLiveReplacingContainer:reason:withError:]: Made container live for com.ionicframework.albumapp837617 at
/Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3
Jan 17 19:48:47 baksagimms-Mac-Pro installd[32260]: 0x700001f6a000
-[MIInstaller performInstallationWithError:]: Install Successful; Staging: 1.50s; Waiting: 0.00s; Preflight/Patch: 0.44s, Verifying:
0.01s; Overall: 2.05s Jan 17 19:48:47 baksagimms-Mac-Pro appstored[32330]: [default] LaunchServices observer: Installed (
" com.ionicframework.albumapp837617
file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app
>" )
{A703FE87-2740-4C0B-8AA7-9125511A3381 256} Jan 17 19:48:47
baksagimms-Mac-Pro SpringBoard[32264]: [default] LaunchServices
observer: Installed (
" com.ionicframework.albumapp837617
file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app
>" )
{A703FE87-2740-4C0B-8AA7-9125511A3381 256} Jan 17 19:48:47
baksagimms-Mac-Pro routined[32254]: [default] LaunchServices observer:
Installed (
" com.ionicframework.albumapp837617
file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app
>" )
{A703FE87-2740-4C0B-8AA7-9125511A3381 256} Jan 17 19:48:47
baksagimms-Mac-Pro nsurlsessiond[32302]: [default] LaunchServices
observer: Installed (
" com.ionicframework.albumapp837617
file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app
>" )
{A703FE87-2740-4C0B-8AA7-9125511A3381 256} Jan 17 19:48:47
baksagimms-Mac-Pro UserEventAgent[32251]: [default] LaunchServices
observer: Installed (
" com.ionicframework.albumapp837617
file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app
>" )
{A703FE87-2740-4C0B-8AA7-9125511A3381 256} Jan 17 19:48:47
baksagimms-Mac-Pro passd[32319]: [default] LaunchServices observer:
Installed (
" com.ionicframework.albumapp837617
file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app
>" )
{A703FE87-2740-4C0B-8AA7-9125511A3381 256} Jan 17 19:48:47
baksagimms-Mac-Pro SpringBoard[32264]: [default] LaunchServices
observer: Installed (
" com.ionicframework.albumapp837617
file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app
>" )
{A703FE87-2740-4C0B-8AA7-9125511A3381 256} Jan 17 19:48:47
baksagimms-Mac-Pro profiled[32321]: [default] LaunchServices observer:
Installed (
" com.ionicframework.albumapp837617
file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app
>" )
{A703FE87-2740-4C0B-8AA7-9125511A3381 256} Jan 17 19:48:51
baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Pasteboard change
listener callback port registered Jan 17
19:48:51 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Requesting
launch of com.ionicframework.albumapp837617 with options: {
environment = {
}; } Jan 17 19:48:51 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Beginning launch sequence for bundle
'com.ionicframework.albumapp837617' retryTimeout: 120.000000
(default write com.apple.CoreSimulatorBridge LaunchRetryTimeout
) bootTimeout: 300.000000 (default write
com.apple.CoreSimulatorBridge BootRetryTimeout ) bootLeeway:
120.000000 (default write com.apple.CoreSimulatorBridge BootLeeway ) Note: Use 'xcrun simctl spawn booted defaults write
' to modify defaults in the booted Simulator
device. Simulator booted at: 2017-01-17 10:27:11 +0000 Current time:
2017-01-17 10:48:51 +0000 Within boot leeway: NO Jan 17 19:48:51
baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Launch attempt #0 for
bundle 'com.ionicframework.albumapp837617', have been trying to launch
for 0 seconds. Modern launch services = YES Jan 17 19:48:51
baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Got LSBundleProxy for
'com.ionicframework.albumapp837617', sequenceNumber 256, cacheGUID
A703FE87-2740-4C0B-8AA7-9125511A3381 Jan 17 19:48:51
baksagimms-Mac-Pro CoreSimulatorBridge[32274]: [Common]
[FBSSystemService][0xed8e] Sending request to open
"com.ionicframework.albumapp837617" Jan 17 19:48:51 baksagimms-Mac-Pro
CoreSimulatorBridge[32274]: [Common] [FBSSystemService][0xed8e]
Request successful: Jan 17 19:48:51 baksagimms-Mac-Pro
CoreSimulatorBridge[32274]: Launch successful for
'com.ionicframework.albumapp837617' Jan 17 19:48:52 baksagimms-Mac-Pro
album_app[32697]: objc[32697]: Class PLBuildVersion is implemented in
both
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices
(0x1061fe998) and
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices
(0x105f7d880). One of the two will be used. Which one is undefined.
Jan 17 19:48:52 baksagimms-Mac-Pro logd[32259]: metadata shared cached
uuid is null (using logd's shared cache info) album_app (32697) Jan 17
19:48:52 baksagimms-Mac-Pro logd[32259]: Failed to harvest strings for
pathless uuid '00000000-0000-0000-0000-000000000000' Jan 17 19:48:52
baksagimms-Mac-Pro album_app[32697]: assertion failed: 16C67 14C89:
libxpc.dylib + 62677 [0339A402-6531-30E9-8BC2-589C463CD6D6]: 0x7d Jan
17 19:48:52 baksagimms-Mac-Pro album_app[32697]: Apache Cordova native
platform version 4.3.1 is starting. Jan 17 19:48:52 baksagimms-Mac-Pro
album_app[32697]: Multi-tasking -> Device: YES, App: YES Jan 17
19:48:52 baksagimms-Mac-Pro album_app[32697]: Using UIWebView Jan 17
19:48:52 baksagimms-Mac-Pro album_app[32697]:
[CDVTimer][handleopenurl] 0.047028ms Jan 17 19:48:52
baksagimms-Mac-Pro album_app[32697]: Unlimited access to network
resources Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]:
[CDVTimer][intentandnavigationfilter] 1.711011ms Jan 17 19:48:52
baksagimms-Mac-Pro album_app[32697]: [CDVTimer][gesturehandler]
0.056982ms Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: [CDVTimer][file] 2.811015ms Jan 17 19:48:52 baksagimms-Mac-Pro
album_app[32697]: [CDVTimer][splashscreen] 16.559005ms Jan 17 19:48:52
baksagimms-Mac-Pro album_app[32697]: [CDVTimer][statusbar] 4.653037ms
Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]:
[CDVTimer][keyboard] 0.611007ms Jan 17 19:48:52 baksagimms-Mac-Pro
album_app[32697]: [CDVTimer][TotalPluginStartup] 28.108001ms Jan 17
19:48:52 baksagimms-Mac-Pro album_app[32697]: Resetting plugins due to
page load. Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]:
Finished load of:
file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app/www/index.html
Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: DEVICE READY
FIRED AFTER 55 ms
如果没有安装额外的 cordova 插件,应用程序将在 iOS10 上正常运行。
任何对此有任何信息或解决方案的人请提供帮助。
谢谢。
App will work just fine on iOS10 if no additional cordova plugins are installed
我认为插件是问题的原因,而不是 CSP。您可以通过 运行 iOS 9 Simulator/Device 中的应用程序进行检查,因为 iOS 9 不关心 CSP。
根据您的日志输出,deviceready
事件正在触发,因此 Cordova 环境正在启动。我会将 Safari 远程调试器连接到 Webview。如果您使用远程调试器的 "Refresh button" 重新加载 Webview,则可能会出现控制台错误消息。如果没有,我会添加一些断点,从 deviceready
触发后的第一个动作开始,看看它失败的地方。
我正在为 android 和 iOS 10 使用 ionic 2/Angular 2.
开发应用程序我的应用在 android(5.0~7.0) 上运行完美。但是在 iOS 10,我的应用程序在启动时不会通过白屏。
我的应用程序使用 angular2 http 请求从我的服务器获取 JSON,其他一些 cordova 插件(Zip、文件、文件传输)和 ionic2 存储(我没有安装 cordova sqlite)在使用.
我搜索了好几天,我相信解决方案是正确设置 Content-Security-Policy 元标记。
然而,我尝试了各种元标记,但不幸的是,我仍然在 iOS 10 上遇到白屏。 (Android 有或没有 CSP 标签的作品)
我已尝试更新、重新安装所有组件和插件。尝试添加、删除 os 平台、离子状态重置等...但仍然无望,没有解决方案。
这是我当前在“/src/index.html”中的元标记(在 head 标记内和 title 标记上方):
<meta http-equiv="Content-Security-Policy" content="default-src gap://ready file://* *; script-src 'self' 'unsafe-inline' 'unsafe-eval' data: *; style-src 'self' 'unsafe-inline' *; img-src 'self' data: blob: *; media-src 'self' mediastream: blob:; connect-src * blob:">
我的 iOS 模拟器(iPhone SE iOS10.2)控制台登录启动我的应用程序:
Jan 17 19:48:24 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Pasteboard change listener callback port registered Jan 17 19:48:41 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Pasteboard change listener callback port registered Jan 17 19:48:43 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Pasteboard change listener callback port registered Jan 17 19:48:43 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Pasteboard change listener callback port registered Jan 17 19:48:43 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Pasteboard change listener callback port registered Jan 17 19:48:44 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Pasteboard change listener callback port registered Jan 17 19:48:44 baksagimms-Mac-Pro DTServiceHub[32275]: Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn Jan 17 19:48:45 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Pasteboard change listener callback port registered Jan 17 19:48:45 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Requesting installation of file:///Users/blackstone/IdeaProjects/artistapp_dia/album_app/platforms/ios/build/emulator/album_app.app/ with options: { CFBundleIdentifier = "com.ionicframework.albumapp837617"; PackageType = Developer; SimulatorRootPath = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk"; SimulatorUserPath = "/Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data"; } Jan 17 19:48:45 baksagimms-Mac-Pro installd[32260]: 0x700001f6a000 -[MIClientConnection _doInstallationForURL:withOptions:completion:]: Install of "/Users/blackstone/IdeaProjects/artistapp_dia/album_app/platforms/ios/build/emulator/album_app.app" type Developer (LSInstallType = (null)) requested by CoreSimulatorBridge (pid 32274) Jan 17 19:48:45 baksagimms-Mac-Pro installd[32260]: 0x700001f6a000 MDMCreateDeltaDirectory: calling MDMDirectoryDiff with: state->old_bundle: /Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/E8A8A135-71C8-404A-8D36-501C7ECC02AC/album_app.app state->new_bundle: /Users/blackstone/IdeaProjects/artistapp_dia/album_app/platforms/ios/build/emulator/album_app.app state->dst_bundle: /Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Library/Caches/com.apple.mobile.installd.staging/temp.rfQKOU/extracted/Payload//album_app.app, binaryDiff flag: FALSE dst_ipa: /Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Library/Caches/com.apple.mobile.installd.staging/temp.rfQKOU/extracted Jan 17 19:48:45 baksagimms-Mac-Pro installd[32260]: 0x700001de1000 __MDMDirectoryDiff_block_invoke.37: calling writeDictToFile with: /Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Library/Caches/com.apple.mobile.installd.staging/temp.rfQKOU/extracted/ManifestCache.plist Jan 17 19:48:45 baksagimms-Mac-Pro installd[32260]: 0x700001de1000 writeDictToFile: ==== Successfully wrote Manifest cache to /Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Library/Caches/com.apple.mobile.installd.staging/temp.rfQKOU/extracted/ManifestCache.plist Jan 17 19:48:46 baksagimms-Mac-Pro SpringBoard[32264]: [KeyboardArbiter] HW kbd: Failed to set (null) as keyboard focus Jan 17 19:48:46 baksagimms-Mac-Pro installd[32260]: 0x700001f6a000 -[MIInstaller performInstallationWithError:]: Installing Jan 17 19:48:46 baksagimms-Mac-Pro installd[32260]: 0x700001f6a000 -[MIInstallableBundlePatch applyPatchWithError:]: Attempting patch update of com.ionicframework.albumapp837617 from 0.0.1 (0.0.1) to 0.0.1 (0.0.1) Jan 17 19:48:46 baksagimms-Mac-Pro com.apple.CoreSimulator.SimDevice.BA74E51F-A0B7-4662-B483-EE053FA53DAB.launchd_sim[32248] (UIKitApplication:com.ionicframework.albumapp837617[0x6f91][32345]): Service exited due to Killed: 9 Jan 17 19:48:46 baksagimms-Mac-Pro backboardd[32266]: [Common] Unable to get short BSD proc info for 32345: No such file or directory Jan 17 19:48:46 baksagimms-Mac-Pro backboardd[32266]: [Common] Unable to get proc info for 32345: No such file or directory Jan 17 19:48:46 baksagimms-Mac-Pro assertiond[32269]: notify_suspend_pid() failed with error 7 Jan 17 19:48:47 baksagimms-Mac-Pro syslogd[32250]: Disabling module com.apple.appinstallation writes to /var/mobile/Library/Logs/CrashReporter/DiagnosticLogs/AppInstallation/AppInstallation.log following 6 failures (Operation Failed) Jan 17 19:48:47 baksagimms-Mac-Pro installd[32260]: 0x700001f6a000 -[MIInstallableBundle _refreshUUIDForContainer:withError:]: Data container for com.ionicframework.albumapp837617 is now at /Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Data/Application/1EE6DD04-3B43-4E5B-9A00-01841C9DD3A1 Jan 17 19:48:47 baksagimms-Mac-Pro installd[32260]: 0x700001f6a000 -[MIContainer makeContainerLiveReplacingContainer:reason:withError:]: Made container live for com.ionicframework.albumapp837617 at /Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3 Jan 17 19:48:47 baksagimms-Mac-Pro installd[32260]: 0x700001f6a000 -[MIInstaller performInstallationWithError:]: Install Successful; Staging: 1.50s; Waiting: 0.00s; Preflight/Patch: 0.44s, Verifying: 0.01s; Overall: 2.05s Jan 17 19:48:47 baksagimms-Mac-Pro appstored[32330]: [default] LaunchServices observer: Installed ( " com.ionicframework.albumapp837617 file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app >" ) {A703FE87-2740-4C0B-8AA7-9125511A3381 256} Jan 17 19:48:47 baksagimms-Mac-Pro SpringBoard[32264]: [default] LaunchServices observer: Installed ( " com.ionicframework.albumapp837617 file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app >" ) {A703FE87-2740-4C0B-8AA7-9125511A3381 256} Jan 17 19:48:47 baksagimms-Mac-Pro routined[32254]: [default] LaunchServices observer: Installed ( " com.ionicframework.albumapp837617 file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app >" ) {A703FE87-2740-4C0B-8AA7-9125511A3381 256} Jan 17 19:48:47 baksagimms-Mac-Pro nsurlsessiond[32302]: [default] LaunchServices observer: Installed ( " com.ionicframework.albumapp837617 file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app >" ) {A703FE87-2740-4C0B-8AA7-9125511A3381 256} Jan 17 19:48:47 baksagimms-Mac-Pro UserEventAgent[32251]: [default] LaunchServices observer: Installed ( " com.ionicframework.albumapp837617 file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app >" ) {A703FE87-2740-4C0B-8AA7-9125511A3381 256} Jan 17 19:48:47 baksagimms-Mac-Pro passd[32319]: [default] LaunchServices observer: Installed ( " com.ionicframework.albumapp837617 file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app >" ) {A703FE87-2740-4C0B-8AA7-9125511A3381 256} Jan 17 19:48:47 baksagimms-Mac-Pro SpringBoard[32264]: [default] LaunchServices observer: Installed ( " com.ionicframework.albumapp837617 file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app >" ) {A703FE87-2740-4C0B-8AA7-9125511A3381 256} Jan 17 19:48:47 baksagimms-Mac-Pro profiled[32321]: [default] LaunchServices observer: Installed ( " com.ionicframework.albumapp837617 file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app >" ) {A703FE87-2740-4C0B-8AA7-9125511A3381 256} Jan 17 19:48:51 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Pasteboard change listener callback port registered Jan 17 19:48:51 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Requesting launch of com.ionicframework.albumapp837617 with options: { environment = { }; } Jan 17 19:48:51 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Beginning launch sequence for bundle 'com.ionicframework.albumapp837617' retryTimeout: 120.000000 (default write com.apple.CoreSimulatorBridge LaunchRetryTimeout ) bootTimeout: 300.000000 (default write com.apple.CoreSimulatorBridge BootRetryTimeout ) bootLeeway: 120.000000 (default write com.apple.CoreSimulatorBridge BootLeeway ) Note: Use 'xcrun simctl spawn booted defaults write ' to modify defaults in the booted Simulator device. Simulator booted at: 2017-01-17 10:27:11 +0000 Current time: 2017-01-17 10:48:51 +0000 Within boot leeway: NO Jan 17 19:48:51 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Launch attempt #0 for bundle 'com.ionicframework.albumapp837617', have been trying to launch for 0 seconds. Modern launch services = YES Jan 17 19:48:51 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Got LSBundleProxy for 'com.ionicframework.albumapp837617', sequenceNumber 256, cacheGUID A703FE87-2740-4C0B-8AA7-9125511A3381 Jan 17 19:48:51 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: [Common] [FBSSystemService][0xed8e] Sending request to open "com.ionicframework.albumapp837617" Jan 17 19:48:51 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: [Common] [FBSSystemService][0xed8e] Request successful: Jan 17 19:48:51 baksagimms-Mac-Pro CoreSimulatorBridge[32274]: Launch successful for 'com.ionicframework.albumapp837617' Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: objc[32697]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x1061fe998) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x105f7d880). One of the two will be used. Which one is undefined. Jan 17 19:48:52 baksagimms-Mac-Pro logd[32259]: metadata shared cached uuid is null (using logd's shared cache info) album_app (32697) Jan 17 19:48:52 baksagimms-Mac-Pro logd[32259]: Failed to harvest strings for pathless uuid '00000000-0000-0000-0000-000000000000' Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: assertion failed: 16C67 14C89: libxpc.dylib + 62677 [0339A402-6531-30E9-8BC2-589C463CD6D6]: 0x7d Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: Apache Cordova native platform version 4.3.1 is starting. Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: Multi-tasking -> Device: YES, App: YES Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: Using UIWebView Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: [CDVTimer][handleopenurl] 0.047028ms Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: Unlimited access to network resources Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: [CDVTimer][intentandnavigationfilter] 1.711011ms Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: [CDVTimer][gesturehandler] 0.056982ms Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: [CDVTimer][file] 2.811015ms Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: [CDVTimer][splashscreen] 16.559005ms Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: [CDVTimer][statusbar] 4.653037ms Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: [CDVTimer][keyboard] 0.611007ms Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: [CDVTimer][TotalPluginStartup] 28.108001ms Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: Resetting plugins due to page load. Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: Finished load of: file:///Users/blackstone/Library/Developer/CoreSimulator/Devices/BA74E51F-A0B7-4662-B483-EE053FA53DAB/data/Containers/Bundle/Application/6D2D037E-10B7-43E0-B95B-709FCB9493F3/album_app.app/www/index.html Jan 17 19:48:52 baksagimms-Mac-Pro album_app[32697]: DEVICE READY FIRED AFTER 55 ms
如果没有安装额外的 cordova 插件,应用程序将在 iOS10 上正常运行。 任何对此有任何信息或解决方案的人请提供帮助。 谢谢。
App will work just fine on iOS10 if no additional cordova plugins are installed
我认为插件是问题的原因,而不是 CSP。您可以通过 运行 iOS 9 Simulator/Device 中的应用程序进行检查,因为 iOS 9 不关心 CSP。
根据您的日志输出,deviceready
事件正在触发,因此 Cordova 环境正在启动。我会将 Safari 远程调试器连接到 Webview。如果您使用远程调试器的 "Refresh button" 重新加载 Webview,则可能会出现控制台错误消息。如果没有,我会添加一些断点,从 deviceready
触发后的第一个动作开始,看看它失败的地方。