katzer / cordova-plugin-app-event

Cordova App-Event Plugin
Apache License 2.0
26 stars 23 forks source link

Breaks on cordova-ios 5.0.0 #15

Closed dmastag closed 4 years ago

dmastag commented 5 years ago

New cordova-ios@5.0.0 was just released and we cannot build now

Plugins/cordova-plugin-app-event/CDVPlugin+APPAppEvent.m:65:23: error: use of undeclared identifier
      'CDVLocalNotification'
                 name:CDVLocalNotification
                      ^
1 error generated.
marutifh commented 5 years ago

@dmastag Did you find any solution for this?

dmastag commented 5 years ago

@marutifh I just removed cordova-plugin-app-event But am not sure if that is a good idea, so I went back to ios 4

alexhisen commented 5 years ago

@katzer cordova-ios 5.0.0 is required to fully support XCode 10, which in turn is required to submit apps to the app store starting in March 2019. So, please fix this ASAP. I think this API was deprecated in 4.x and is finally removed in 5.x

alexhisen commented 5 years ago

Note that cordova-plugin-local-notifications actually no longer uses this plugin, but if you've been upgrading from older versions, it'll still be part of the build. It can be safely removed.

sohelmk commented 5 years ago

Hi, This issue occurs even after removing app-event plugin on Cordova ios 5.0.0

                                             ^

.../Plugins/de.appplant.cordova.plugin.local-notification/APPLocalNotification.m:903:47: error: use of undeclared identifier 'CDVLocalNotification' [NSNotification notificationWithName:CDVLocalNotification

raja-vignesh commented 5 years ago

What is the fix for this please?

hamrak commented 5 years ago

https://github.com/apache/cordova-ios/blob/master/guides/API%20changes%20in%204.0.md

Deprecated: const CDVLocalNotification const CDVRemoteNotification const CDVRemoteNotificationError These constants were unfortunately not removed in 4.0, but will be removed in 5.0. Local and remote push notification functionality was removed in the core in 4.0.

sreekanth-karini commented 5 years ago

Issue is with cordova-ios : 5, So Below steps works for me:

shawns582 commented 5 years ago

any solution yet to get this working on cordova-ios 5?

uasiddiki commented 4 years ago

I am new to it and using Cordova iOS 5.0.1 , has the error been resolved yet ? . Upon build I find the same error at the following part of the program.

katzer commented 4 years ago

@uasiddiki Why do you need that plugin? It was used as an (internal) dependency for other plugins. However its not needed anymore for long time. I think the only fix is to remove it as a dependency.

uasiddiki commented 4 years ago

@katzer , thanks a lot. I just removed it and it worked. I thought it was somehow related to notifications so that is why I assumed it's important. Nevertheless, the project built successfully and the app works fine.

pedrobenevides commented 4 years ago

Ok, for me the problem was not only the package cordova-plugin-app-event but also de.appplant.cordova.plugin.local-notification, after i removed those packages, and add the platform with the @latest parameter, everything stars to work again.

So, just to be clear:

  1. ionic cordova platform rm ios
  2. ionic cordova plugin remove de.appplant.cordova.plugin.local-notification
  3. ionic cordova platform add ios@latest
  4. ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
Pratz007-tech commented 4 years ago

Any one still working on this ? I have a plugin used https://github.com/wnyc/cordova-plugin-wakeuptimer for alarm . After forking i was able to use the plugin but got the same issue use of undeclared identifier : name:CDVLocalNotification in WakeupPlugin.m. Any help would be appreciated :) Thanks in advance !!

fehmiaksakal commented 3 years ago

Hi,

Only create ios platform to 4.5.0 or remove this plugins.

cordova platform remove ios cordova platform add ios@4.5.0 cd ios pod install (if give the application error use => npx pod install) build with xcode