2016-10-18 2 views
0

Ionicを使ってハイブリッドモバイルアプリケーションを構築しているモバイルプロジェクトを継承しました。 iOSでは、ネイティブアプリケーションの代わりにWKWebViewを使用しています。したがって、ローカルWebサーバーは、ローカルファイルにアクセスするためにデバイス上で実行する必要があります。cordova-plugin-webserver:サーバーが起動する前にアプリケーションがindex.htmlをロードしようとしました

私が抱えている問題は、Webサーバーが起動する前にアプリケーションがindex.htmlページを読み込もうとしていたため、見つからないエラーページが表示されてしまうことです。このプロジェクトは、Xcodeでうまく構築され、エミュレータと実際のiPhoneデバイスで正常に読み込まれます。以下はXCodeのランタイムログです。

提案がありますか?これを理解しようと努力している年齢を過ごしましたが、それでも賢明ではありません。オリジナルの開発者はこの問題を抱えておらず、何が起こっているのか分からなかったので、ちょっと固まってしまいました。

objc[15705]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0xd73b400) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0xd5835d0). One of the two will be used. Which one is undefined. 
2016-10-18 15:41:24.532393 Pond Mobile[15705:4405101] bundleid: com.networkforlearning.pondmobile, enable_level: 0, persist_level: 0, propagate_with_activity: 0 
2016-10-18 15:41:24.533854 Pond Mobile[15705:4405101] subsystem: com.apple.siri, category: Intents, enable_level: 1, persist_level: 1, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0 
2016-10-18 15:41:24.593065 Pond Mobile[15705:4405217] subsystem: com.apple.UIKit, category: HIDEventFiltered, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 
2016-10-18 15:41:24.596956 Pond Mobile[15705:4405217] subsystem: com.apple.UIKit, category: HIDEventIncoming, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 
2016-10-18 15:41:24.624170 Pond Mobile[15705:4405209] subsystem: com.apple.BaseBoard, category: MachPort, enable_level: 1, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0 
2016-10-18 15:41:24.629 Pond Mobile[15705:4405101] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/david/Library/Developer/CoreSimulator/Devices/E9039A9E-072A-4695-BECF-602652B235F1/data/Containers/Data/Application/7064EC16-1336-432A-A63B-8A68F2C83E92/Library/Cookies/com.networkforlearning.pondmobile.binarycookies 
2016-10-18 15:41:24.636391 Pond Mobile[15705:4405101] subsystem: com.apple.libsqlite3, category: logging, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 
2016-10-18 15:41:24.676830 Pond Mobile[15705:4405101] subsystem: com.apple.UIKit, category: StatusBar, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 
2016-10-18 15:41:24.731 Pond Mobile[15705:4405101] Apache Cordova native platform version 3.9.2 is starting. 
2016-10-18 15:41:24.732 Pond Mobile[15705:4405101] Multi-tasking -> Device: YES, App: YES 
2016-10-18 15:41:24.740 Pond Mobile[15705:4405101] Unlimited access to network resources 
2016-10-18 15:41:24.823 Pond Mobile[15705:4405101] Using a WKWebView 
2016-10-18 15:41:24.850863 Pond Mobile[15705:4405101] subsystem: com.apple.SystemConfiguration, category: SCNetworkReachability, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 2, enable_private_data: 0 
2016-10-18 15:41:24.870598 Pond Mobile[15705:4405101] subsystem: com.apple.UIKit, category: GestureEnvironment, enable_level: 0, persist_level: 0, default_ttl: 1, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 
2016-10-18 15:41:24.879 Pond Mobile[15705:4405101] [CDVTimer][base64togallery] 0.075996ms 
2016-10-18 15:41:24.908 Pond Mobile[15705:4405101] [CDVTimer][file] 28.217018ms 
2016-10-18 15:41:24.930 Pond Mobile[15705:4405101] [CDVTimer][statusbar] 21.950006ms 
2016-10-18 15:41:24.935036 Pond Mobile[15705:4405101] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/david/Library/Developer/CoreSimulator/Devices/E9039A9E-072A-4695-BECF-602652B235F1/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles 
2016-10-18 15:41:24.937783 Pond Mobile[15705:4405101] [MC] Filtering mail sheet accounts for bundle ID: com.networkforlearning.pondmobile, source account management: 1 
2016-10-18 15:41:24.941691 Pond Mobile[15705:4405101] [MC] Result: NO 
2016-10-18 15:41:24.941 Pond Mobile[15705:4405101] [CDVTimer][socialsharing] 10.565996ms 
2016-10-18 15:41:24.943 Pond Mobile[15705:4405101] [CDVTimer][keyboard] 1.223028ms 
2016-10-18 15:41:24.943 Pond Mobile[15705:4405101] [CDVTimer][TotalPluginStartup] 64.150035ms 
2016-10-18 15:41:24.943 Pond Mobile[15705:4405101] ERROR: Start Page at 'http://localhost:12344' was not found. 
[DEBUG] Did open IPv4 listening socket 9 
[DEBUG] Did open IPv6 listening socket 10 
[INFO] GCDWebServer started on port 12344 and reachable at http://localhost:12344/ 
2016-10-18 15:41:24.955 Pond Mobile[15705:4405101] Started http daemon: http://localhost:12344/ 
2016-10-18 15:41:24.955 Pond Mobile[15705:4405101] active 
2016-10-18 15:41:24.961319 Pond Mobile[15705:4405101] subsystem: com.apple.BackBoardServices.fence, category: App, enable_level: 1, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0 
2016-10-19 08:35:33.688606 Pond Mobile[15705:4405101] subsystem: com.apple.UIKit, category: Touch, enable_level: 0, persist_level: 0, default_ttl: 1, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 
2016-10-19 08:35:33.785352 Pond Mobile[15705:4405101] subsystem: com.apple.UIKit, category: Gesture, enable_level: 0, persist_level: 0, default_ttl: 1, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 
2016-10-19 08:35:33.927915 Pond Mobile[15705:4405101] subsystem: com.apple.UIKit, category: GestureExclusion, enable_level: 0, persist_level: 0, default_ttl: 1, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 

