NativeScript: {N} 7.0.1 adds the wrong iOS 14 frameworks to project
Environment
- CLI: 7.0.1
- iOS Runtime: @nativescript/ios 7.0.1
Describe the bug
NativeScript.framework/NativeScript and TKLiveSync.framework/TKLiveSync are compiled with sdk 14.2 so it works on simulators/devices/testflight but if you try to submit for review to the app store it says
ITMS-90512: Invalid sdk value - The value provided for the sdk portion of LC_VERSION_MIN_IPHONEOS in mypackagename.app/Frameworks/NativeScript.framework/NativeScript is 14.2 which is greater than the maximum allowed value of 14.0.
ITMS-90512: Invalid sdk value - The value provided for the sdk portion of LC_VERSION_MIN_IPHONEOS in mypackagename.app/Frameworks/TKLiveSync.framework/TKLiveSync is 14.2 which is greater than the maximum allowed value of 14.0.
To Reproduce Just submit for review an app to the app store
Expected behavior The two frameworks should be built with release sdk not beta
Also here _Originally posted by @eltharynd in https://github.com/NativeScript/NativeScript/issues/8867#issuecomment-703657447_
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 36 (11 by maintainers)
We have pushed a new RC1 – this should solve the upload to Apple issue. We sincerely apology for the issue; somehow the last RC still got built with a XCode Beta even though the Xcode tooling said it was using the XCode GM 12.01.
npm i --save-dev @nativescript/ios@latestthen a
ns cleanYou should be good after this…
I was able to find a temporary workaround… I build my own frameworks…
Here’s a simplified step by step
basically a combination of both https://github.com/NativeScript/ns-v8ios-runtime and https://docs.nativescript.org/core-concepts/ios-runtime/how-to/debug-ios-runtime
as a side note: I’m not still 100% sure it worked but usually after 3 minutes from submitting for review I immediately got the error, it hasn’t so far for about an hour… by usual apple standards i can only be sure about this in 2 days but So far it seems ok… I’ll update if this doesn’t work
It worked for my app’s submission. Applestore 's not longer reject it with the ITMS-90512 issue. My local env: √ Getting NativeScript components versions information… √ Component nativescript has 7.0.10 version and is up to date. √ Component @nativescript/core has 7.0.10 version and is up to date. √ Component @nativescript/ios has 7.0.2-rc1 version and is up to date. √ Component @nativescript/android has 7.0.0 version and is up to date.
Xcode 12.0.1 MacOS 10.15.7
Same here, built yesterday with the new RC and passed Apple validation today 👍 Thanks guys 🙏
Not sure if this is relevant but
platforms/ios/build/Release-iphoneos/NativeScript.framework/Info.plist platforms/ios/build/Release-iphoneos/TKLiveSync.framework/Info.plist
… and some other files contain a DTPlatformVersion = 14.2
Edit: these files origin from node_modules/@nativescript/ios/framework/internal/XCFrameworks.zip
We were still unable to review your app as it crashed on launch. We have attached detailed crash logs to help troubleshoot this issue.… it didn’t crash on emulator, it didn’t crash on phisical devices… a user has been using it daily with no crashes…
I. fing. hate. apple.
@eltharynd thanks for looking into this - will be publishing a fixed version tomorrow!
I was facing this issue on
@nativescript/ios@7.0.1(with CLIv7.0.10and Xcode 12.0.1). I can confirm that@nativescript/ios@7.0.3fixes it.@NathanaelA walked me through the steps to update to
@nativescript/ios@7.0.3. Simply installing the latest vianpm install @nativescript/ios@latestis not sufficient, as it’s rather aggressively cached (or something along those lines). You have to do a clean build.Here’s my terminal history for doing a clean build with the latest iOS runtime:
I then opened
platforms/ios/NSIDE/NSIDE.xcworkspaceas usual, cleaned the build folder, and archived for iOS, and it worked.Now my app is waiting in review, and hasn’t been immediately rejected due to
LC_VERSION_MIN_IPHONEOS.EDIT: My app was accepted!
The new runtime is here
HERE’S THE ULTIMATE GUIDE ON HOW TO SUCCESSFULLY BUILD FOR PUBLISHING
tldr: We’re gonna build and archive our own Nativescript.xcframework and TKLiveSync.xcframework, and embed & sign them in our app…
Clone the runtime repo somewhere
git clone https://github.com/NativeScript/ns-v8ios-runtime.gitInstall Cmake and LLVM (not really sure if needed but you never know)
brew install cmake llvm@8Open the runtime in xcode
Update the project to use the 12.0 sdk instead
Click the yellow xcode warning on the left that asks to update the sdk version and confirmYou will get an error, click on it to get to the file and modify it this way
In the runtime folder run the following commands
This will build and archive the two Schemes in the .xcframework format
On your project clean everything to be sure there’s no other earlier attemps laying around
ns cleanInstall node packagesnpm installOpen
node_modules/@nativescript/core/ui/core/view-base/index.jsand comment out line 456This will avoid your app crashing when closing and therefore allow it to pass app store review (altho obv this will have to be fixed)
Prepare the xcode project
ns prepare ios --for-deviceOpen it in xcode, then click on your project name, in the General tab click on your app target and look for
Frameworks, Libraries, and Embedded ContentThere you will findNativescript.xcframeworkandTKLiveSync.xcframework. Click on them and hit the minus sign to remove them both.Click on the plus sign, hit “Add Other…” > “Add Files…” and navigate to the
ns-v8ios-runtime/buildfolder Select Nativescript.xcframework and add it to the project. Do the same for TKLiveSync.xcframeworkMake sure both are on “Embed & Sign”
At this point you can Build, Archive and Deploy normally.
notes: I’m pretty sure this solution will work. But as usual, it will take about 2 days for apple to review it and confirm… I’ll keep you posted…
TODO: @nativescript/core should be updated to fix the exception @nativescript/ios should be fixed to build with release sdk instead of 14.2
UPDATE 2020-10-09 10:14 UTC: I don’t know what’s happening to apple but somehow the app is already in review a mere hour after submitting this… I’ll let you know pretty soon the results
UPDATE 2020-10-09 11:41 UTC: App was accepted… (Tbh it was rejected cause they didn’t like something else, but the binary was ok)
@jeremypele and that’s using
@nativescript/ios@7.0.2-rc.0?Tried installing package, and publishing, but same error, will try to clean.
Edit:
Nope same problem:
Dear Developer, We identified one or more issues with a recent submission for App Store review for your app, “***”.
Please correct the following issues, then upload again.
ITMS-90512: Invalid sdk value - The value provided for the sdk portion of LC_VERSION_MIN_IPHONEOS in JKG2.app/Frameworks/NativeScript.framework/NativeScript is 14.2 which is greater than the maximum allowed value of 14.0.
ITMS-90512: Invalid sdk value - The value provided for the sdk portion of LC_VERSION_MIN_IPHONEOS in JKG2.app/Frameworks/TKLiveSync.framework/TKLiveSync is 14.2 which is greater than the maximum allowed value of 14.0.
Best regards, The App Store Team