Is Ionic framework's compatible with tsconfig target ES2020 - ionic-framework

I am using mono repo with npm workspaces. Repo has 3 packages
server - server code
commons - common code shared between server and ionic-app
ionic-app - ionic app
Both server and commons app are configured with target of ‘ES2020’ as follows.
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"lib": ["ES2020"],
}
}
But ionic react app which uses commons package has target of ‘es5’. To match with commons tsconfig, if I change target of ionic app to “ES2020” and module to ‘commonjs’, will there be any compatibility issue while running app in mobile platform (especially older mobile)?

I did tried to use the es2020 instead of es5 and couldn't find any error.
Also, when running ng update to the angular v14, it will change it automatically to this version.
So for me it's safe to be use.
Compatibility issue
Ionic is meant to be used by older smartphone, the newest ECMAScript version (the 2020) does contains some logics that does not work on every devices (specific the older one).
Please, have a look here: https://kangax.github.io/compat-table/es2016plus/ and scroll down to the 2020 features.

Related

Ionic Capacitor : Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE

I’m having this issue because of the minimum target SDK 31 update for the Play Store
I’ve had the App working well, I changed the TargetSDK in the gradle variables file and I’m getting this error :
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
Here’s the List of My Plugins :
(npx cap ls)
#capacitor-community/admob#3.2.0
#capacitor/app#1.1.1
#capacitor/haptics#1.1.4
#capacitor/keyboard#1.2.2
#capacitor/push-notifications#1.0.9
#capacitor/splash-screen#1.2.2
#capacitor/status-bar#1.0.8
#codetrix-studio/capacitor-google-auth#3.1.4
[info] Listing plugins for web is not possible.
I’ve read That I need to upgrade some plugins but i don’t know which ones
Can you please help me
To properly support SDK 31/32 you have to upgrade to capacitor 4.
Run npm i #capacitor/cli#latest. And then run npx cap migrate. That will update all capacitor dependencies and plugins to version 4 and make required changes to your native projects.

Ionic - Angular with Capacitor on Android : All app updates must use Billing Library version 4 or newer. in-app-purchase-2

Version used: "#awesome-cordova-plugins/in-app-purchase-2": "^5.46.0",
Actions on Webstorm (ionic project) :
ionic build
npx cap sync
npx cap open android
Actions on Android Studio:
Generate a signed bundle
Actions on google play console:
Create new release with the signed bundle
Warning on google play :
We've detected that this app is using an old version of Google Play Billing. By November 1, 2022, all app updates must use Billing Library version 4 or newer. Update to Billing Library 4 before this date.
What I tried without success:
Add these two lines in the build.graddle:app and in capacitor.build.graddle and in the capacitor-cordova-android-plugins/build.graddle:
dependencies {
....
implementation "com.android.billingclient:billing:5.0.0"
}
What I want:
How do I update the PlayBillingLibrary from ionic and have it be taken into account with Capacitor when i sync my app on android (npx cap sync) ?
Thanks in advance
You need to update cordova-plugin-purchase to version 11.0.0 or higher (see RELEASE_NOTES.md).

Where is the version specified in Ionic app?

I'm using AppVersion.getVersionNumber() to get the version number of my Ionic app. But where does this number come from?
The problem is that when I run the app on a smartphone through devapp, I get a different version number depending on what OS I have…
iOS (on an iPhone 6): 1.0.2
Android (on a Samsung S10): 1.0.4
Searching around for "version" in my source code, I find this in config.xml (in the root):
<widget version="1.0.3" … >
I don't know if this is relevant, but it is the currently delivered version of the app.
I'm using Ionic 4.10.0
AppVersion cordova plugin reads the app details from the native code of the application.
So the version values that you see, are configured in the native IDE's.
Check these files in your respective platform folders..
ios/App/App.xcodeproj/project.pbxproj the key to look for in this MARKETING_VERSION
android/app/build.gradle the key to look for in this versionName

Native HTTP not working after adding /ngx library in IONIC

earlier it was working after i created new project using "ionic start Sample blank --v2" native http is not working
what is your "#ionic-native/http" version ? / you can check and change version from package.json
I'm using "#ionic-native/http": "^4.10.0" and its stable. You can try to downgrade this version.
don't forget npm install after the change in package.json

Visual Studio Team Services ASPNET CORE build failure

I'm trying to setup a build definition for a new ASPNET Core webapp.
The setup of the build definition is exactly this:
Official Docs
The build fails at building the solution with this error:
Issues
Build
File name doesn't indicate a full path to a executable file.
GETSDKTOOLINGINFO (0, 0)
The project is configured to use .NET Core SDK version 1.0.0-preview2-003131 which is not installed or cannot be found under the path C:\Program Files\dotnet. These components are required to build and run this project. Download the version of .NET Core SDK specified in global.json or update the SDK version in global.json to the version that is installed.
Process 'msbuild.exe' exited with code '1'.
Any guess on how to solve this?
Thanks
Francesco
You need to install the corresponding version of .Net SDK to build agent machine.
You can refer to this article to download .Net Core 1.0.0-preview2-003131 and install it on your build machine.
Assuming you are using hosted build agent. According to Software on the hosted build server, the hosted build server is deployed with the following .NET Framework:
.NET 4.6
.NET 4.5.2
.NET 4.5.1
.NET 4.5
.NET 3.5 SP1
.NET Core 1.0 with Preview 2 Tooling
You may try to deploy an on-premises build agent and install .NET Core 1.0.1 SDK 1.0.0-preview2-003131 to work with VSTS: https://www.visualstudio.com/en-us/docs/build/admin/index#deploy_agent.
If you insist on using hosted build agent, then you need to use version of Microsoft.NETCore.App that is installed in VSTS, for example:
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0-rc2-3002702",
"type": "platform"
},
In my case, it was just a change in global.config:
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-preview2-003121"
}
}
As long as 1.0.0-preview2-003131 is not available on VSO build hosts