0

I am working on a project where I have added Firebase, Crashlytics etc using POD.

Now there is a requirement to create modules for each feature available in the app, so I created Modules for each Feature (Say Profile, Payment, Linking etc) & its working fine with main container app. Now My App looks like as below

enter image description here

Now I want to a use Framework(say Firebase) added Via POD in my module(Say Profile) but when I tried to import in a module I am getting

No such module 'Firebase'

enter image description here

Please suggest me how can add Framework added Via POD in any module.

Please also let me know If I have explained my question.

Below is my POD file

platform :ios, '8.0'

use_frameworks!

def mainPodPackage
    pod 'Mapbox-iOS-SDK'
    pod 'ZendeskSDK'
    pod 'OneSignal'
    pod 'Firebase/Core'
    pod 'Firebase/Messaging'
    pod 'FacebookSDK' 
end


target 'Production' do
    mainPodPackage
end

target 'PreProd' do
    mainPodPackage
end

target 'Dev' do
    mainPodPackage
end
3
  • Show your podfile please, you might need to install pod for those target you wanted to add also Commented Jan 2, 2019 at 9:05
  • I tried to install POD for added target but getting error 'Unable to find a target named '. Moreover I have added modules not a new target. Commented Jan 2, 2019 at 9:12
  • @Tj3n I have added code for POD file. Please have look Commented Jan 2, 2019 at 9:54

1 Answer 1

1

This is how you can install pod for multiple project workspace, edit your podfile as so, test target should have same project as it's target:

use_frameworks!

workspace 'Workspace_name'
project 'PjA.xcodeproj'
project 'path_to_PjB/PjB.xcodeproj'

target 'PjA' do
    project 'PjA.xcodeproj'
    ...
end

target 'PjB' do
    project 'path_to_PjB/PjB.xcodeproj'
    ...
end
Sign up to request clarification or add additional context in comments.

3 Comments

Thanks, I have added POS file in my question.
@Gagan_iOS Update your podfile format like this then it should work, I cant tell where you put the podfile and the projects so you have to update yourself
thanks for valuable input. I have edited my pod file and now I am able to debug. Saved my Day :) Thanks a lot

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.