iOS的
iOS的要安装Xcode,否则执行下面命令的时候报错
ionic platform add ios
ionic build ios
ionic emulate ios
方法二:
1.打开终端 -- brew install node
2.找到项目文件夹
ls (根路径下所有文件) -- cd user -- ls -- cd appid(对应的id) -- ls
3.安装cordova -- npm install -g [email protected]
4.安装gulp -- npm install gulp -g (全局安装)
npm install gulp --save-dev (本地安装)
安装gulp 的插件
5.Cannot find module ‘internal/fs‘ -- npm install -- npm outdated -g
6.更新 npm -- npm -g install [email protected](版本号2.9.1 可以根据已发布的版本随意升级或降级)
7.cordova run with ios error .. Error code 65 for command: xcodebuild with args:
解决方案: ionic platform remove ios ionic platform add ios 或 cordova platform update ios
8.打包
ionic有package命令,试过始终是error server
使用xcode
打开xcode,file/open,选择IOS里的name.xcodeproj项目文件
先把模拟器类型选成iOS Device
XCode菜单栏 -- Product -- Archive
Export然后选择你要打包的类型
<code class="hljs avrasm has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: ‘Source Code Pro‘, monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;"><span class="hljs-label" style="box-sizing: border-box;">http:</span>//jingyan<span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">.baidu</span><span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">.com</span>/article/ceb9fb10f4dffb8cad2ba03e<span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">.html</span></code>
小结:
1.xcode8 打包
ionic platform add ios -- ionic resources -- ionic build ios