Simulator shows Black screen using ionic

前端 未结 4 1680
我寻月下人不归
我寻月下人不归 2021-02-01 20:48

i went through ionic sidemenu app when i run emulate ios i get these errors:

 Usage of \'--family\' is deprecated in 3.x. Use --devicetypeid instead.
 Usage of \         


        
4条回答
  •  伪装坚强ぢ
    2021-02-01 21:24

    I finally found a solution to fix this problem First setup your application:

    1- ionic start myAppname tabs

    2- cd myAppname

    3- ionic platform add iOS

    4- ionic build ios

    Then create a file in your projects directory called emulator.sh or whatever name and copy the content of the code below:

    echo "Emulating..."
    cd ./platforms/ios/build/emulator
    var=$(pwd)
    
    ios-sim launch "$var"/*.app
    

    Set permission for the script: $sudo chmod 777 emulator.sh

    whenever you want to emulate your application run the script: ./emulator.sh

    so by using this script you don't need to manually open the project in Xcode and run the project

    special thanks to Miroslav Masa

提交回复
热议问题