What should I do that for changing or requesting the token in firebase? the unique token generated by firebase on the basis of device information.
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- adding sha1 in firebase app fails with error
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- How can make folder with Firebase Cloud Functions
- Using if let syntax in switch statement
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Enum with associated value conforming to CaseItera
- Swift - hide pickerView after value selected
Now i got my answer after facing many troubles for generating new or change token of firebase for push notification.
1) Delete old Firebase token
2) Request new Firebase token
UPDATE FOR SWIFT 4 & Firebase 4.8.2 (Follow simple two steps)
for now
InstanceID.instanceID().token()
is deprecated.You should use this:
Then in AppDelegate:
I understand that you want to change or update the firebase token.
Create the following two methods
Call the
and in the closure check if true then call
this will fail for the first time and one of the delegate method will be called i.e.
This time
will be called again from the delegate method and you will get a new token.