ios - Organizing Objective-C code into submodules? Cocoapods? -


We are working on a small SDK. Inside the workspace we have all the code in a single project, we want to reuse it to create separate subdomains, which can be reused later. Let us think about some of the things such as SystemWill / FlightPath for analytics, logging, user feedback, etc. about our SDK.

Ideally, we have a GIT repo with analytics separate and a simple API that can use SDK, they will apply for the same components, for this unit testing, version management, etc. that's good.

We tried to use cocopodes, but the problem we got is that a static library can not be linked to another static library, or at least one easy / automated way to do this ( If we are wrong, please correct us).

We can still try to use the code (header and implementation file) in the same workpace to use the cocopodes and then there is a script to copy them of any type of correct project For and link them (this is done again like git submodules)

Is there anything to help between static libraries in the Objective-C with version / dependency management? Is there anything to facilitate the process?

Ideally we want to end up with something where everything is a library or a separate module that can be reused:

  SDK Analytics logging Ugrfdbak logging Sbkmpnent a Sbkanpententb logging Sbkponnent C  

update

when we try to use Kokopod so we had to do something about it Our podfile on our main workspace:

  # workspace 'MyWorkspace / MyWorkspace.xcworkspace' platform: iOS, '7.0' xcodeproj 'MyWorkspace / MySDK / MySDK.xcodeproj' target 'MySDK' to xcodeproj 'MyWorkspace / MySDK / MySDK.xcodeproj' pod 'Analytics',' 0.0.1 'end  

Where MyWorkspace is a workspace already present with different projects (all are in the same directory), MySDK is the last product (a static library) and Analytics is one of the components in its own private R epository Therefore, Kokopod was trying to link against Analytics to MySQK static library (?)

Private specs repo ( Podspeks / analytics / 0.0.1 / analytics. podspec ):

  pod :: Do Spesinyuev | S | S.name = 'Analytics' s.version =' 0.0.1 's.platform =: ios s.summary = "Analytics Utility" s.homepage =' http://apple.com 's.author = {' man '= & Gt; 'Dude@apple.com'} s.source = {: git = & gt; 'Http: //github.com/Company/Analytics.git' ,: tag = & gt; '0.0.1'} s.source_files = 'Analytics / ** / *. {H, m} 's.requires_arc = true s.ios.deployment_target =' 6.0 'end  

It looks as if you are in cocoaapod, it allows you to define different pieces of code that are reused in different configurations.

If you are looking for a more strong example, checkout.


Edit: After some discussion in chat, it has been found that the pod was not being integrated correctly with the project file. When this happens, remove pods , and make sure that Pods.xcodeproj is being integrated with the correct project.

There may be a bug in CP which involves integrating into a folder, with many projects, I will update this post with a post if it is true.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -