NativeControls plugin doesn't work with Cordova 2.7.0 - iphone

Cordova 2.7.0 no longer allows deprecated forms of calls to cordova.exec. For example:
44. 2013-05-09 01:18:29.850 myiOSApp[9764:17903] The old format of this exec call has been removed 1
deprecated since 2.1). Change to:cordova.exec(null, null, "NativeControls", createTabBar",[]);
The latest version of the iOS NativeControls plugin I know of is at Here and it has not been updated to fix this.
Is there a more recent version of NativeControls anywhere else?
Please help me to fix this issues
by
John

This is because of a changes in 2.1 deprecated previous iOS plugin signature to: (void)myMethod:(CDVInvokedUrlCommand*)command;
I've fork the project and made fixes here: https://github.com/noogen/phonegap-plugins/tree/master/iOS/NativeControls

Related

Swift Version Conflict: this SDK is not supported by the compiler, Please select a toolchain which matches the SDK

I'm using xCode 13.1 with macOS 12.0.1 Monterey. I added KingFisher and removed it from my pod. but my project is not built anymore. I got this error for one of my local SDKs:
Failed to build module 'CbSdk';
this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.4
(swiftlang-1205.0.26.9 clang-1205.0.19.55)', while this compiler is 'Apple Swift version 5.5.1
(swiftlang-1300.0.31.4 clang-1300.0.29.6)'). Please select a toolchain which matches the SDK.
What I've done but didn't work:
pod deintegrate and pod install.
restart xCode with clearing cache and DerivedData.
checkout old branch and commit that worked before.
moving code to another macBook that worked before.
download, install and select toolchain 5.4 (odd errors appeared -> )
changing swift compiler language of my target and project to swift 4 (It says you are using swift 5.5.1 again!)
note that I didn't update xcode or swift!
Taken from this Twitter thread.
You need to set the BUILD_LIBRARY_FOR_DISTRIBUTION build setting on the framework target
https://www.swift.org/blog/library-evolution/
https://developer.apple.com/videos/play/wwdc2019/416/
I fetch the same problem when I try to update a library. My Xcode version was 13.2 with the swift version5.5.2. But the library I want to update required a swift version of 5.7.0. Using toolchains in Xcode might be the solution but I decided to update the Xcode version with the latest.
I update my Xcode to the latest version 14.1 and the issue is resolved. Automatically the swift version is found on the latest Xcode.

The plugin admob_flutter uses a deprecated version of the Android embedding

when i put admob_flutter: ^2.0.0-nullsafety.1 in pubspec, and type on cmd flutter pub get this error occurs!
The plugin admob_flutter uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of
Flutter will remove these deprecated APIs.
It's for latest flutter updates. so you can't do anything. Please use other package or wait till fix the problem by package developer because this error is produced after flutter version 2.5.
I have downgraded my flutter version by command flutter downgrade and it shows an option of a downgraded flutter version and it resolves my error.
Downgrading flutter worked for me.

Ionic native push registration format changed?

I am not sure why but it seems that the interface for push registration changed?
My app follows the logic from
https://ionicframework.com/docs/v3/native/push/
with
pushObject.on('registration').subscribe((registration: any) => console.log('Device registered', registration));
where registration used to be of below type
export interface PushDevice{
registrationId: string;
registrationType: string;
}
but now I am getting
{"registrationId":"{length=32,bytes=0x459ca46ab66f4fe790220809215176d6...21b3436d13e78c64}","registrationType":"APNS"}
registrationID used to be a string, but now is a dictionary. How shall I handle this ID now? I have to convert it to a push token somehow... What changed? I looked into the phone gap plugin code but I can not find it...
https://github.com/phonegap/phonegap-plugin-push/blob/master/src/ios/PushPlugin.m
I faced the same issue in my ionic 1 app. Had to upgrade version of push plugin to 2.3.0 from 2.2.3. Moreover i also upgraded cordova-support-google-services to 1.3.2 to make it work. Although it was related to android but still had to do it. This plugin (phonegap-plugin-multidex) should have a version greater than or equal to 1.0.0
The plugins through which push notifications work fine for me are as follows:
phonegap-plugin-multidex 1.0.0 "Multidex"
phonegap-plugin-push 2.3.0 "PushPlugin"
cordova-support-google-services 1.3.2 "cordova-support-google-services"
Hoepfully this helps
Finally found a lead. Seems this changed with the release of iOS 13.
https://forums.developer.apple.com/thread/117545
The Cordova push plugin has to be updated to v2.3.0 (I have not tested this yet), but my current version is failing because v2.2.3 is accessing the registrationId through a wrong method.
https://github.com/phonegap/phonegap-plugin-push/issues/2832
https://github.com/proreact/phonegap-plugin-push/commit/486c8f206536995c80101487b0fed1502edd5754

How to fix error " Could not find android-maven-gradle-plugin.jar "?

how to fix this error: Could not find android-maven-gradle-plugin.jar in ionic build android.
Seems you have upgraded Gradle to latest version, and using the old maven-gradle-plugin.
Here you have two options,
upgrade android-maven-gradle-plugnin to latest version. Check here to choose right plugin
downgrade gradle to previous version

Issues with cocoapods after upgrading Xcode

Updated my Xcode project and my IQKeyboardManager cocoapod was not working. I updated it and now I get this error:
Module file was created by an older version of the compiler; rebuild IQKeyboardManagerSwift
Any help on how to 'rebuild' a cocopod?
You can't rebuild the Cocoapods repo. You need to use the Use Legacy Swift Language Version to YES in your project.