joncardasis / cocoapods-user-defined-build-types

⚒ A cocoapods plugin that can selectively sets build type per pod (static/dynamic library, static/dynamic framework)
MIT License
135 stars 10 forks source link

Possible to parse remote podspec? #9

Closed msageryd closed 3 years ago

msageryd commented 3 years ago

I'm trying to install PDFTron as per their instructions. https://www.pdftron.com/documentation/ios/get-started/react-native/

The library needs use_framework! but this gives me all kinds of problems. cocoapods-user-defined-build-types to the rescue?

This is what I have added to my Podfile. I added your build_type syntax to PDFTrons Podfile instructions.

pod 'PDFNet', podspec: 'https://www.pdftron.com/downloads/ios/cocoapods/pdfnet/latest.podspec', :build_type => :dynamic_framework
pod 'RNPdftron', :path => '../node_modules/react-native-pdftron', :build_type => :dynamic_framework

I get the following error:

[!] Invalid `Podfile` file: [!] cocoapods-user-defined-build-types could not parse a build_type of 'https://www.pdftron.com/downloads/ios/cocoapods/pdfnet/latest.podspec' on PDFNet.

Can I solve this by doing something different?

sergey-sivchenko commented 3 years ago

@msageryd did you try this solutiuon?

msageryd commented 3 years ago

Thanks @sergey-sivchenko No, I didn't try it. I ended up not using pdftron, so the problem disappeared. But I'm successfully using cocoapods-user-defined-build-types for another library.

Thank you for this library!

msageryd commented 3 years ago

Revisited.. I went back and tried the references solution as well. The problem went away when I switched order so :build_type is before podspec: