Open rcampbell22 opened 6 years ago
Issue is still present, cordova build iOS fails with similar error. Using Cordova 9.0.0 and cordova-ios 5.0.0 on Azure DevOps. The build goes fine if using an older Cordova version, like 7.1.0, but Apple does not accept IPAs built on SDK 11.x...
I have a step in my release pipeline using the Ionic Command task for "cordova build ios --release"
This was working successfully on the 16th October using the hosted macOS agent, however it is now failing with the error: "Cannot read property 'toLowerCase' of undefined"
The verbose logging exposes the error better:
From what I can find online (https://github.com/apache/cordova-ios/issues/427), this issue seems to be with cordova-ios and compatibility with xcode 10. From my previously successful logs on 16 October, I can see it was using Xcode 9.4.1 but I'm assuming the host is now using Xcode 10 (maybe 10.1 beta 3?)
I have tried telling the host to use Xcode 9.4.1 by using the
sudo xcode-select -s /Applications/Xcode_9.4.1.app/Contents/Developer
(as suggested here: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=vsts&tabs=yaml#xcode), and confirmed this is set withxcode-select -p
and it shows the correct path, but the Ionic command still fails, so I'm wondering if it is definitely using 9.4.1 and it's still failing (in which case the error is something else), or if I have to tell the Ionic command to use a specific version of Xcode a different way?UPDATE: The above is a red-herring as I've just proved that it is using the version from the
xcode-select
command. So the issue is actually that I'm getting the error with the same cordova, ionic and xcode version that I wasn't getting a few weeks back. The only thought now is that the hosted MacOS agent has been updated and that's what is causing the issue