Nativescript issue with iOS14 and Xcode12

Viewed 1193

Using the CLI as always but after updating my iPhone to iOS14 I have got this error:

** EXPORT SUCCEEDED **

Project successfully built.

Unable to apply changes on device: XXXXXXXXX. Error is: No .ipa found in /Users/XXXXXXXX/XXXXXXXX/platforms/ios/build/Debug-iphoneos directory..

But the file is located there. Also using Xcode 12 doesn't help...Even the LaunchScreen is black...

Would anyone suggest if it can be fixed any how? Or it is a Nativescript bug and we have to wait when they will update it?

Also there is a warning on: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'MDFInternationalization' from project 'Pods')

4 Answers

Your Error:

Unable to apply changes on device: XXXXXXXXX. Error is: No .ipa found in /Users/XXXXXXXX/XXXXXXXX/platforms/ios/build/Debug-iphoneos directory..

comes from a wrong configured Info.plist. You should check the line

<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>

If you don't have ${PRODUCT_NAME} as the value, change it to this. That helped me.

Hey just to add to what Moritz said. I also had to upgrade nativescript-localize to 4.2.2 (thread: iOS14 and nativescript)

After that ${PRODUCT_NAME} stopped being replaced by the plugin and the .ipa then had the correct name.

To fix the warning around IPHONEOS_DEPLOYMENT_TARGET you may need to add this to your Podfile in app/App_Resources/iOS/Podfile.

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
      config.build_settings['CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER'] = 'NO'
    end
  end
end

https://timleland.com/how-to-fix-nativescript-issue-with-ios14-and-xcode-12/

Try Removing and adding back

tns platform add ios

This will update the ios package below

 "@nativescript/ios": "8.2.1",

This worked for me.

Related