答えて

1

これはxCode/iOSのアップデートでよく見られる問題です(これは以前の開発者ではなかったようです)。依存関係として、明示的(または暗黙的な)PhotoLibraryServices.frameworkまたはAssetsLibraryServices.frameworkを使用しています

あなたのアプリ(または、ポッドなどの依存関係は、)フレームワークを使用している場合は、:別のSOの質問(下のリンク)から

Xcodeはあなたに警告します(あなたがそれらの1つだけを使用していても)。それはPhotos/PhotosUI.frameworkまたはAssetsLibrary.framework、または別のものです(依存関係の完全なリストはありませんが、可能です)。

何が問題ですか?

PLBuildVersionという名前のクラスは、 PhotoLibraryServices.frameworkとAssetsLibraryServices.frameworkで定義されています。 Objective-Cではクラス名が一意であるため(同じ名前の で2つのクラスを定義することはできません)、実行時にどのクラスが使用されるかは未定義です。

この問題を解消するには、stackoverflowstackoverflowからこの回答をチェックしてください。それでもうまくいかない場合は、GitHubもご覧ください(似たような問題を抱えている人、最近の人)があなたのコードのバグかもしれません。

+0

おかげで動作しますが、そのどれもが、ここで助けていないようにみえます。私はPLBuildVersionの警告を消すことができませんでしたが、私が読んだところからは、とにかく問題を引き起こすはずです。 –

0

は、私は私のconfig.xmlで<content src="http://localhost:20000/index.html" /><content src="http://localhost:20000" />を変更しなければならなかったが判明し、今ではアイデアを

関連する問題