handling dependencies for iOS Framework project

前端 未结 7 2145
不思量自难忘°
不思量自难忘° 2020-12-28 08:09

I\'ve created iOS Framework project using this method: https://github.com/jverkoey/iOS-Framework

Works pretty neat but I\'m a little confused on how to include libra

7条回答
  •  渐次进展
    2020-12-28 08:51

    You should use CocoaPods. Your dependency on Facebook can be done by linking against the CocoaPod.

    If you want to include that particular version of Facebook in your pod, you can put it in your repo and use the vendored_frameworks property to refer to it.

    Similarly if you wanted to vendor libFlurry.a, you could do so using s.vendored_libraries.

    For system libraries, you don't need to vendor them, e.g. libZ.a.

    I strongly recommend creating your CocoaPod using pod lib create YourPodName. They've recently changed the mechanism for how this works and it's really nice.

    You can create an Example project that shows how to use your code in context of an app.

    Then one of the other neat things I just learned about, someone can do pod try YourPodName and it will automatically download, integrate and run the Xcode project.

    CocoaPods is worth the trouble.

提交回复
热议问题