iOS: Version string assertion
piotr-cz opened this issue · 0 comments
At this moment for an iOS version, any string may be used, however Apple has specific rules.
Failing to use this format results in error when submitting app from XCode.
Reference: Apple Developer > Documentation > CFBundleShortVersionString:
This key is a user-visible string for the version of the bundle. The required format is three period-separated integers, such as 10.14.1. The string can only contain numeric characters (0-9) and periods.
Each integer provides information about the release in the format [Major].[Minor].[Patch]
I've been using SemVer like 1.0.0-beta.3, before I found out (the hard way) that specific format is required.
My idea is to assert ios.version with a regex and when it fails, exit trapezedev with a handy notice such as Supplied version doesn't match Apple requirements: [Major].[Minor].[Patch]