You should be able to make your private pod won. You just need to do podspec for this. Here is an example of one of them.
Pod::Spec.new do |s| s.name = "Commons" s.version = "1.0.0" s.summary = "Common code for my iOS projects." s.license = {:type => 'Commercial', :text => "Copyright (c) Dan Leonard(Or Your Name?). All rights reserved." } s.source = { :git => "https://github.com/PATHTOPOD", :tag => s.version.to_s } s.homepage = "https://github.com/PATHTOPOD" s.requires_arc = true s.ios.deployment_target = '9.0' s.subspec 'Core' do |ss| ss.source_files = '*.swift' end s.subspec 'Menu' do |ss| ss.source_files = 'Menu/*.swift' ss.resources = ['Menu/*.storyboard', 'Menu/*.xcassets'] ss.dependency 'Alamofire' end end
Then inside your project you just need to make pod init open the created subcoder and add this
source 'https://github.com/CocoaPods/Specs.git' xcodeproj 'YOURPROJECT.xcodeproj' platform :ios, '9.0' use_frameworks! pod 'Commons', git: 'https://github.com/PATHTOPODPROJECT'
Now in this example, Podfile Commons is declared twice, the second is commented out. If you uncomment it and comment out the first, then pod install in the project folder from the terminal. This will make DevelopmentPod, which is local. This way you can make changes to the POD locally in Xcode. Without switching and installing pod every time you make changes.
You import the module just like any other module by placing
import Commons not #import <Commons/Commons.h> So you do it in Objective C not Swift
Once you have a working version, copy it to the git hub and point your project to the github version.
Hope this helps.
source share