I am getting Failed to load resource: The requested URL was not found on this server. error when run app in iOS emulate and device, it is working fine in Android.
I have updated iOS platform version but still getting same error. I have try with removing plugin but still same error. Check screenshot
I have setup new blank ionic 4 project and build ios it is working fine.
Ionic:
Ionic CLI : 5.4.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : #ionic/angular 4.8.1
#angular-devkit/build-angular : 0.13.9
#angular-devkit/schematics : 7.2.4
#angular/cli : 7.3.9
#ionic/angular-toolkit : 1.4.1
Capacitor:
Capacitor CLI : 1.0.0-beta.24
#capacitor/core : 1.0.0-beta.24
Cordova:
Cordova CLI : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : android 8.1.0, ios 4.4.0
Cordova Plugins : cordova-plugin-ionic-webview 4.1.3, (and 15 other plugins)
Utility:
cordova-res : 0.6.0 (update available: 0.8.1)
native-run : 0.2.8 (update available: 0.2.9)
System:
Android SDK Tools : 26.1.1 (/Users/chetan/Library/Android/sdk)
ios-deploy : 1.9.4
NodeJS : v10.15.3 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Catalina
Xcode : Xcode 11.1 Build version 11A1027
I find at a solution for this problem, follow the next step:
1) close Xcode;
2) Make sure localhost is allowed in config.xml:
<allow-navigation href="http://localhost:8080/*" />
<preference name="CordovaWebViewEngine" value="CDVUIWebViewEngine" />
<platform name="ios">
...
Run
$ ionic cordova plugin remove cordova cordova-plugin-ionic-webview --save
$ rm -rf platforms/
$ rm -rf plugins/
inside of the tag platform ios
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
finally run:
ionic cordova build ios
I have found solution of the error
Adding WKWebView to your app
In order to add WKWebView, we need to add the plugin from the Ionic repository.
ionic cordova plugin add cordova-plugin-ionic-webview --save
If you already had the plugin installed, or were using a different version/fork, you’ll need to uninstall what you have first.
ionic cordova plugin rm cordova-plugin-WKWebView-engine
And that’s it! Once the plugin install is done, your next native build will include a faster, lighter, and more modern webview!
https://ionicframework.com/blog/wkwebview-for-all-a-new-webview-for-ionic/
Related
Currently I am facing a strange issue with iOS Resources for ICON when switching between apps.
The app that I am currently working is a template downloaded from codecanyon, and I have changed the icon.png and splash.png to the client logo.
Everywhere else the Icon is working as it should, only when switching between apps, the screen where you swipe between apps, the small icon on the top left is not changed and it stays as it is.
What I am seeing right now is that when I generate icons with cordova-res, it generates 28 icons, these 3 icons are not being generated by cordova and i had to make them manually:
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-small#2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-small#3x.png" width="87" />
I did generate them manually and put them on the resources/ios/icon location but still no success.
I also looked up on XCODE, the old icon is not there at all.
This is the ICON that is working on the home screen.
This is the old icon that is appearing on the top left.
IONIC INFO:
Ionic:
Ionic CLI : 6.12.3 (/Users/leotrinelmazi/.nvm/versions/node/v12.19.0/lib/node_modules/#ionic/cli)
Ionic Framework : #ionic/angular 5.8.5
#angular-devkit/build-angular : 0.803.29
#angular-devkit/schematics : 8.3.29
#angular/cli : 8.3.29
#ionic/angular-toolkit : 2.3.3
Cordova:
Cordova CLI : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : ios 6.2.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 21 other plugins)
Utility:
cordova-res : 0.15.3
native-run (update available: 1.5.0) : 1.2.1
System:
ios-deploy : 1.11.3
ios-sim : 8.0.2
NodeJS : v12.19.0 (/Users/leotrinelmazi/.nvm/versions/node/v12.19.0/bin/node)
npm : 6.14.8
OS : macOS Big Sur
Xcode : Xcode 13.1 Build version 13A1030d
While I was already making this question, I was also looking around stackoverflow and ended up on some suggestions.
The solution for me was to uninstall the app (which have done multipletimes), shut down-turn on the iPhone (or restart) install the app again.
Now the icon is showing as it should.
I am going through a nightmare regarding the UIWebView depreciation by Apple. I am in the process of identifying the cordova plugins and hopefully will find solutions. However, when I start from a blank ionic project, I still see references with respect to UIWebView and puzzled by it. Below please find the steps I followed:
1) ionic start testProject blank --cordova
2) Add the below into the ios section of the config.xml:
<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
3) ionic cordova prepare ios
4) cd platforms/ios
5) grep -Ri UIWebView
At this point, I see references at CDVUIWebViewEngine.m
If I were to install the following:
ionic cordova plugin add cordova-plugin-inappbrowser
npm install #ionic-native/in-app-browser
I also see references related to inappbrowser
I am not sure what is going on with such a basic structure. I'd grateful for any pointer you may have as I have been pulling my hairs for the last two days.
Below is my setup:
Ionic:
Ionic CLI : 6.7.0 (/home/doug/.npm-global/lib/node_modules/#ionic/cli)
Ionic Framework : #ionic/angular 5.1.1
#angular-devkit/build-angular : 0.901.7
#angular-devkit/schematics : 9.1.7
#angular/cli : 9.1.7
#ionic/angular-toolkit : 2.2.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 6 other plugins)
Utility:
cordova-res : 0.14.0
native-run (update available: 1.0.0) : 0.2.9
Thanks,
Doug
I'm creating ios13 app in Ionic3.
But ios13Beta2 is not working in InAppBrowser.
so select param '_blank', this app is crash.
This is error detail.
[TraitCollection] Class _UIFullscreenPresentationController overrides
the -traitCollection getter, which is not supported. If you're trying
to override traits, you must use the appropriate API.
My ionic environment
Ionic:
Ionic CLI : 5.0.3
Ionic Framework : ionic-angular 3.9.6
#ionic/app-scripts : 3.2.4
Cordova:
Cordova CLI : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : ios 5.0.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 14 other plugins)
Utility:
cordova-res : not installed
native-run : not installed
System:
ios-sim : 8.0.1
NodeJS : v12.4.0
npm : 6.9.0
OS : macOS Catalina
Xcode : Xcode 11.0 Build version 11M337n
I was facing the same issue
but finally got it resolved by downgrading the WKView
It's one of the temporary solutions until we are able to get a concrete one.
https://ionicframework.com/docs/v3/wkwebview/
you can do it by adding this in config.xml
<platform name="ios">
<preference name="CordovaWebViewEngine" value="CDVUIWebViewEngine" />
We have developed one application using Ionic 3. We have used ion-select component at multiple places. In android & IOS version > 10, everything is working fine as expected.
But In IOS 9, ion-select component breaks. It shows blank options when tapping on ion-select.
<ion-item>
<ion-label>Gender</ion-label>
<ion-select>
<ion-option value="f">Female</ion-option>
<ion-option value="m">Male</ion-option>
</ion-select>
</ion-item>
Result:
Environment Details:
Specific IOS version in which issue is reproducible: 9.3.5
global packages:
#ionic/cli-utils : 1.5.0
Cordova CLI : 6.5.0
Ionic CLI : 3.5.0
local packages:
#ionic/app-scripts : 1.3.7
#ionic/cli-plugin-cordova : 1.4.1
#ionic/cli-plugin-ionic-angular : 1.3.2
Cordova Platforms : android 6.1.2 ios 4.2.1
Ionic Framework : ionic-angular 3.7.1-201710060319
System:
Node : v7.8.0
OS : OS X El Capitan
Xcode : Xcode 8.2.1 Build version 8C1002
ios-deploy : 1.9.1
ios-sim : 5.0.13
npm : 4.2.0
I was able to resolve the issue by downgrading the app-scripts version to 2.1.4 from 3.0.1.
I also had to add dev dependency tsc-wrapped to resolve some ts lint issues.
"devDependencies": {
"#angular/tsc-wrapped": "^4.4.6",
"#ionic/app-scripts": "2.1.4",
"typescript": "2.3.4"
},
After changing my configuration to above, the webpack process duration came down to 3-4 minutes from 35 minutes.
I have trouble making a build in IOS, when I do a build in android not show any problema.No shows no mistake is only hung with the following message:
ionic build ios
Running command: /Users/kaos/Documents/Proyectos/Ionic/voxMonitor/hooks/after_prepare/010_add_platform_class.js /Users/kaos/Documents/Proyectos/Ionic/voxMonitor
add to body class: platform-ios
Building project: /Users/kaos/Documents/Proyectos/Ionic/voxMonitor/platforms/ios/voxMonitor.xcodeproj
Configuration: Debug
Platform: emulator
2016-09-14 00:57:11.666 xcodebuild[81377:2780361] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-09-14 00:57:11.668 xcodebuild[81377:2780361] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/OMQuickHelp.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-09-14 00:57:11.669 xcodebuild[81377:2780361] [MT] PluginLoading: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin' not present in DVTPlugInCompatibilityUUIDs
Build settings from command line:
CONFIGURATION_BUILD_DIR = /Users/kaos/Documents/Proyectos/Ionic/voxMonitor/platforms/ios/build/emulator
SDKROOT = iphonesimulator10.0
SHARED_PRECOMPS_DIR = /Users/kaos/Documents/Proyectos/Ionic/voxMonitor/platforms/ios/build/sharedpch
Build settings from configuration file '/Users/kaos/Documents/Proyectos/Ionic/voxMonitor/platforms/ios/cordova/build-debug.xcconfig':
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
CODE_SIGN_IDENTITY = iPhone Developer
ENABLE_BITCODE = NO
GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1
HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include" "$(OBJROOT)/UninstalledProducts/include" "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" "$(BUILT_PRODUCTS_DIR)"
IPHONEOS_DEPLOYMENT_TARGET = 8.0
OTHER_LDFLAGS = -ObjC
SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h
TARGETED_DEVICE_FAMILY = 1,2
when I try to open the file xcodeproj, xcode does not start and waits indefinitely until the force exit.
My ionic info :
Your system information:
Cordova CLI: 6.3.1
Ionic Framework Version: 1.3.1
Ionic CLI Version: 2.0.0-beta.37
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v6.5.0
Xcode version: Xcode 8.0 Build version 8A218a
worth mentioning that I am currently using MacOS Sierra GM and Xcode 8 gm.
Edit : when creating a new project and replace the www directory with the version in my project, I can build ios, but once you modify any file no longer compile I can, being hung on the screen above.
The origin of the problem is the project folder is inside the Documents directory which in turn is synchronized to iCloud, so when you move the project to another directory that is not Documents or Desktop, you can build without problems. In this thread on github shows other users who managed to fix it this way.
https://github.com/driftyco/ionic-cli/issues/1401#issuecomment-254989260
Follow these steps(And Before following these steps make sure you have installed IOS SDK on your system)
Remove Hooks with command $ionic hooks remove
Remove Platform with command $ionic platform remove ios
Now Add Hooks with command $ionic hooks add
Now add platform with command $ionic platform ios
Now create build with command $ionic build ios
Now Run your application with command $ionic run ios
My case was the build would hang/stuck when running $ ionic cordova build ios. OS is MacOS Mojave.
My solution was to update ionic and cordova environment. Worth doing ionic cordova build ios --verbose to see what is happening during the build process.
$ brew link --overwrite ios-deploy
$ npm update -g native-run
$ npm install -g cordova ionic
$ npm install -g ionic-angular#latest
Config before update:
Ionic:
Ionic CLI : 5.2.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : #ionic/angular 4.6.0
#angular-devkit/build-angular : 0.13.9
#angular-devkit/schematics : 7.2.4
#angular/cli : 7.2.4
#ionic/angular-toolkit : 1.3.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : android 8.1.0, ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 23 other plugins)
Utility:
cordova-res : 0.9.0
native-run : 0.2.7 (update available: 0.3.0)
System:
Android SDK Tools : 26.1.1 (/Users/haule/Library/Android/sdk)
ios-deploy : 1.10.0
ios-sim : 8.0.2
NodeJS : v10.19.0 (/usr/local/Cellar/node#10/10.19.0/bin/node)
npm : 6.13.4
OS : macOS Mojave
Xcode : Xcode 11.3.1 Build version 11C504
Config after update:
Ionic:
Ionic CLI : 5.4.16 (/usr/local/lib/node_modules/ionic)
Ionic Framework : #ionic/angular 4.6.0
#angular-devkit/build-angular : 0.13.9
#angular-devkit/schematics : 7.2.4
#angular/cli : 7.2.4
#ionic/angular-toolkit : 1.3.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : android 8.1.0, ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 23 other plugins)
Utility:
cordova-res : 0.9.0
native-run : 0.3.0
System:
Android SDK Tools : 26.1.1 (/Users/haule/Library/Android/sdk)
ios-deploy : 1.10.0
ios-sim : 8.0.2
NodeJS : v10.19.0 (/usr/local/Cellar/node#10/10.19.0/bin/node)
npm : 6.13.4
OS : macOS Mojave
Xcode : Xcode 11.3.1 Build version 11C504