Kiwi and CocoaPods with a static shared library

后端 未结 4 1496
轮回少年
轮回少年 2021-01-20 15:25

I have a workspace with 3 projects:

  • MyApp
  • Common
  • Pods

Common is a common library that MyApp depends on. I\'d like to setup Coc

4条回答
  •  一个人的身影
    2021-01-20 15:31

    You could hack a solution that may get broken again, or better yet as Common is your library, start using CocoaPods for your Common library as well.

    It will show up as a local "Dvelopment Pod", which means that you can directly edit the library code as well.

    To begin easily just create a Common.podspec at the root folder:

    $ pod lib create Common

    Then just edit the minimum required parameters, such as platform, source_files, requires_arc and dependency if any.

    You can take a look at how your library looks as you change it (and compare it to what you had with your manually created Common library):

    $ pod lib lint --no-clean Common.podspec

    Finally remove the no-longer needed Common from your workspace and add this to your Podfile:

    pod 'Common', :path => '../Relative/Path/To/CommonSources/'

    It will take you no more than 30 minutes and you'll learn many things in the process.

    Next you could take a look at making private pod repositories.

提交回复
热议问题