因为我的项目是在已存在的项目上开发的,所以那些创建page这些我暂时不考虑,先将项目能在Xcode运行成功。
(1)去Appstore安装devApp,在terminal运行ionic serve,手机端连接 与Mac一样的WIFI,就会接收到我们运行的项目。
=======================================================================================
这部分是能在Xcode打开并运行的步骤:
1、 ionic capacitor add ios //生成的本地项目,如果它不存在
----------以下报错是因为有个文件,同事没给,泪目ing。^&^
npm ERR! path /Users/admin/fairviewpark_bmo_app/node_modules/CDVTapNGoSDK
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access '/Users/admin/fairviewpark_bmo_app/node_modules/CDVTapNGoSDK'
npm ERR! enoent This is related to npm not being able to find a file.
----------------以下报错是因为项目没法安装sdk,那实在没办法安装的时候只能是叫之前开发这个项目的同事给个完整的压缩项目,从中提取该文件,自己添加:
[error] Unable to find node_modules/com.XXX.tapngosdk. Are you sure com.XXX.tapngosdk is installed?
[ERROR] An error occurred while running subprocess capacitor.
capacitor add ios exited with exit code 1.
成功截图如下:
2、ionic cordova prepare ios
3、 ionic capacitor open ios //运行以下命令,Xcode中打开应用程序:
4、如果你项目使用cocoapods管理的,记得一定要在iOS项目目录下 pod install
暂时就是这样啦!!!!!!