JSPatch新手入门

来源:互联网 发布:php代练工作室网站源码 编辑:程序博客网 时间:2024/05/22 01:15

今日  卤煮的领导+搭档让卤煮去学习JSPatch  卤煮一脸蒙圈的开始了菜鸟的学习之路

资料:http://jspatch.com/Docs/intro

http://blog.cnbang.net/

https://github.com/bang590/JSPatch/wiki/JSPatch-%E5%9F%BA%E7%A1%80%E7%94%A8%E6%B3%95#%E8%A6%86%E7%9B%96%E7%B1%BB%E6%96%B9%E6%B3%95

http://bang590.github.io/JSPatchConvertor/

第一步:新建工程的时候记得:更改网络配置  使项目能网络请求

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

第二步:在APPDelegate  的

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [JSPatch startWithAppKey:@"   "];
    [JSPatch sync];

    return YES;
}


第三步:新建一个main.js 的文件 强烈推荐Sublime  写好对应的js代码  然后将程序大概运行到第二次的时候 应该就更新成功了


OC 转JS:http://bang590.github.io/JSPatchConvertor/


第四步,卤煮最近在学习bang神的demo踩到过的坑说下:先是cocopods拉下去找不到仓库,pod install之后“[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `dribbbleDemo` to `Pods/Target Support Files/Pods-dribbbleDemo/Pods-dribbbleDemo.debug.xcconfig` or include the `Pods/Target Support Files/Pods-dribbbleDemo/Pods-dribbbleDemo.debug.xcconfig` in your build configuration.

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `dribbbleDemo` to `Pods/Target Support Files/Pods-dribbbleDemo/Pods-dribbbleDemo.release.xcconfig` or include the `Pods/Target Support Files/Pods-dribbbleDemo/Pods-dribbbleDemo.release.xcconfig` in your build configuration.” 然后卤煮选择Project  ------>configurations ---------->选择None  再重新 pod update 这时候灾难再次出现 这时候注意关键词 “Library not found”  然后就去检查将多余的libPods库删掉  ,原因可以去参考http://www.cnblogs.com/dyllove98/archive/2013/08/03/3235495.html  卤煮的目前水平不能分析理解

1 0
原创粉丝点击