fixing ERROR ITMS-90725: "SDK Version Issue: iOS app updates submitted to the App Store will need to be built with the iOS 11.0 SDK or later
01 Jun 2018 | fixcheck PR301 for fix.
Kees van Dieren asked for solution about the issue he has with submitting app to apple store. Issue he had is following:
ITMS-90725: SDK Version Issue - In July 2018, iOS app updates submitted to the App Store will need to be built with the iOS ‘11.0’ SDK or later, included in Xcode [9.0] or later. Make sure to update Xcode for future app deliveries. After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.
After checking list of possible source of problems following poped up:
$ otool -l IosEsLauncher | grep -A 4 LC_VERSION_MIN_IPHONEOS
cmd LC_VERSION_MIN_IPHONEOS
cmdsize 16
version 8.0
sdk n/a
Load command 10
sdk n/a
– come-on I had it with home made SDK on windows/linux and it should not happen on Mac but it there as well.
Root case
As in case of Linux/Windows it is due -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
specified as system root to linker.
And as we know from similar linux/windows case linker is not able to find out SDK version as it tryies to extract it from sysroot path:
// if -sdk_version not on command line, infer from -syslibroot
if ( (fSDKVersion == 0) && (fSDKPaths.size() > 0) ) {
const char* sdkPath = fSDKPaths.front();
const char* end = &sdkPath[strlen(sdkPath)-1];
while ( !isdigit(*end) && (end > sdkPath) )
--end;
const char* start = end-1;
while ( (isdigit(*start) || (*start == '.')) && (start > sdkPath))
--start;
char sdkVersionStr[32];
int len = end-start+1;
if ( len > 2 ) {
strlcpy(sdkVersionStr, start+1, len);
fSDKVersion = parseVersionNumber32(sdkVersionStr);
}
}
Why iPhoneOS.sdk is used while iPhoneOS11.4.sdk is available
ls -l /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
iPhoneOS.sdk
iPhoneOS11.4.sdk -> iPhoneOS.sdk
So these are actually the same. E.g. content is same. If SDK is not specified by iosSdkVersion
in robovm.xml
IOSTarget will sort SDK and pick recent ones. In this case iPhoneOS11.4.sdk
are iPhoneOS.sdk
exactly same and order which will go out from sorting is not defined (as for sorter they are equal)
This second solution
Till this PR is not accepted or if you stick to older RoboVM version the solution would be to rid off iPhoneOS.sdk
:
- remove iPhoneOS11.4.sdk
- rename iPhoneOS.sdk to iPhoneOS11.4.sdk
Solution
The only right solution is to provide linker with parameter that specifies SDK verison: -sdk_version 11.4
Sub-solutions
Also changes were done to change sorting to look into SDK root path and if versions are equal make SDK located in iPhoneOS.sdk
lower priority
All fixes are in PR301
Comments