1.創(chuàng)建一個iOS工程
2.使用pod導(dǎo)入相關(guān)庫:
podFile例子:
# Uncomment this line to define a global platform for your project
platform :ios,'7.0'#weex sdk最低依賴的iOS版本為7.0
target'WeexProjectThird'do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for WeexProjectThird
pod'WeexSDK'#不指定版本
pod'WXDevtool','0.8.0'
pod'SDWebImage','3.7.5'
pod'SocketRocket','0.4.2'
pod'ATSDK-Weex','0.0.1'
end
執(zhí)行pod install
運行發(fā)現(xiàn)報錯:

在Targets->Build Phases->Link Binary With Libraries中添加libsqlite3.0.tbd靜態(tài)庫文件即可。
3.導(dǎo)入打包后的js文件:

4. 在appDelegate中導(dǎo)入相關(guān)庫,并初始化weex運行環(huán)境

5.在容器VC中初始化weex根容器WXSDKInstance的實例,并加載執(zhí)行導(dǎo)入的js文件:



run工程:

6.記得在dealloc中銷毀weekSDK實例:
