Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a lib that uses other third party native dependencies (framework etc.) #383

Open
malikmani opened this issue Sep 2, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@malikmani
Copy link

Hi @brodybits , Thank you very much for developing this fantastic tool.

I have used create-react-native-module to create the library with example and so far I am able to run the Android project pretty fine and for iOS I am having the issues.

Use case:
I want to build a react-native library for video conferencing feature (integrating the native Zoom SDKs for iOS and Native). So for iOS we have native third party framework to be linked within the library.

So when I try to link the library in example file I am unable to compile as the library pod is not able to find the third party framework reference linkage.

Can you please help me around this?

@nguyenhuutinh
Copy link

same problem here. please help

@kbourchbane
Copy link

same problem here. help please !

@kbourchbane
Copy link

I link it in the project and it works, but it's not the right way to do this, I would like to do everything in the lib

@nguyenhuutinh
Copy link

nguyenhuutinh commented Feb 2, 2021

this one works for me

Pod::Spec.new do |s|
  s.name         = "RNNativeMyLibrary"
  s.version      = "1.0.0"
  s.summary      = "RNNativeMyLibrary"
  s.description  = <<-DESC
                  RNNativeMyLibrary
                   DESC
  s.homepage     = "https://github.com/MaxToyberman/react-native-locale-listener#readme"
  s.license      = "MIT"
  # s.license      = { :type => "MIT", :file => "FILE_LICENSE" }
  s.author             = { "author" => "author@domain.v" }
  s.platform     = :ios, "9.0"
  s.source       = { :git => "https://github.com/author/RNNativeMyLibrary.git", :tag => "master" }
  s.source_files  = "ios/*.{h,m,mm,swift}"
  s.swift_version = "5.0"

  s.requires_arc = true
  s.dependency "React"
  s.vendored_frameworks = "ios/sdk/MySDK.xcframework"
  s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }

end

@EnasAhmedZaki
Copy link

@nguyenhuutinh where's the dependency framework in your .podspec file, could you elaborate more?

@brodycj brodycj added the bug Something isn't working label Feb 17, 2021
@brodycj
Copy link
Owner

brodycj commented Feb 17, 2021

I would recommend adding such third-party native dependencies to both peerDependencies and devDependencies. This needs to be both tested and documented. Thanks for reporting.

@hahaha28
Copy link

same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants