apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 989 forks source link

App crashes on iOS 14 #935

Closed idoodler closed 4 years ago

idoodler commented 4 years ago

Bug Report

Problem

I am just upgrading our Cordova based app to the latest available Cordova version. When building the app with Xcode 12 (beta 1 and beta 2) the App crashes immediately after launch via Xcode with the following exception:

-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "MainViewController" nib but the view outlet was not set.
(null)

iOS 13 works like a charm

What is expected to happen?

No Crash

What does actually happen?

App crashes immediately after launch

Information

AFAIK this indicates an issue with the outlet connectors (IBOutlet) of the ViewController. I checked the view outlet in the MainViewController.xib File's Owner and everything looks as usual

I completely removed and re-added the iOS platform to upgrade cordova, so no files are left from the previous version.

Command or Code

None

Environment, Platform, Device

iOS 14 Beta 1 and 2 Xcode 12 Beta 1 and 2 iPhone 11 Pro

Version information

Cordova CLI: 9.0.0 (cordova-lib@9.0.1) Cordova Platform iOS: 5.1.1 Xcode: 12 (Beta 1 and Beta 2) OS: MacOS: 10.15.5 (19F101)

Checklist

idoodler commented 4 years ago

I just figured out why it is crashing. It was crashing on iPhones, not iOS 14 devices.

Cause

Under the Projects iOS target in Deployment Info the property Main Interface was set to 'MainViewController'. It looks like as if it should be set to nothing!

breautek commented 4 years ago

If there is something in cordova-ios codebase that requires a change to support iOS 14, then I think this issue can remain open, so that we can keep track of what we may need to do to support iOS 14.

NiklasMerz commented 4 years ago

I have been using iOS 14 since the first beta and did not find any Cordova related bug yet.

idoodler commented 4 years ago

As mentioned previously this was an issue of my Xcode project, not of iOS 14.

brunoPert commented 3 years ago

Hi! I'm currently facing the same issue (same platforms and dependencies versions too), could you please detail how you solved it?

Thanks!

breautek commented 3 years ago

Under the Projects iOS target in Deployment Info the property Main Interface was set to 'MainViewController'. It looks like as if it should be set to nothing!

brunoPert commented 3 years ago

@breautek , thanks! I'd seen your answer, but I can't see the "Main interface" property. Attaching what I'm seeing:

Captura de Pantalla 2020-11-12 a la(s) 11 07 47 Captura de Pantalla 2020-11-12 a la(s) 11 08 05