应用Build时报错 Cordova app failing to Archive with Xcode 7.1 (Cordova/CDVViewController.h file not found)
解决方法
加入这行命令在 Build Settings -> Header Search Paths
:
1 | "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" |
Ionic IOS9访问http受到限制
错误:
Application Transport Security has blocked a cleartext HTTP (http\://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
解决方法:
手动在 项目名-Info.plist
第一个<dict>
标签下添加下面标签
1 | <key>NSAppTransportSecurity</key> |
cordova 插件使用命令
1 | //安装插件 |
隐藏topbar
1 | <ion-view hide-nav-bar="true"> |
关闭安卓转场特效
1 | $ionicConfigProvider. platform.android.views.transition=none |
多modal显示问题
1 | $ionicModal.fromTemplateUrl('templates/modal-login.html', { |
加入id 索引值来区分多个modal
使Chrome和Chromium实现跨域请求
通过命令行启动:
1 | open -a "Google Chrome" --args --disable-web-security |
cordova/ionic emulate 时选择模拟器版本(iOS)
在项目的根目录下:
1 | $ ./platforms/ios/cordova/lib/list-emulator-images |
运行模拟器任务
1 | ionic run ios --target iPhone-5 |
注意:iPhone别写成iphone。