0

I'm trying to define a common framework in a project that provides an implementation-agnostic layer. For example, provide a protocol like Analytics and a set of methods/properties as its interface, and provide the implementation through a singleton object so different app targets would use the same implementation.

The issue is when importing the framework from within an app target, a compiler error occurs like so:

import Core // Missing required module 'Firebase'

What needs to be done?

In the Podfile, dependencies are installed only for the framework targets, not the app targets.

3 Answers 3

1

Dependencies should set to Core.podspec if you make framework manager by Cocoapods

Pod::Spec.new do |s|
  s.name = 'Core'

  s.dependency 'Firebase'
end
Sign up to request clarification or add additional context in comments.

Comments

0

iOS framework to wrap existing framework,You have astray when you have this idea, One framework depends on the other. put the depends framework together with it when you use it, not contain or wrap. Cocoapods provides a simple way, create a new warehouse containing the two dependent frameworks, The idea of the first floor is right.

Comments

0

It turns out to be a pod installation configuration issue. Changed the installation targets and the hierarchy, and things were solved.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.