cordova-plugin-push: Version 3.0.1 fails to build on XCode 14.3
Bug Report
Version 3.0.1 uses a version of Firebase Messaging (6.32.2) that no longer compiles under XCode 14.3. The version currently on master does (8.1.1), so just releasing that as a new version would fix the issue.
Expected Behaviour
To be able to build an App using the latest published version of this plugin.
Actual Behaviour
It fails to build with “A function declaration without a prototype is deprecated in all versions of C” errors
Reproduce Scenario (including but not limited to)
Steps to Reproduce
- Update to XCode 16.4
- Build a Cordova project with the latest published version of this plugin included.
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
XCode 14.3
(Android) Device Vendor (e.g. Samsung, HTC, Sony…)
n/a
cordova info Printout
Cordova Packages:
cli: 11.1.0
common: 4.1.0
create: 4.1.0
lib: 11.1.0
common: 4.1.0
fetch: 3.1.0
serve: 4.0.0
Project Installed Platforms:
ios: 6.2.0
Project Installed Plugins:
@havesource/cordova-plugin-push: 4.0.0-dev.0
cordova-plugin-app-preferences: 0.99.3
cordova-plugin-app-version: 0.1.12
cordova-plugin-camera: 6.0.0
cordova-plugin-device: 2.1.0
cordova-plugin-file: 7.0.0
cordova-plugin-geolocation: 4.0.1
cordova-plugin-inappbrowser: 5.0.0
cordova-plugin-ionic-keyboard: 2.2.0
cordova-plugin-media-capture: 4.0.0
cordova-plugin-remote-injection: 0.5.2
cordova-plugin-screen-orientation: 3.0.1
cordova-plugin-statusbar: 2.4.3
cordova.plugins.diagnostic: 6.1.1
Environment:
OS: macOS Ventura 13.3 (22E252) (darwin 22.4.0) x64
Node: v14.19.1
npm: 8.19.4
ios Environment:
xcodebuild:
Xcode 14.3
Build version 14E222b
Project Setting Files:
config.xml:
<?xml version='1.0' encoding='utf-8'?>
<widget id="nl.test.app" ios-CFBundleVersion="5.2.0" version="5.2.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Test</name>
<description>Test App</description>
<content src="index.html" />
<preference name="FCM_VERSION" value="17.0.+" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<allow-intent href="https://*" />
<engine name="ios" spec="^6.2.0" />
<platform name="ios">
<resource-file src="GoogleService-Info.plist" />
</platform>
<platform name="ios" />
<platform name="ios">
<splash src="res/ios/splash/Default@3x~iphone~anyany.png" />
<splash src="res/ios/splash/Default@2x~ipad~anyany.png" />
<splash src="res/ios/splash/Default@2x~iphone~anyany.png" />
<splash src="res/ios/splash/Default@3x~universal~anyany.png" />
<splash src="res/ios/splash/Default@2x~universal~anyany.png" />
</platform>
<config-file parent="CFBundleDisplayName" platform="ios" target="*-Info.plist">
<string>Test</string>
</config-file>
</widget>
package.json:
--- Start of Cordova JSON Snippet ---
{
"plugins": {
"cordova-plugin-device": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-app-version": {},
"@havesource/cordova-plugin-push": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-ionic-keyboard": {},
"cordova.plugins.diagnostic": {},
"cordova-plugin-media-capture": {},
"cordova-plugin-camera": {},
"cordova-plugin-file": {},
"cordova-plugin-screen-orientation": {},
"cordova-plugin-geolocation": {},
"cordova-plugin-app-preferences": {},
"cordova-plugin-remote-injection": {}
},
"platforms": [
"ios"
]
}
--- End of Cordova JSON Snippet ---
Sample Push Data Payload
n/a
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 2
- Comments: 16
I managed to get it to compile by specifying
I also had to bump the Gradle Kotlin Plugin for android
in the
config.xml@erisu Any chance in releasing a new version to fix the issue above?
Hello I had the same problem. Here is my repository: cordova plugin add github:kenfouo/cordova-plugin-push --save
GitHub. https://github.com/kenfouo/cordova-plugin-push
What I have done : after migrating to xcode 14.3 I was getting the following error on @havesource/cordova-plugin-push plugin File not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a
the plugin embeds Firebase Messaging 6.32.2 except we are already at version 8.1.1
Here is my solution:
NB: For installation, make sure the plugin is in the same folder as the project.
Bingo 😃 it works!!!
@krem06 if your fork is working can you please raise a pull request and get it merged?
Thanks guys, I will try the push plugin you suggested @kenfouo ASAP!
it’s the version of firebase that is the problem I fixed the problem here, it worked for me. try this
cordova plugin add github:kenfouo/cordova-plugin-push