Notification Content Extension - How to delete it?

I have an app out to the world. It uses Notification Content Extension to give the user 2 choices when they hard press (long press) on the notification. All had worked fine.


Now I need to do an update, and because of the way I need to change the app, Notification Content Extension no longer makes sense. So I deleted it from my project, found all the little places it was. Now I find that it's still lingering.


- If I delete the app from my device, and install using XCode - Run, the notification doesn't have options for long press.

- If I download a fresh copy of the app from the AppStore, then upgrade it using XCode - Run, the extension is still there, as the choices when you long press are still available.


Will the Content Extension be deleted when I get to the point where I send the new app to the AppStore, so this is just an XCode issue, or am I stuck wth this Notification Content Extension for the life of the app?

Did you perform an option-clean build folder to encourage Xcode to let go?

I do not know how to easily solve your problem but here is a 'work around'.


The problem is that when you install over a pre-existing build some stuff remains from that pre-existing build. For example, all the files remain to be read by the new build. So what you described sounds like the old build retains the long push notification and passes it on to the new build.


So a work around would be to have your new app version detect that it is being placed over the old build by, for example, looking for a retained file. If it decides it is being placed over the old build - and that old build is the old version - then issue an alert to the user, someting like: "For optimal performance, please delete this app from your device before installing this version from the App Store."

I found a workaround / solution? this morning.


When I make the Notification, I had used content.categoryIdentifier = "originalIdentifier". I hadn't deleted it, but when I did, it turns it back into a "regular" notification, where hard / long press does nothing, which is what I now want to happen.


I had tried the AdHoc update as suggested, but the problem still existed. I'll put a note here when I put out the new version and see if the content extension information was kept with the update (which I think it will). I can test by changing the identifier back to the original, just for testing purposes.

Good info, thanks for the followup.

Notification Content Extension - How to delete it?
 
 
Q