离子 - 应用程序挂在启动画面上

时间:2017-10-08 15:00:05

标签: ios iphone ionic-framework deployment 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

这可能不是问题。我真的可以使用一些帮助我接近截止日期。

更新

当我尝试在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.

更新

我弄清楚造成这种情况的原因 - 它是livereload - 如果我没有那么好就运行它......但我有点需要它来开发。

5 个答案:

答案 0 :(得分:5)

我手机上没有启用wifi,因此无法连接到ionic

答案 1 :(得分:1)

根据我的经验,我们有相同的问题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/*"/>

答案 2 :(得分:0)

我最好的猜测是你的iPhone还没有为iOS11准备调试器。它是在第一次在新的iOS版本上运行您的应用程序时这样做的。你必须使用XCode打开并运行你的项目然后你应该没事。另请确保您拥有最新版本的cordova-ios 4.5.1(请查看<engine name=ios">中的config.xml标记。

答案 3 :(得分:0)

检查config.xml中是否有以下标记

<allow-navigation href="*"/>

您也可以检查这是仅在iOS中还是在Android中观察到的。

答案 4 :(得分:0)

使用Ionic 4进行操作。添加iOS平台后,运行以下工作:

 ionic cordova prepare ios