5

I want to create custom pod which is depends on other pod. I have podspec file

 ... s.source_files = "ios/**/*.{h,c,m,swift}" s.requires_arc = true s.dependency "UserSDK" 

UserSDK is pod which i want to use in my custom module. It has own dependencies like FirebaseCore, FirebaseMessaging UserSDK podspec

In my CustomModule.swift file has

import Foundation import UserSDK 

To use custom library include it via pod file;

# Uncomment the next line to define a global platform for your project # platform :ios, '11.0' target 'MyTarget' do pod 'FBLazyVector', :path => "../modules/react-native/Libraries/FBLazyVector" pod 'FBReactNativeSpec', :path => "../modules/react-native/Libraries/FBReactNativeSpec" pod 'RCTRequired', :path => "../modules/react-native/Libraries/RCTRequired" pod 'RCTTypeSafety', :path => "../modules/react-native/Libraries/TypeSafety" pod 'React', :path => '../modules/react-native/' pod 'React-Core', :path => '../modules/react-native/' pod 'React-CoreModules', :path => '../modules/react-native/React/CoreModules' pod 'React-Core/DevSupport', :path => '../modules/react-native/' pod 'React-RCTActionSheet', :path => '../modules/react-native/Libraries/ActionSheetIOS' pod 'React-RCTAnimation', :path => '../modules/react-native/Libraries/NativeAnimation' pod 'React-RCTBlob', :path => '../modules/react-native/Libraries/Blob' pod 'React-RCTImage', :path => '../modules/react-native/Libraries/Image' pod 'React-RCTLinking', :path => '../modules/react-native/Libraries/LinkingIOS' pod 'React-RCTNetwork', :path => '../modules/react-native/Libraries/Network' pod 'React-RCTSettings', :path => '../modules/react-native/Libraries/Settings' pod 'React-RCTText', :path => '../modules/react-native/Libraries/Text' pod 'React-RCTVibration', :path => '../modules/react-native/Libraries/Vibration' pod 'React-Core/RCTWebSocket', :path => '../modules/react-native/' pod 'CustomModule', :path => "../CustomModule" end 

errorenter image description here

If I add use_frameworks! to target in podfile it works, but then other dependencies do not work

8
  • Show how you're embedding your custom pod into your app. Messing around with framework search path should not be necessary. Also, requires_src is probably a typo of requires_arc , and dependency is spelled with two ns. Commented May 18, 2020 at 14:37
  • Did you tried to reinstall the UserSDK pod? It seems be missing ${PODS_ROOT}/Google/Headers... Try to add that to headers path Commented May 18, 2020 at 14:37
  • @Carla Camargo yes i tried, also cant find Google in pods, but there are FirebaseCore, FireabaseInstanceID and FirebaseMessaging, Adding it to headers path doesnt work Commented May 18, 2020 at 17:40
  • @Gereon updated my question., also removed path from framework searh path. It seems its not necessary like you said Commented May 19, 2020 at 12:43
  • Please show your full list of pods, or ideally, your complete Podfile Commented May 20, 2020 at 14:28

1 Answer 1

3
+75

In the podspec file , couple fields are missing I guess like

  • Deployment_Target

  • Source Files

    Use inherit! :search_paths in Podfile before end.

Refer : https://ronakshah.org/How-To-Make-A-Cocoapod-With-Dependencies

and for your specific error add following in podfile

pod 'Firebase/Core' pod 'Firebase/Messaging' 

OR refer : Xcode error: Missing required module 'Firebase'

Swift app: “Missing required module” when importing framework that imports static library

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.