apache / cordova-plugin-inappbrowser

Apache Cordova InAppBrowser Plugin
https://cordova.apache.org/
Apache License 2.0
1.11k stars 2.14k forks source link

No visible @interface for 'UIApplication' when building an app for iOS #1054

Open budda opened 1 month ago

budda commented 1 month ago

Bug Report

Problem

Attempting to build a Cordova app for iOS with "cordova-plugin-inappbrowser": "^6.0.0",

What is expected to happen?

A successful build of the mobile app.

What does actually happen?

Build error "/Users/mcarter/Documents/code/mobile/lunchalert-customer/platforms/ios/LunchAlert/Plugins/cordova-plugin-inappbrowser/CDVInAppBrowserNavigationController.m:35:78 No visible @interface for 'UIApplication' declares the selector 'interfaceOrientation'"

Information

/myapp/platforms/ios/LunchAlert/Plugins/cordova-plugin-inappbrowser/CDVInAppBrowserNavigationController.m:35:78: error: 
      no visible @interface for 'UIApplication' declares the selector 'interfaceOrientation'
    if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] interfaceOrientation])) {
                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~
1 error generated.

** ARCHIVE FAILED **

Command or Code

cordova build ios

Environment, Platform, Device

iOS build

Version information

Cordova 12.0.0 (cordova-lib@12.0.1) xcode 15.3

Checklist

jcesarmobile commented 4 hours ago

Can you provide a sample app? The actual code is statusBarOrientation, not interfaceOrientation