am using CocoaPods 1.2 and i have a project with 2 targets, one is the main iPhone app and the other one is cocoa touch framework library.
I have no problem adding pods to my iphone target, my main problem is that i cannot add any pods to that other shared library target.
here is an example of my pod file:
platform :ios, '9.0'
target 'MyApp' do
use_frameworks!
pod 'EVReflection'
end
target 'MyLibrary' do
use_frameworks!
pod 'EVReflection'
end
adding pods to the main app MyApp works just fine but not to the other target, any ideas why this happens?
i have tried to use abstract_target but with no luck. i even tried to deintegrate and reintegrate but also not working.
the problem only happens when trying to add pods to universal framework library, adding pods to any other type of targets work just fine.
Any help would be appreciated.
Here is my whole procedure
pod init
Tyr This Podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'SOQ' do
use_frameworks!
end
target 'SOQFW' do
use_frameworks!
end
pod 'EVReflection'
after pod install, in both my two targets SOQ (swift app) and SOQFW (cocoa touch framework) can import EVReflection
in *.swift and user class EVObject without a problem.
sample code is
import EVReflection
class User: EVObject {
var id: Int = 0
var name: String = ""
var friends: [User]? = []
}
you can give it a try.
My development environment is os x 10.12 , xode 8.2.1 , cocoapods 1.1.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With