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

Prebuilt framework not generated for local Pods. #33

Closed
mdelmaestro opened this issue Jan 11, 2019 · 5 comments
Closed

Prebuilt framework not generated for local Pods. #33

mdelmaestro opened this issue Jan 11, 2019 · 5 comments
Labels
question Further information is requested

Comments

@mdelmaestro
Copy link

mdelmaestro commented Jan 11, 2019

First of all, this is awesome! Thanks for this plugin!

In the project I'm testing this plugin I've got some Local Pods that, for some reason don't get prebuilt.
What I'm seeing is that Pods like "Alamofire" get built and are in the "_Prebuild" folder but the others are not.

platform :ios, '11.0'
source 'https://github.com/CocoaPods/Specs'

target 'TestProject' do
  use_frameworks!
  all_binary!
  pod 'LocalPod', path: './LocalPod'
  pod 'Alamofire'
end

Am I doing something wrong or local pods are handled differently?

@leavez
Copy link
Owner

leavez commented Jan 16, 2019

Yes, they are handled differently. Local pods will not be prebuilt by design.

Local pods are changed frequently and it's not proper to build the whole framework when very one line code changed. It's also hard to check the whether the local pods are changed in the view of cocoapods (for normal pod, checking the podlock file is enough) .

If you want to prebuilt your own libs, moving local pods to separated repos may be a good choices.

@leavez leavez pinned this issue Jan 16, 2019
@mdelmaestro
Copy link
Author

It totally makes sense!

I'm my case I guess it's a misuse of the concept of a Local Pod as the pod will rarely change ( can't use a private pod repo because of the enforced use of SVN as the only allowed VCS )

Thanks for the answer!

@leavez leavez closed this as completed Jan 17, 2019
@leavez leavez added the question Further information is requested label Mar 17, 2019
@Rag0n
Copy link

Rag0n commented May 3, 2019

@mdelmaestro
If you need this feature you can check if local pod was changed by looking at modified timestamp(eg. https://github.com/square/cocoapods-check/blob/master/lib/pod/command/check.rb).

@andreialecu
Copy link

I'm interested in using cocoapods-binary with react-native.

The way React Native works is by generating an iOS project with a Podfile which is mainly based on local pods, referenced from somewhere in ../node_modules/react-native/... (the prefix below)

Example:

  pod 'FBLazyVector', :path => "#{prefix}/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "#{prefix}/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "#{prefix}/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "#{prefix}/Libraries/TypeSafety"
  pod 'React', :path => "#{prefix}/"
  pod 'React-Core', :path => "#{prefix}/"
  pod 'React-CoreModules', :path => "#{prefix}/React/CoreModules"
  pod 'React-RCTActionSheet', :path => "#{prefix}/Libraries/ActionSheetIOS"

Building a React Native project takes between 8-16 minutes from scratch just to build the Pods. This obviously is pretty bad on CI, and I was trying to see if there's a way to improve this using cocoapods-binary.

Since these local pods are not meant to be hand modified by user, it should be possible to prebuild them.

Please consider changing this behavior or at least adding some sort of flag to allow prebuilding local pods for this use case.

@Duduzera1997
Copy link

@leavez Is there any possibility that we have support this use case with React Native?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants