binita modi binita modi - 1 year ago 442
Swift Question

Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null) , <FIRAnalytics/ERROR> Encounter network error. Code, error: -999

Encounter network error. Code, error: -999, Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLKey=, NSErrorFailingURLStringKey=, NSLocalizedDescription=cancelled}

I am not able to get FIRInstanceID.instanceID().token(). some time token available and some time not, Anyone help me findout solution?

Answer Source

Finally found solution :- APNS certificate not properly create p12 file. Download file from apple developer account and create p12 file by concatenate command in terminal, follow below steps :-

1) create p12 of APNS certificate
2) create p12 of private key
3) open terminal and write concatenate command
4) cat apnsDev.p12 privateKey.p12 > certMerge.p12

This work for me

Reference from this link of stackoverflow :-

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download