binita modi binita modi - 1 month ago 55
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=https://app-measurement.com/config/app/1:50614245612:ios:fab42aa0b6b4439e?app_instance_id=&platform=ios&gmp_version=3402, NSErrorFailingURLStringKey=https://app-measurement.com/config/app/1:50614245612:ios:fab42aa0b6b4439e?app_instance_id=&platform=ios&gmp_version=3402, 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

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 :- http://stackoverflow.com/a/32470374/5242836

Comments