By updating Xcode to version 12.3, the same source code that compiled with Xcode 12.0.1, no longer compiles with Xcode 12.3.
Is it correct to have to change the code or is it an anomaly?
Below is the scenario and the details of the errors.
We tested in two different machines:
- MacOs Catalina machine
(10.15.7) with Xcode 12.3 and IPhoneOS SDK 14.3 - MacMini 8,1 2018 - Intel i7 6 Core 3.2 Ghz - 64 GB RAM
- MacOs BigSur machine
(11.6) with Xcode 12.0.1 and IPhoneOS SDK 14.0 - MacMini 8.1 2018 - Intel i7 6 Core 3.2 Ghz - 64 GB RAM
In the first machine, we had an error relating to a swift object “CardData.swift”:
/System/Volumes/Data/a/1/I/Model/PlannedOperations/CardData.swift:72:13: error: initializer for conditional binding must have Optional type, not 'String'
let pan = card.pan ?? "",
^ ~~~~~~~~~~~~~~
By checking the GYM logs, this type of error occurs on the first component built.
Here is the command used by GYM for the first build:
//xcodebuild -workspace ./xyz.xcworkspace -scheme ABC_UAT -derivedDataPath / System / Volumes / Data / a / 1 / DerivedData -destination generic / platform = iOS -archivePath " //file.xcarchive "clean archive" CODE_SIGN_IDENTITY = iPhone Distribution: Company_name "
In the second machine, we had no errors.
Here is the command used by GYM for the second build:
//xcodebuild -workspace ./xyz.xcworkspace -scheme ABC_UAT -derivedDataPath / System / Volumes / Data / a / 5 / DerivedData -destination generic / platform = iOS -archivePath " //file.xcarchive "clean archive" CODE_SIGN_IDENTITY = iPhone Distribution: Company_name "
Can anyone help us understand what happened?
Thanks