2.2.1 下載并安裝APICloud Studio 2
如果系統(tǒng)沒有安裝GIT屡立,IDE會先提醒你安裝鲫剿,按著提示來就可以,最后重啟電腦再打開APICloud Studio 2
2.2.2 下載并安裝 WebStorm
2.2.3 本地環(huán)境搭建
在APICloud Studio登錄帳號洪囤,之后在上方菜單欄中依次選擇“代碼管理”“代碼檢出”“ApiCloud云端應(yīng)用”將剛才創(chuàng)建的項(xiàng)目基礎(chǔ)代碼同步到本地跑慕。
選擇項(xiàng)目
2.2.4 刪掉默認(rèn)文件夾下用不到的東西万皿,并添加一些基礎(chǔ)類庫(css,js)
最終目錄結(jié)構(gòu)目錄結(jié)構(gòu)
2.2.5 配置config.xml文件,具體各個(gè)配置項(xiàng)的含義請參考config.xml應(yīng)用配置說明
<widget id="A6058707118155" version="0.0.1">
<name>app開發(fā)筆記</name>
<description>app開發(fā)筆記</description>
<author email="@qq.com" href="">一個(gè)被編程耽誤的醫(yī)生</author>
<content src="index.html"/>
<access origin="*"/>
<preference name="pageBounce" value="false"/>
<preference name="appBackground" value="rgba(0,0,0,0.0)"/>
<preference name="windowBackground" value="rgba(0,0,0,0.0)"/>
<preference name="frameBackgroundColor" value="rgba(0,0,0,0.0)"/>
<preference name="hScrollBarEnabled" value="true"/>
<preference name="vScrollBarEnabled" value="true"/>
<preference name="autoLaunch" value="true"/>
<preference name="fullScreen" value="false"/>
<preference name="autoUpdate" value="true"/>
<preference name="smartUpdate" value="false"/>
<preference name="debug" value="true"/>
<preference name="statusBarAppearance" value="true"/>
<preference name="softInputBarEnabled" value="false"/>
<permission name="readPhoneState"/>
<permission name="camera"/>
<permission name="record"/>
<permission name="location"/>
<permission name="fileSystem"/>
<permission name="internet"/>
<permission name="bootCompleted"/>
<permission name="hardware"/>
</widget>
2.2.6 在index.html文件中寫入以下代碼:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>app開發(fā)筆記</title>
<link rel="stylesheet" type="text/css" href="./css/Hui.css"/>
</head>
<body class="H-center-all H-height-100-percent">
<div class="H-font-size-24 H-theme-font-color1">hello world</div>
<script type="text/javascript" src="./script/api.js"></script>
</body>
</html>
2.2.6 對代碼進(jìn)行本地提交
① 在APICloud Studio 2中右鍵項(xiàng)目根目錄選擇“Git”->“Git add+commit”
“Git”->“Git add+commit”
② 提交更新內(nèi)容核行,CTRL+S保存
更新內(nèi)容
2.2.7 將代碼提交云端
① 在APICloud Studio 2中右鍵項(xiàng)目根目錄選擇“代碼管理”->“同步到云端”
“代碼管理”->“同步到云端”
② 右邊顯示“成功與云端同步數(shù)據(jù)”表示提交成功
成功與云端同步數(shù)據(jù)
2.2.8 編譯自定義loader(我個(gè)人理解“自定義loader”就是一個(gè)容器牢硅,其他具體的解釋請看自定義loader說明)
① 在APICloud Studio 2中右鍵項(xiàng)目根目錄選擇“云編譯自定義AppLoader”
編譯自定義loader
② 在右邊彈出的窗口中選擇“編譯IOS自定義loader”和“編譯Android自定義loader”即可
“編譯IOS自定義loader”和“編譯Android自定義loader”
③ 稍等一會,將安裝包下載到手機(jī)中芝雪。
2.2.9 安裝自定義loader->打開->設(shè)置wifi同步地址->wifi全量同步
2.2.10 hello world
hello world