apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 987 forks source link

New empty project broken in Xcode 12, app fails after upload as resouces not found #1123

Closed antgel closed 1 year ago

antgel commented 3 years ago

Bug Report

Problem

What is expected to happen?

All folders should be black in the Xcode interface, I drag resources to the Resources folder, upload the app and get a successful message from Apple.

What does actually happen?

The Resources folder doesn't exist, and is red in the UI. Xcode still lets us drag images there, which also come up as red. It even lets us upload the app, but we get an email from Apple including the following extract:

We identified one or more issues with a recent delivery for your app, "*redacted*". Please correct the following issues, then upload again.

ITMS-90032: Invalid Image Path - - No image found at the path referenced under key 'CFBundleAlternateIcons': '*redacted' 

We assumed for a few days it was an issue in our code, then we realized that the issue happens on a newly-generated Cordova project.

Information

Here's a screenshot, note the highlights showing the red Resources on the left and the expected (non-existent) path on the right: image

Proof that the path doesn't exist, and it's not in the parent:

% ls /Users/danielcohen/antony-test-cordova/antony-test-project/platforms/ios/HelloCordova/Resources
ls: /Users/danielcohen/antony-test-cordova/antony-test-project/platforms/ios/HelloCordova/Resources: No such file or directory
% ls /Users/danielcohen/antony-test-cordova/antony-test-project/platforms/ios/HelloCordova/
Bridging-Header.h       Classes             Entitlements-Release.plist  HelloCordova-Prefix.pch     Plugins             config.xml
CDVLaunchScreen.storyboard  Entitlements-Debug.plist    HelloCordova-Info.plist     Images.xcassets         Scripts             main.m

Command or Code

cordova create antony-test-project
cd antony-test-project
cordova platform add ios
cordova build

Then open HelloCordova.xcodeproj in Xcode and you see the issue.

Environment, Platform, Device

Macbook Pro, OS X 11.2.3

Version information

npm list -g | grep cordova
├─┬ cordova@10.0.0
│ ├─┬ cordova-common@4.0.2
│ ├─┬ cordova-create@3.0.0
│ │ ├── cordova-app-hello-world@5.0.0
│ │ ├── cordova-common@4.0.2 deduped
│ │ ├─┬ cordova-fetch@3.0.1
│ │ │ ├── cordova-common@4.0.2 deduped
│ ├─┬ cordova-lib@10.0.0
│ │ ├── cordova-common@4.0.2 deduped
│ │ ├── cordova-fetch@3.0.1 deduped
│ │ ├─┬ cordova-serve@4.0.0
├─┬ cordova-res@0.15.3

Xcode 12.4.

Checklist

dpogue commented 1 year ago

It sounds like you're opening the .xcodeproj file. Does this still happen if you open the .xcworkspace file?

antgel commented 1 year ago

Thanks for responding, but two years later I'm not working with cordova-ios, so closing.