cocoapods-user-defined-build-types icon indicating copy to clipboard operation
cocoapods-user-defined-build-types copied to clipboard

Invalid 'Podfile' could not parse a build_type

Open Pashtunzoy opened this issue 5 years ago • 4 comments

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?

Pashtunzoy avatar May 20 '20 20:05 Pashtunzoy

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

joncardasis avatar May 28 '20 15:05 joncardasis

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

pod 'LIB', :build_type => , :podspec => 

jasongaare avatar Jun 22 '20 21:06 jasongaare

Same issue here. Above seems to have worked.

zaptrem avatar Aug 26 '20 19:08 zaptrem

Same here, flipping the order seem to work fine.

galaxyfeeder avatar Sep 04 '20 13:09 galaxyfeeder