簡體   English   中英

離子 - 應用程序掛在啟動畫面上

[英]Ionic - app hangs on splash screen

我的離子應用程序掛在啟動屏幕上 - 它工作正常,然后我添加了一些代碼,然后去測試,它就被卡住了。

它達到了這一點:

------ Debug phase ------
Starting debug of 2e5ac6066864be48322a757c4d0ccdfde52cf356 (N51AP, iPhone 5s (GSM), iphoneos, arm64) a.k.a. 'Eamon White’s iPhone' connected through USB...
[  0%] Looking up developer disk image
[ 90%] Mounting developer disk image
[ 95%] Developer disk image already mounted
[100%] Connecting to remote debug server
-------------------------
(lldb) command source -s 0 '/tmp/2F06F4BB-A7E5-4B97-87EC-A01CBEE5661A/fruitstrap-lldb-prep-cmds-2e5ac6066864be48322a757c4d0ccdfde52cf356'
Executing commands in '/tmp/2F06F4BB-A7E5-4B97-87EC-A01CBEE5661A/fruitstrap-lldb-prep-cmds-2e5ac6066864be48322a757c4d0ccdfde52cf356'.
(lldb)     platform select remote-ios --sysroot '/Users/eamonwhite/Library/Developer/Xcode/iOS DeviceSupport/10.3.3 (14G60)/Symbols'
  Platform: remote-ios
 Connected: no
  SDK Path: "/Users/eamonwhite/Library/Developer/Xcode/iOS DeviceSupport/10.3.3 (14G60)/Symbols"
(lldb)     target create "/Users/eamonwhite/ionicmane/myapp/platforms/ios/build/device/myApp.app"
Current executable set to '/Users/eamonwhite/ionicmane/myapp/platforms/ios/build/device/myApp.app' (arm64).
(lldb)     script fruitstrap_device_app="/private/var/containers/Bundle/Application/5EBCC0EF-FDB9-4DE7-A961-D91B6139AEA0/myApp.app"
(lldb)     script fruitstrap_connect_url="connect://127.0.0.1:50188"
(lldb)     target modules search-paths add /usr "/Users/eamonwhite/Library/Developer/Xcode/iOS DeviceSupport/10.3.3 (14G60)/Symbols/usr" /System "/Users/eamonwhite/Library/Developer/Xcode/iOS DeviceSupport/10.3.3 (14G60)/Symbols/System" "/private/var/containers/Bundle/Application/5EBCC0EF-FDB9-4DE7-A961-D91B6139AEA0" "/Users/eamonwhite/ionicmane/myapp/platforms/ios/build/device" "/var/containers/Bundle/Application/5EBCC0EF-FDB9-4DE7-A961-D91B6139AEA0" "/Users/eamonwhite/ionicmane/myapp/platforms/ios/build/device" /Developer "/Users/eamonwhite/Library/Developer/Xcode/iOS DeviceSupport/10.3.3 (14G60)/Symbols/Developer"
(lldb)     command script import "/tmp/2F06F4BB-A7E5-4B97-87EC-A01CBEE5661A/fruitstrap_2e5ac6066864be48322a757c4d0ccdfde52cf356.py"
(lldb)     command script add -f fruitstrap_2e5ac6066864be48322a757c4d0ccdfde52cf356.connect_command connect
(lldb)     command script add -s asynchronous -f fruitstrap_2e5ac6066864be48322a757c4d0ccdfde52cf356.run_command run
(lldb)     command script add -s asynchronous -f fruitstrap_2e5ac6066864be48322a757c4d0ccdfde52cf356.autoexit_command autoexit
(lldb)     command script add -s asynchronous -f fruitstrap_2e5ac6066864be48322a757c4d0ccdfde52cf356.safequit_command safequit
(lldb)     connect
(lldb)     run
success
(lldb)     safequit
Process 7681 detached

deviceready消息永遠不會到來。

我做的一件事是有點相關的,當我正在建設或者離子時我要求將ios-deploy從1.9.1升級到1.9.2。 我認為這是在我這樣做之后開始發生的。 我試着恢復到1.9.1,但它不會讓我:

ld: framework not found MobileDevice
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **


The following build commands failed:
    Ld build/Release/ios-deploy normal x86_64
(1 failure)
npm ERR! Darwin 17.0.0
npm ERR! argv "/usr/local/Cellar/node/7.7.3/bin/node" "/usr/local/bin/npm" "install" "-g" "ios-deploy@1.9.1"
npm ERR! node v7.7.3
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE

npm ERR! ios-deploy@1.9.1 preinstall: `./src/scripts/check_reqs.js && xcodebuild`
npm ERR! Exit status 65
npm ERR! 
npm ERR! Failed at the ios-deploy@1.9.1 preinstall script './src/scripts/check_reqs.js && xcodebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ios-deploy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./src/scripts/check_reqs.js && xcodebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ios-deploy
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ios-deploy
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/eamonwhite/Downloads/ionicmane-master/npm-debug.log

這可能不是問題。 我真的可以使用一些幫助我接近截止日期。

UPDATE

當我嘗試在xcode運行時,會發生同樣的事情,但xcode會出現以下錯誤:

2017-10-10 15:49:17.417901-0400 myApp[8476:3520766] Resetting plugins due to page load.
2017-10-10 15:49:38.433127-0400 myApp[8476:3520766] Failed to load webpage with error: The request timed out.

UPDATE

我想出了導致這種情況的原因 - 它是livereload - 如果我運行它沒有那么好......但我有點需要它來開發。

我沒有在手機上啟用wifi ,因此無法連接到ionic

根據我的經驗,我們有相同的問題, deviceready從未在我們的控制台日志中顯示,最可能的情況是Cordova插件的不一致,你可以做的一件事是重新安裝插件並嘗試刪除你的平台文件夾並使其干凈使用npm cache clean構建。

更新:

根據您的更新,您如何運行您的ios應用程序?

您是否使用-l -c命令運行您的應用程序,如下所示:

ionic run ios -l -c

如果是這種情況,您可能會注意到此命令更改了config.xml文件中的一行:

//來自<content src="index.html"/>

//到<content src="localhost//192.1.168.0:8000" original-src="index.html"/>

因此,將其更改回<content src="index.html"/>可能會解決問題。

解決方案2:

您可能需要以下列方式將localhost列入白名單:

<allow-navigation href="http://localhost:8100/*"/>

我最好的猜測是你的iPhone還沒有為iOS11准備調試器。 它是在第一次在新的iOS版本上運行您的應用程序時這樣做的。 你必須使用XCode打開並運行你的項目然后你應該沒事。 另請確保您擁有最新版本的cordova-ios,即4.5.1 (檢查config.xml<engine name=ios">標記)。

檢查config.xml中是否包含以下標記

<allow-navigation href="*"/>

您也可以檢查這是僅在iOS中還是在Android中觀察到的。

用Ionic 4進入這個。加入iOS平台后,運行以下工作:

 ionic cordova prepare ios

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM