Closed mesqueeb closed 2 years ago
#if USE_PUSH
is optional, if you plan to implement push you need the whole block, otherwise you can remove it.just for reference, on Capacitor migration guide they ask to remove the #if
statement
I didn't remove in the example app but it's working still
@stewones thanks for the elaboration!
@stewones In order to get push notifications to work on iOS, I had to add the following to my AppleDelegate.swift
: https://d.joshf.xyz/LBSR8X, which is also documented here.
I just wanted to make sure that this was expected (and that there wasn't something I was missing), since I was under the impression that this package made it so that you didn't have to modify any native code. I also don't see this mentioned in the iOS setup
(in the README).
Some things to note about the AppDelegate.swift file:
@capacitor/push-notifications
has lines 69 ~ 79 but without the#if USE_PUSH
https://github.com/capacitor-community/fcm/blob/master/example/ios/App/App/AppDelegate.swift#L81
Questions:
#if USE_PUSH
or not?I'm sorry to ask so many questions, but I'm not familiar with Swift : S