zoukankan      html  css  js  c++  java
  • xocde项目建立,一些基本配置以及cocoapos一些使用

    关于Bitcode:http://www.cocoachina.com/bbs/read.php?tid-320431.html

    cocoapos使用

      1 检查ruby源(Mac下的ruby似乎是用作GUI开发的)gem sources -l

      2 移除 跟新:gem sources --remove https://rubygems.org/ 

        gem sources -a http://rubygems-china.oss.aliyuncs.com

      3 查看ruby源 gem sources -l

      镜像能否使用很重要,

      4 安装 sudo gem install cocoapods

    错误解决:http://www.cnblogs.com/yan520/p/5583362.html

     

    在安装好cocoapods确保没问题后,开始使用pod,

      5 在项目的根目录下,添加Podfile文件(touch Podfile)

      使用pod search AFNetworking来检查pod是否安装成功,成功会列出所有AFNetworking版本,安装命令等;(使用回车命令查看所有版本,使用q命令推出当前搜索)

      6 pod --version 检查当前版本

      报错:The dependency `AFNetworking (~> 3.1.0)` is not used in any concrete target.

      新版pod要求写出使用了第三方的target;

      7 然后使用命令:

    platform :ios, '7.0'
    target "ocTool" do
    pod 'AFNetworking', '~> 3.1.0'
    end

      其中ocTool为我当前项目的名称

      8 安装成功;

    需要添加或者删除某个库,直接在Podfile文件里编辑然后在终端下执行:pod install

    podfile可使用sublime编辑

     

    其他:

    1 当你的项目中有多个target时,使用命令为

    link_with 'one', 'two'

    pod 'AFNetworking', '~> 3.1.0'
    end

    one和two为你target名称;

    2 不同target使用不同库

    target "one" do
    pod 'AFNetworking', '~> 3.1.0'
    end

    target "two" do
    pod 'SwiftyJSON', '~> 3.1.0'
    end

    报错:[!] Pods written in Swift can only be integrated as frameworks; add `use_frameworks!` to your Podfile or target to opt into using it. The Swift Pods being used are:*****

    解决:use_frameworks! # 这条语句是配置Swift项目的Podfile文件必须加的代码,支持动态库(Swift只支持动态库编译) 

    其他使用:http://blog.csdn.net/daiyelang/article/details/51766916

  • 相关阅读:
    Mac 快速进入mysql命令行
    Vuex 的使用 State Mutation Getter Action
    Vuex状态管理
    路由模块化
    Vue中路由的嵌套
    Vue路由编程式导航以及hash模式
    Vue动态路由 Get传值
    Vue中的路由 以及默认路由跳转
    Vue非父子组件传值
    父组件主动获取子组件的数据和方法 和 子组件主动获取父组件的数据和方法
  • 原文地址:https://www.cnblogs.com/hazhede/p/5759916.html
Copyright © 2011-2022 走看看