“I’m using ionic 4 up, and want to support ios 10.3 fully. But unfortunatly build doesn't work on ios 10.3 but it works fine on 12.2”
I was facing the same issue. This issue appears in iOS 10.3 because of splash screen and version of WKwebview plugin.
I did the following steps,
Downgrade cordova-plugin-ionic-webview to 2.3
Change in config.xml
In app.component.ts
setTimeout(() => {
this.splashScreen.hide();
}, 1000);
Steps to make ionic 4 work on ios 10.3, Xcode 10.1
in config.xml target 10.3
<platform name="ios">
<preference name="deployment-target" value="10.3" />
...
replace the cordova-plugin-ionic-webview version to 2.5.3 with the following commands
ionic cordova plugin rm cordova-plugin-ionic-webview
ionic cordova plugin add cordova-plugin-ionic-webview#2.5.3
build the workspapce
ionic cordova prepare ios
in xcode open the workspace file (NOT the .xccodeproj)
projectname.xcworkspace
Make sure that the Deployment Target is set to 10.3
Select the Legacy Build System
File -> Workspace Settings -> Shared Workspace Settings -> Build System -> Legacy Build System
The issue is that they dropped the support for ios 10:
https://forum.ionicframework.com/t/ionic-webview-plugin-version-compatibility/151218/4
Related
I use cordova-hot-code-push-plugin to realize hot code push, and it's okay on android, but there is error on ios when using command cordova run ios as following:
CHCP plugin after prepare hook:
Failed to load iOS project file. Maybe your Cordova version is not supported?
the versions I use:
cordova 11.0.0
cordova-ios 6.2.0
Xcode 13.3
Build version 13E113
thx for any suggestions!
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.
I found the problem.
In my project I have an "Object.prototype" function that it produce a big problem to loop objects.
Referring InAppBrowser pluguin, in file inappbrowser.js:
callbacks = callbacks || {};
for (var callbackName in callbacks) {
iab.addEventListener(callbackName, callbacks[callbackName]);
}
Perhaps it could be improved with an Object.keys(callbacks), but I think that It was my problem.
Thanks.
I update my Cordova ios to version 6 because of apple email that says ( Deprecated API Usage - existing app that use UIWebView are no longer accepted) ,but after that i keep getting this build error,
The following build commands failed:
CompileC /Users/moesaif/Library/Developer/Xcode/DerivedData/مفسر_أحلامي-epzhtxsuxnuafngaxollgqmkcrww/Build/Intermediates.noindex/مفسر\ أحلامي.build/Debug-iphonesimulator/مفسر\ أحلامي.build/Objects-normal/x86_64/CDVFileTransfer.o /Users/moesaif/Desktop/Dreams/platforms/ios/مفسر\ أحلامي/Plugins/cordova-plugin-file-transfer/CDVFileTransfer.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
ionic Cordova platform ls :
Installed platforms:
android 7.1.4
browser 6.0.0
ios 6.1.1
Available platforms:
electron ^1.0.0
osx ^5.0.0
windows ^7.0.0
any help please..!
Thanks.
You need to update the plugin to latest version. If it still uses UIWebView, then you need to update it manually to support WKWebView.
cordova-plugin-file-transfer is deprecated and seems not working with the ios#6.1.1 .
I still use it with ios#5.1.1 and the flag in config.xml to use WKWebview:
<preference name="WKWebViewOnly" value="true" />
Before sending to apple, search and check in Xcode, that you don't have any mention to UIWebview.
Sometimes a clean platforms is needed or you still have and old InAppBrowser version
When we run cordova plugin add cordova-plugin-inappbrowser
command ,I have got error "Your ios platform does not have Api.js". Because I have a old project in ios cordova.
Is the any way to add plugin manually.
You should update the cordova-ios version of your project or downgrade the Cordova CLI to use an older version that included the cordova-ios version you have in the project.
You can also try to install the plugins with --nofetch param at the end.
I just upgraded to Cordova 5. Any XCode project that has more than one application target causes an error on build.
cordova build ios
could not find -Info.plist file, or config.xml file.
Steps to recreate:
Create a new Cordova project
Add iOS as a platform
In the XCode project, duplicate the application target to create a new target
Run "cordova build ios"
Currently using XCode 6.3.2 and Cordova 5.1.1
There is a pull request with a fix: https://github.com/apache/cordova-lib/pull/219
Until Cordova team fix it, look here:
Second answer