美文网首页
常用第三方库

常用第三方库

作者: 晨曦景雪 | 来源:发表于2021-09-09 11:38 被阅读0次

    1 . 在安装cocoapods 成功的基础上, 打开你的工程文件.并将pod初始化.

    $ cd yourProjectPath

    $ pod init

    2 .打开podFile文件, 在文件中写入你想导入的第三方库.使用(  pod +  '第三方库名')

    $  open -a Xcode Podfile

    增加后的 Podfile

    # Uncomment the next line to define a global platform for your project

    source 'https://github.com/CocoaPods/Specs.git'

    # platform :ios, '9.0'

    target 'xinjiang' do

      # Comment the next line if you don't want to use dynamic frameworks

      use_frameworks!

      # Pods for xinjiang

      target 'xinjiangTests' do

        inherit! :search_paths

        # Pods for testing

      end

      target 'xinjiangUITests' do

        # Pods for testing

      end

    pod 'AFNetworking'

    pod 'SDWebImage'

    pod 'MJExtension'

    pod 'CYLTabBarController'

    pod 'MJRefresh'

    pod 'Reachability' 网络判断

    pod 'DZNEmptyDataSet'或pod 'LYEmptyView'空白页面数据占位

    pod 'IQKeyboardManager'

    pod 'Masonry'

    pod 'SVProgressHUD'

    pod 'MBProgressHUD'

    pod 'SDCycleScrollView'//轮播图

    end

    3 . 将第三方库导入工程中.

    $ pod install --verbose --no-repo-update

    上面执行不成功加上这句代码source 'https://github.com/CocoaPods/Specs.git'

    以上不行用下面使用清华镜像

    https://mirror.tuna.tsinghua.edu.cn/help/CocoaPods/

    $sudo gem install cocoapods

    source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'

    链接:https://www.jianshu.com/p/ff44a3639907

    相关文章

      网友评论

          本文标题:常用第三方库

          本文链接:https://www.haomeiwen.com/subject/ukejqhtx.html