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

Invalid 'Podfile' could not parse a build_type #4

Open Pashtunzoy opened 4 years ago

Pashtunzoy commented 4 years ago

Hi,

I have most of my pods installed through NPM so have to use the '.../node_modules/LIBRARY_NAME' and somehow installing cocoapods-user-defined-build-types and setting it's required headers in my main Podfile still gives me the following error:

[!] Invalid `Podfile` file: [!] cocoapods-user-defined-build-types could not parse a build_type of '../node_modules/react-native-library_name/LIBRARY_NAME.podspec' on LIBRARY_NAME.

This is how I use your plugin:

plugin 'cocoapods-user-defined-build-types'

enable_user_defined_build_types!

target 'AppName' do

    pod 'React', :path => '../node_modules/react-native/'
    pod 'React-Core', :path => '../node_modules/react-native/'

    pod 'AWSCore'

    pod 'LIBRARY_NAME', :podspec => '../node_modules/react-native-library_name/LIBRARY_NAME.podspec', :build_type => :dynamic_framework

end

If I use the plugin on the AWSCore like this, it works fine:

pod 'AWSCore', :build_type => :dynamic_framework

Not sure if you support this or I'm setting it wrong?

joncardasis commented 4 years ago

Could you provide a link to a thin example project demoing the error?

The plugin should be able to handle this use case, but I haven't tested with explicit podspecs

jasongaare commented 4 years ago

I had the same issue. seems to work if you flip the order, i.e.

pod 'LIB', :build_type => , :podspec => 
zaptrem commented 4 years ago

Same issue here. Above seems to have worked.

galaxyfeeder commented 3 years ago

Same here, flipping the order seem to work fine.