Why isn't an XCFramework's Info.plist "stable"?

(By "stable," I don't mean in a crashing or breaking sense; I mean it in the sense of a stable sorting algorithm, where duplicate elements will be kept in the same order in which they appeared in the unsorted collection.)

I have a script that builds an XCFramework for iOS & tvOS, on simulator & device. It never changes the order in which the -framework arguments are passed to xcodebuild -create-xcframework. If I regenerate the XCFramework without any code or config changes, however, the order of entries in Info.plist always changes. Sample git diff:

 				<string>x86_64</string>
 			</array>
 			<key>SupportedPlatform</key>
-			<string>tvos</string>
+			<string>ios</string>
 			<key>SupportedPlatformVariant</key>
 			<string>simulator</string>
 		</dict>
 		<dict>
 			<key>LibraryIdentifier</key>
-			<string>ios-x86_64-simulator</string>
+			<string>ios-arm64</string>
 			<key>LibraryPath</key>
 			<string>Foo.framework</string>
 			<key>SupportedArchitectures</key>
 			<array>
-				<string>x86_64</string>
+				<string>arm64</string>
 			</array>
 			<key>SupportedPlatform</key>
 			<string>ios</string>
-			<key>SupportedPlatformVariant</key>
-			<string>simulator</string>
 		</dict>
 		<dict>
 			<key>LibraryIdentifier</key>
-			<string>ios-arm64</string>
+			<string>tvos-x86_64-simulator</string>
 			<key>LibraryPath</key>
 			<string>Foo.framework</string>
 			<key>SupportedArchitectures</key>
 			<array>
-				<string>arm64</string>
+				<string>x86_64</string>
 			</array>
 			<key>SupportedPlatform</key>
-			<string>ios</string>
+			<string>tvos</string>
+			<key>SupportedPlatformVariant</key>
+			<string>simulator</string>
 		</dict>
 	</array>
 	<key>CFBundlePackageType</key>

It doesn't affect the runtime in any way, as far as I know, but it's a minor irritation that I have to commit the changes to source control every time. Is there a way for xcodebuild -create-xcframework to either honor the order in which I passed the -framework arguments in, or at least keep the Info.plist file "stable" between script invocations?

(This behavior is the same on Xcode 12.x & the XCode 13 beta versions.)

Also: the same issue exists for scheme files, which is equally annoying.

Why isn't an XCFramework's Info.plist "stable"?
 
 
Q