iOS - Carthage的使用

Carthage Github地址:https://github.com/Carthage/Carthage

1. 安装Carthage pkg包地址:https://github.com/Carthage/Carthage/releases

2. Xcode文件夹中建立 Cartfile

3.在该目录下,在终端运行 Carthage update (This will fetch dependencies into a Carthage/Checkouts folder and build each one.)

4.On your application targets’ “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop each framework you want to use from the Carthage/Build folder on disk.

5.On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”. Create a Run Script in which you specify your shell (ex: bin/sh), add the following contents to the script area below the shell: /usr/local/bin/carthage copy-frameworks

6.在Input Files中添加,framework的相对路径
.

7.打包上传App store 需注意:

  This script works around an App Store submission bug triggered by universal binaries and ensures that necessary bitcode-related files and dSYMs are copied when archiving.

  With the debug information copied into the built products directory, Xcode will be able to symbolicate the stack trace whenever you stop at a breakpoint. This will also enable you to step through

  third-party code in the debugger.

  When archiving your application for submission to the App Store or TestFlight, Xcode will also copy these files into the dSYMs subdirectory of your application’s .xcarchive bundle.

8.如果在OC的工程中包含swift的东西需改变如下属性:Embedded Content Contains Swift Code = NO (build setting 中)

 

posted @ 2016-04-20 14:25  Dremo  阅读(335)  评论(0编辑  收藏  举报