How to Fix NativeScript Issue with iOS14 and XCode 12

With the release of iOS14 and XCode 12, NativeScript apps started crashing. Unfortunately, the timing conflicted with the release of NativeScript 7 which caused lots of confusion. I ran into this issue with a NativeScript app that I built.  Since I didn’t want to update the entire app to NativeScript 7 and wanted to get a quick fix out, I was able to make minor changes that fixed the app. To find this solution, I spent several hours trying different solutions and wanted to write this guide to help others that may be facing these issues.

The error I was seeing before these changes

[runtime executeModule:@"./"];
Thread 1: EXC_BAD_ACCESS (code=1, address=0x2818dd0)

Step 1

Add Podfile to app/App_Resources/iOS/ folder with this content:

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'

Step 2

Add this content to app/App_Resources/iOS/build.xcconfig file

EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8

Step 3

Update to tns-ios 6.5.2

tns platform remove ios
tns platform add [email protected]

Step 4

tns build ios --release

You should now be able to build and test your app. Let me know if this solves your issues.

Thanks for reading. Make sure you follow me on Twitter to stay up to date on the progress of my side projects T.LYWeather Extension, and Link Shortener Extension. If you are interested in the tech I use daily, check out my uses page.  

8 thoughts to “How to Fix NativeScript Issue with iOS14 and XCode 12”

  1. I spent 3 days looking for a fix. I submitted the app many times. All crashed until I applied your fix. Thank you Tim.

  2. Thanks for this! Had random reports of my app crashing (it’s been released for a while) and couldn’t reproduce it. Updated libraries and submitted it to the App store, and the App store reported it failing. Your fix resolved it for me!

  3. Hi there, my issue has been resolved too. Thank you so much, can you please bring us through the thinking process of finding the solution (e.g. how did you figure out the code in Podfile and why we need to modify the build.xcconfig).

    Also, do you know if this fix only work in tns-ios 6.5.2?

Leave a Reply

Your email address will not be published. Required fields are marked *