====== 移动端浏览器兼容性 ======
H5正式因为能被应用于各个地方,各种场景所以情况太多了。
我们先测试低于600px分辨率(指的是显示分辨率,不是物理分辨率)的手机
第一优先级:
对于iPhone:(共8种情况)
iphone4s(ios8.1.1或者ios9的最新小版本);
iphone5,iphone5s,iphone6, iphone6 plus, iphone6s, iphone6s plus(ios9最新小版本) 【(iphone5,iphone5s),(iphone6,iphone6s),(iphone6 plus,iphone6s plus)两种中只测一种】
浏览器:支持微信最新中文版,以及自带的Safari浏览器
对于Android:(共16种情况)
华为荣耀7,华为P8,魅族MX5,Oppo R7, 小米note,小米4,galaxy note2(或者note4), galaxy S2(或者S4,S6) S6(对应的操作系统都是系统本身能够升级到的对应最新版)
浏览器:最新版的微信 以及自带的浏览器。
第二优先级才是考虑:
其他一些Android手机上的微信,以及自带的浏览器。
第三优先级考虑对pad等的支持。
也是只支持最新的微信,最新的操作系统和 自带的浏览器
不在考虑的范围内的:(如果出现了问题,能解决的就尽量解决,如果解决不了,可以跟用户说请用默认浏览器)
在iPhone上装的各种其他浏览器:比如Chrome,UC,QQ,海豚,百度,手机火狐。
Android上装其他各种浏览器。
jquery
zeptolar
angularjs
react.js
关于如何使用Ionic
//用来安装ionic的
npm install -g cordova ionic
//创建一个项目:
ionic start myApp blank
ionic start myApp tabs
ionic start myApp sidemenu
//运行这个项目
$ cd myApp
$ ionic platform add ios
$ ionic build ios
$ ionic emulate ios
====== 国内npm镜像 ======
精华 使用npm安装一些包失败了的看过来(npm国内镜像介绍)
发布于 3年前 作者 wppept 36894 次浏览
这个也是网上搜的,亲自试过,非常好用!
镜像使用方法(三种办法任意一种都能解决问题,建议使用第三种,将配置写死,下次用的时候配置还在):
1.通过config命令
npm config set registry https://registry.npm.taobao.org
npm info underscore (如果上面配置正确这个命令会有字符串response)
2.命令行指定
npm --registry https://registry.npm.taobao.org info underscore
3.编辑 ~/.npmrc 加入下面内容
registry = https://registry.npm.taobao.org
搜索镜像: https://npm.taobao.org
建立或使用镜像,参考: https://github.com/cnpm/cnpmjs.org
现在creator上设置好,然后通过命令导出来:
D:\git-new>ionic start qiangungun2 creator:256358ba4f00
Creating Ionic app in folder D:\git-new\qiangungun2 based on creator:256358ba4f00 project
Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip
[=============================] 100% 0.0s
Downloading Creator Prototype: https://apps.ionic.io\api\v1\creator\256358ba4f00\download\html
Update config.xml
Initializing cordova project
Updated the hooks directory to have execute permissions
running cordova plugin add org.apache.cordova.device
WARNING: org.apache.cordova.device has been renamed to cordova-plugin-device. You may not be getting the latest version
We suggest you `cordova plugin rm org.apache.cordova.device` and `cordova plugin add cordova-plugin-device`.
Fetching plugin "org.apache.cordova.device" via cordova plugins registry
npm http GET http://registry.cordova.io/org.apache.cordova.device
npm http 200 http://registry.cordova.io/org.apache.cordova.device
npm http GET http://cordova.iriscouch.com/registry/_design/app/_rewrite/org.apache.cordova.device/-/org.apache.cordova.
evice-0.3.0.tgz
npm http 200 http://cordova.iriscouch.com/registry/_design/app/_rewrite/org.apache.cordova.device/-/org.apache.cordova.
evice-0.3.0.tgz
Saving plugin to package.json file
Adding since there was no existingPlugin
Updated the hooks directory to have execute permissions
running cordova plugin add org.apache.cordova.console
WARNING: org.apache.cordova.console has been renamed to cordova-plugin-console. You may not be getting the latest versi
n! We suggest you `cordova plugin rm org.apache.cordova.console` and `cordova plugin add cordova-plugin-console`.
Fetching plugin "org.apache.cordova.console" via cordova plugins registry
npm http GET http://registry.cordova.io/org.apache.cordova.console
npm http 200 http://registry.cordova.io/org.apache.cordova.console
npm http GET http://cordova.iriscouch.com/registry/_design/app/_rewrite/org.apache.cordova.console/-/org.apache.cordova
console-0.2.13.tgz
npm http 200 http://cordova.iriscouch.com/registry/_design/app/_rewrite/org.apache.cordova.console/-/org.apache.cordova
console-0.2.13.tgz
Saving plugin to package.json file
Adding since there was no existingPlugin
Updated the hooks directory to have execute permissions
running cordova plugin add com.ionic.keyboard
Fetching plugin "com.ionic.keyboard" via cordova plugins registry
npm http GET http://registry.cordova.io/com.ionic.keyboard
npm http GET http://registry.cordova.io/com.ionic.keyboard
npm http 200 http://registry.cordova.io/com.ionic.keyboard
npm http GET http://cordova.iriscouch.com/registry/_design/app/_rewrite/com.ionic.keyboard/-/com.ionic.keyboard-1.0.4.t
z
npm http 200 http://cordova.iriscouch.com/registry/_design/app/_rewrite/com.ionic.keyboard/-/com.ionic.keyboard-1.0.4.t
z
Saving plugin to package.json file
Adding since there was no existingPlugin
Replacing Ionic lib references with lib/ionic
Your Ionic project is ready to go! Some quick tips:
* cd into your project: $ cd qiangungun2
* Setup this project to use Sass: ionic setup sass
* Develop in the browser with live reload: ionic serve
* Add a platform (ios or Android): ionic platform add ios [android]
Note: iOS development requires OS X currently
See the Android Platform Guide for full Android installation instructions:
https://cordova.apache.org/docs/en/edge/guide_platforms_android_index.md.html
* Build your app: ionic build
* Simulate your app: ionic emulate
* Run your app on a device: ionic run
* Package an app using Ionic package service: ionic package
For more help use ionic --help or visit the Ionic docs: http://ionicframework.com/docs
+---------------------------------------------------------+
+ New Ionic Updates for May 2015
+
+ The View App just landed. Preview your apps on any device
+ http://view.ionic.io
+
+ Invite anyone to preview and test your app
+ ionic share EMAIL
+
+ Generate splash screens and icons with ionic resource
+ http://ionicframework.com/blog/automating-icons-and-splash-screens/
+
+---------------------------------------------------------+