Closed jamesdixon closed 5 years ago
Just a heads up that I tried blowing everything away in platforms/
, plugins/
and node_modules/
but still getting the same error relating to cordova-plugin-app-center-shared
.
One more piece of info:
I'm not a Cocoapods expert by any means so this may be irrelevant, but I ran pod install
in the platforms/ios
dir and got the following:
$ pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "AppCenter":
In Podfile:
AppCenter (~> 1.12.0)
Specs satisfying the `AppCenter (~> 1.12.0)` dependency were found, but they required a higher minimum deployment target.
I had the same issue, you need to set your deployment target to 9.0. Microsoft dropped iOS 8 support in 0.3.0 which is causing the installation to fail.
@dennisbappert This is correct.
@jamesdixon sorry for the issues you are experiencing! We did drop iOS 8 support, as you can see in the changelog. Unfortunately, implementing post-install migration script is not in our roadmap.
Go to platforms
> ios
, open Podfile and change platform :ios, '8.0'
to platform :ios, '9.0'
.
Then run pod install
.
@jamesdixon By the way, after you do this, please make sure that the plugin is installed correctly and if not, re-install it. All the instructions are described in this comment. Please keep me updated on the progress and let me know if it helps.
Thanks!
@jamesdixon
The following solved the issue for me:
<pods-config ios-min-version="9.0" use-frameworks="true">
</pods-config>
with the following plugin:
<plugin name="cordova-plugin-cocoapod-support" />
It sets the target platform to 9.0 in the Podfile as @annakocheshkova described.
@dennisbappert @annakocheshkova really appreciate the support! Going to give this a try!
Just for my information, I do have this set in my config.xml
:
<preference name="deployment-target" value="9.0"/>
Is this the same deployment target we're talking about?
@jamesdixon yes, but not exactly.
The issue is that the latest version of cordova-ios
has a bit of a strange logic where it by default targets ios 9.0, but hardcodes ios 8.0 in the podfile.
This has been fixed in their repo but not yet released. This is why App Center users experience such issues as well :)
Anyway let us know if any of suggested fixes help.
Ah! Thank you. That's why I was confused.
I followed your instructions and was able to get it successfully installed. Going to also try @dennisbappert suggestion of using the cocoapods plugin to make sure it's not an issue in the future.
THANK YOU for your help with this and the super-fast response.
Cheers!
@dennisbappert curious if you had to do anything to get the cocoapods plugin to function? I installed it and added the line you recommended, but if I remove iOS as a platform and then re-add it, I get the same appcenter build errors I mentioned above. Checking the Podfile
, I still see 8.0 listed.
I'm running all my builds on a build server starting from a clean git clone. It doesn't work if you readd the platform. Just clean everything, the entire build folder and start from scratch, then it works fine. @annakocheshkova this was my issue aswell, if you just add deployment-target the Podfile stays incorrect. The mentioned plugin solves this issue.
Ah I forgot to mention that you need to install xml2js as a npm dependency, it's required by the plugin.
@jamesdixon from what I know, this solution won't work on a client project.
What this plugin does is it runs a post-install script that just goes through all of the plugins and "grabs" all the pod
/framework
dependencies. But when attempting to install appcenter plugin, it fails before this script runs.
So I'm guessing you need some strict order of steps in order to achieve this. I'm curios how @dennisbappert got it to work.
P.S. We actually did get it to work on our plugin some time ago but by using a modified script from cocoapods plugin placed in another hook. But implementing this was not on the roadmap so it never got released.
@annakocheshkova @dennisbappert yeah, i'm running this locally (not on a build server) and can't get it to work. I'm hoping an update to cordova-ios is released soon as this is a huge pain if you need to remove/add the platform again, which unfortunately with cordova, is often.
@jamesdixon Try using 'cordova platform add https://github.com/apache/cordova-ios.git#4.5.x' instead of 'cordova platform add ios'. This will use the nightly that has this cocoapod issue fixed
@ajincentfit that's a good solution actually. We'll take a note of it!
@ajincentfit worked like a charm! Thank you!
Hi all
cordova platform add ios@5.0.0
worked for me
A new release of cordova! Finally.
@annakocheshkova
your solution worked for me, thanks
Go to
platforms
>ios
, open Podfile and changeplatform :ios, '8.0'
toplatform :ios, '9.0'
. Then runpod install
.
pod repo update
pod update
in ./platforms/ios
(after done everything else specified before)
Description
Hi, I'm attempting to install App Center Analytics/Crashes and receiving the following error:
Repro Steps
Please list the steps used to reproduce your issue.
I simply ran
cordova plugin add cordova-plugin-appcenter-crashes
. I'm also receiving the same error when installingcordova-plugin-appcenter-analytics
.Details
Which SDK version are you using? Attempting to install v0.3.0 of the plugin
What version of Cordova, Cordova platforms, Cocoapods, and Ruby are you using? cordova: 8.1.2 (cordova-lib@8.1.1) cordova-ios: 4.5.4 cordova-android: 7.1.0 cocoapods: 1.5.3 ruby: 2.3.7p456 node: 8.12
What third party plugins are you using?
I've tried a few other "fixes" from other threads such as running
pod setup
and also runningpod update
in theplatforms/ios
directory, but not having any luck.Thanks!