apache / cordova-ios

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

iOS Version, Display Name, Build Not Set #1268

Closed teranpeterson closed 1 year ago

teranpeterson commented 1 year ago

Bug Report

Problem

What is expected to happen?

The ios version, display name, and build number are no longer being set when app is opened in Xcode. Verified that this happens with template cordova create + platform add ios@6.2.0.

<name>HelloCordova</name> - should set Display Name
<widget ... version="1.0.0" ... > - should set Version
<widget ... ios-CFBundleVersion="1" ... > - should set Build

What does actually happen?

All of these fields are left blank.

Screenshot 2022-11-01 at 11 37 31 AM

Information

Command or Code

cordova create <name>
cd <name>
cordova platform add ios@6.2.0
open -a xcode platforms/ios

Environment, Platform, Device

macOS Ventura 13.0 2019 MacBook Pro 16" Intel chip

Version information

NodeJS 18.12.0 Xcode 14.1 cordova 11.0.0 cordova-ios 6.2.0

Checklist

NiklasMerz commented 1 year ago

Do you have multiple widget tags? A normal Cordova app only has one for the top level XML.

teranpeterson commented 1 year ago

No this is an unchanged cordova new project.

teranpeterson commented 1 year ago

The multiple widget tags above are for clarity in the explanation.

erisu commented 1 year ago

From investigation, I think this is just just a visual bug within Xcode and does not cause any build failures.

Cordova sets the values of this information in the Info.plist. The values are still set properly. And I believe the builds are continuing to pull the values from the Info.plist as expected.

It feels like Apple has updated Xcode and might have accidentally introduced a bug that causes Xcode to no longer display the values from the Info.plist file.

This probably should be reported to Apple for them to confirm this.

I think I heard that Apple is trying to move more settings to be set from the Xcode project. For example, if you set those values, it is set within the pbxproj file. But based on the Xcode 14.x release notes, there is nothing that sticks out as a change that would suggest this move.

It makes me feel like this is an unexpected change.

If we tried to modify the pbxproj file instead of Info.plist, this might require a lot of resources and maybe heavy modifications because our pbxproj parser does not understand the targets. The parser would apply to all targets and could lead to building issues...

At this moment, I am thinking its just a visual issue and a ticket to Apple is recommended. Is there anything suggesting that the build output looks wrong to you?

teranpeterson commented 1 year ago

Everything appears to be working correctly. It's just not a good user experience. Will wait for a fix from Apple.