apache / apache/cordova-plugin-inappbrowser
IONIC 5 - IOS - XCODE 13 - InAppBrowser is not installed or you are running on a browser
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
I have an IONIC 5 / cordova project and I use InAppBrowser to open a link.
In the next code:
const browser = this.iab.create(url);
I get error "WARN: InAppBrowser is not installed or you are running on a browser. Falling back to window.open" on execution time in IOS device and IOS emulator.
I have tried all kinds of things that I have found on the internet:
First, I have done many test with @ionic-native/in-app-browser plugin, but I always get the same result:
- Remove node_modules, www, platform/ios
- Re-install(remove and install) in-app-browser libraries
- Recompile in dev and prod mode.
- Same error..
I have tried it again with the new plugin:
$ ionic cordova plugin add cordova-plugin-inappbrowser
$ npm install @awesome-cordova-plugins/in-app-browser
I change the code to get the new native plugin
$ ionic cordova platform add ios
BUILD DEVEL and PROD
$ ionic cordova build ios $ ionic cordova build ios --prod
Same result.
I have verified that the cordova plugins are installed in the /Plugins folder of the XCode project.
I have a couple of things to comment on:
Now I use XCode 13, but In XCode 12 works fine. To upgrade the XCode I have upgrade MacOS from Catalina To Monterey.
The only difference between the two projects is that in XCode 13 "Legacy build system" is disabled since it's "deprecated".
I don't know if XCode doesn't import the libraries, I don't know if "Legacy Build System" is necessary. I know nothing... :-(
Can anybody help me?
Thanks.
Ionic info
Ionic:
Ionic CLI : 6.2.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.6.5
@angular-devkit/build-angular : 0.1102.10
@angular-devkit/schematics : 11.2.10
@angular/cli : 11.2.10
@ionic/angular-toolkit : 3.1.1
Cordova:
Cordova CLI : 10.0.0 (cordova-lib@10.1.0)
Cordova Platforms : ios 6.2.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 15 other plugins)
Utility:
cordova-res : 0.15.4
native-run : 1.5.0
System:
ios-deploy : 1.10.0
ios-sim : 8.0.2
NodeJS : v14.18.1 (/usr/local/bin/node)
npm : 6.14.15
OS : macOS
Xcode : Xcode 13.2.1 Build version 13C100
## Checklist
- [X] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [X] I included all the necessary information above
Contributor guide
Research direction
No repository files or tests are named. Start by reproducing this.iab.create(url) on an iOS device or emulator with the listed Ionic, Cordova, and Xcode versions, then compare the Xcode 12 and Xcode 13 build-system behavior; done means the native InAppBrowser opens instead of falling back to window.open.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, javascript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100