ionic platform add ios 报错
2016-08-22在安装官方指引创建了一个ionic v2的app之后,执行platform add ios报错:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
$ ionic platform add ios Adding ios project... Creating Cordova project for the iOS platform: Path: platforms/ios Package: io.ionic.starter Name: V2 Test iOS project created with cordova-ios@4.2.0 Running command: /Users/nishurong/PhpstormProjects/ionic-workspace/H5APP/hooks/after_prepare/010_add_platform_class.js /Users/nishurong/PhpstormProjects/ionic-workspace/H5APP Error: spawn EACCES |
解决方案是:
1 2 3 |
$ ionic hooks add Adding in default Ionic Cordova hooks Added default Ionic Cordova hooks |
然后继续执行add ios,即可。
注意,先进入platforms目录,如果存在ios目录,先删除掉,否则,执行run ios命令的时候,会出现下面的错误:
1 2 3 4 |
/Users/xueron/PhpstormProjects/ionic-workspace/H5APP/platforms/ios/V2 Test/Classes/MainViewController.h:28:9: fatal error: 'Cordova/CDVViewController.h' file not found #import <Cordova/CDVViewController.h> ^ 1 error generated. |
分类:技术 | 标签: ionic |
发表评论