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

Nightly breaks existing plugins without pod dependencies #498

Closed
darkyen opened this issue Jan 18, 2019 · 8 comments
Closed

Nightly breaks existing plugins without pod dependencies #498

darkyen opened this issue Jan 18, 2019 · 8 comments
Milestone

Comments

@darkyen
Copy link

darkyen commented Jan 18, 2019

I need the fix for target-deployment to be available in my project as an upstream dependency needs minimum iOS 10. Therefore, I tried to give 5.0.0-dev a try, with the latest nightly when I run cordova prepare ios installation of every plugin fails with TypeError: plugin.getPodSpecs is not a function I am not sure what's causing this so looking into it atm. However, it seems to break all plugins, is there any other way to force 4.x.x to use target-deployment?

@dpogue
Copy link
Member

dpogue commented Jan 18, 2019

cordova-ios 4.x.x (and probably older versions too) support setting the deployment target via a preference in config.xml:

<preference name="deployment-target" value="10.0" />

@dpogue dpogue closed this as completed Jan 18, 2019
@darkyen
Copy link
Author

darkyen commented Jan 18, 2019

cordova-ios 4.x.x (and probably older versions too) support setting the deployment target via a preference in config.xml:

<preference name="deployment-target" value="10.0" />

I tried that, while the .xcodeworkspace is getting generated with iOS 10 as minimum, However the Podspec file is stuck on 8.0.

@darkyen
Copy link
Author

darkyen commented Jan 18, 2019

@dpogue It seems like iOS 8 is hardcoded in the template at

'platform :ios, \'8.0\'\n' +
therefore as far as I know 5.x.x is the only version that allows adding support for deployment-target on iOS.

@dpogue
Copy link
Member

dpogue commented Jan 18, 2019

Ah, that's possible. I've never used Cocoapods so I didn't realize there was a version in there too.

@dpogue dpogue reopened this Jan 18, 2019
@erisu
Copy link
Member

erisu commented Jan 18, 2019

The getPodSpecs method was introduced in cordova-common@3.x. Even though cordova-ios nightly meet this requirement, one of the CLI dependencies is not updated.

That dependency creates an instance of its own version of common which it also passes to cordova-ios. Nightly cordova-ios expected the method and tried to call it.

This explains the TypeError: you mentioned earlier.

@darkyen
Copy link
Author

darkyen commented Jan 18, 2019

The getPodSpecs method was introduced in cordova-common@3.x. Even though cordova-ios nightly meet this requirement, one of the CLI dependencies is not updated.

That dependency creates an instance of its own version of common which it also passes to cordova-ios. Nightly cordova-ios expected the method and tried to call it.

That makes sense. For now, I have resorted to monkey patching the hardcoded template on 4.5.5. However, as it stands, there are no versions of cordova-ios that support changing the minimum version of the project.

@darkyen
Copy link
Author

darkyen commented Jan 18, 2019

@erisu so the monkey patch isn't holding either it runs into npm issues and in general is a flakey solution. Is there any workaround you'd recommend or how can I use 5.0.0-dev, what other dependencies should I update?

@dpogue
Copy link
Member

dpogue commented Jan 20, 2019

Should be fixed in the latest nightly build

@dpogue dpogue closed this as completed Jan 20, 2019
@dpogue dpogue added this to the 5.0.0 milestone Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants