私は私のアプリは、アンドロイド(〜7.0 5.0)上で完璧に動作イオン2/2角度イオン2とiOS10 CSP闘争
でAndroidとiOSのための10のアプリを開発しています。しかし、iOS 10では、私のアプリは起動時に白い画面を渡すことはありません。
私のアプリは私のサーバーからJSONを取得するためにangular2のHTTPリクエストを使用します。他のコードブラウザプラグイン(Zip、File、File-Transfer)とionic2ストレージ(私はcordova sqliteをインストールしていません)
私はそれについて検索しましたが、解決策はContent-Security-Policyメタタグを正しく設定していると思います。
しかし、私は様々なメタタグを試してみましたが、残念ながら、私はまだiOSの10
(とやCSPタグなしの両方のAndroid仕事の)私が試してみました更新、再上の白い画面で立ち往生していますすべてのコンポーネントとプラグインをインストールします。追加したり、OSのプラットフォームを削除したり、イオン状態のリセットなどを試しましたが、解決策がなくても絶望的です。
ここに私の現在のメタタグは、(headタグ内とタイトルタグの上) '/src/index.html' にあります:
<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
追加のコルドバのプラグインがインストールされていない場合はアプリケーションがiOS10でうまく動作します。 これについての情報や解決策をお持ちの方はお気軽にお問い合わせください。 ありがとうございます。
提案ありがとうございます。これまで私が知っていることをheres:cordova.fileは、私のアプリでは未定義を返します。それはアンドロイドにフルシステムファイルのディレクトリオブジェクトを返します。 cordova.file.dataDirectoryを使用すると、私のアプリは白い画面に止まります。 xcodeコンソールでconsole.log(cordova.file)を実行すると、理想的には適切なデータが返されます。なぜこれが起きているのか? –
ああ...彼らはcordova-file iOS10ビルドを追加したばかりです。ちょうど昨日。 –