leavez / cocoapods-binary

integrate pods in form of prebuilt frameworks conveniently, reducing compile time
MIT License
1.31k stars 206 forks source link

Build binary even if `:path` is specified #99

Open own2pwn opened 4 years ago

own2pwn commented 4 years ago

Looks like there's a check that will pass building if :path option is set. It would be nice to support builds even for local pods

JanC commented 4 years ago

Hey, I'd be also interested if local pods could be prebuilt as well. Would it be just a matter of removing this local check? Update: I just tried and there seem to be other things preventing a local pod from prebuilding

bclymer commented 4 years ago

I was able to prebuild local pods by removing the check that OP mentioned, as well as commenting out these 2 lines.

https://github.com/leavez/cocoapods-binary/blob/9f40c5df4149598b03b44c01d33b04e78ff38772/lib/cocoapods-binary/helper/podfile_options.rb#L94 https://github.com/leavez/cocoapods-binary/blob/9f40c5df4149598b03b44c01d33b04e78ff38772/lib/cocoapods-binary/Prebuild.rb#L106

Those were both added in the same commit, and based on the commit message it seems like it was done in order to prevent local pods from being built when you're using the "build all as binary" flag. Which, is a reasonable check to do. But obviously just creating another flag to make that behavior optional would have been ideal.

Hope it helps.

Obviously I don't understand the other potential implications of these changes, so use at your own risk.

EDIT: Still some issues with that approach. I'm seeing the assembled .framework bundles in the _Prebuild directory but the frameworks aren't included in the Pods project. I'll keep digging :\

JanC commented 4 years ago

EDIT: Still some issues with that approach. I'm seeing the assembled .framework bundles in the _Prebuild directory but the frameworks aren't included in the Pods project. I'll keep digging :\

I was going to ask that :)

I think it should be something in Integration.rb to be changed so that those build .frameworks also get integrated in the xc project

sueLan commented 4 years ago

I also removed this two lines of code. And, I can install local development pod

https://github.com/leavez/cocoapods-binary/blob/04c02f8d1aeabf052c776fafa5a07bfa9ad29657/lib/cocoapods-binary/Integration.rb#L25 https://github.com/leavez/cocoapods-binary/blob/04c02f8d1aeabf052c776fafa5a07bfa9ad29657/lib/cocoapods-binary/Integration.rb#L127

But, it seems it is by design that it doesn't support development pods. https://github.com/leavez/cocoapods-binary/issues/33