Senin, 18 Maret 2019

Xcode/Cocoapods: I can't access a dependency that's in a framework linked to my project

I want to embed several projects and frameworks in only one workspace.

Here is the structure in Xcode:

enter image description here

Project1 and Project2 are application projects, and BaseFramework is a Cocoa Touch framework.

Now what I want to do is to add a pod dependency to the framework, then link this framework to one of the projects and access the dependency in this project. Here is what I tried with my Podfile:


platform :ios, '12.1'
use_frameworks!
inhibit_all_warnings!

workspace 'BaseWorkspace'

def shared_pods
pod 'Toast-Swift'
end

project 'Project1/Project1.xcodeproj'
project 'Project2/Project2.xcodeproj'
project 'BaseFramework/BaseFramework.xcodeproj'

target 'BaseFramework' do
project 'BaseFramework/BaseFramework.xcodeproj'
shared_pods
end

Then, I linked the framework to Project2 :

enter image description here

Everything compiles fine, I can import BaseFramework in Project2... but I'm unable to use methods from Toast-Swift. What am I doing wrong here?

Thanks for your help.



from Xcode/Cocoapods: I can't access a dependency that's in a framework linked to my project

Xcode/Cocoapods: I can't access a dependency that's in a framework linked to my project Rating: 4.5 Diposkan Oleh: Admin

0 komentar:

Posting Komentar

Popular Posts