I don't understand why it keeps telling me this. Am I supposed to add something in AppDelegate? Or does this library handle it already?
Btw, Thanks a lot for this library, it helped when nothing else could.
U should add ur profiles on firebase console, it will handle it for u
I added only production profile. But it still shows development profile in console, even for release version.
<FIRInstanceID/WARNING> APNS Environment in profile: development
I am using 1.0.16
U should add both
But I don't require to. If I added a development profile, will the library start using my production profile? o.O
I think so
Actually I have put both the certificates and it still shows development only. Do I have to do something else before running the app for production?
@evollu, any ideas?
I don't know how they pick profiles in firebase. what does google or firebase support say?
http://stackoverflow.com/questions/37628158/firebase-cloud-messaging-development-and-release-profile
The first answer suggests to change the ObjC files. We need to setAPNSToken() somewhere.
I didn't find it in the module and had been feeling reluctance to try editing the module.
unlike GCM library, firebase SDK set APN token automatically for you. I think the profile used is base on how you build your project (debug/release)
That is exactly what I expected, but I am seeing the above message even in release version.
One way to avoid it might be to remove the development certificate altogether. But that is, not cool.
Also, if you look at the first answer, this guy seems to talk about FCM only. Don't take it otherwise, but are you sure that Firebase SDK sets the environment automatically based on debug/release?
https://firebase.google.com/docs/cloud-messaging/ios/client
Swizzling disabled: mapping your APNs token and registration token you only need to set APN tokens manually if you disable swizzling mode.
have you updated your config file after uploading your production cert?
@vaibhawc r u using xcode 8 and targeting ios 10?
do u still have this problem? if not how have u solved?
Hey @sibelius, I have currently upgraded to xcode 8 and ios10. It still is there. I haven't yet figured out how to solve it. Planning to release the app by weekend(next) so, will be jumping into it in few days. Referring to @evollu's last comment, I think I probably downloaded the config before putting the certs on FB. Need to check that too.
@vaibhawc Any news?
Hi @ivanpetrov16130, I am unable to solve this issue. However, please pardon me, I can't produce the link where I read that an AppStore App will always refer to the Production Environment. Hence, I am assuming that it is the XCode which shows me development env, but on actual run by user it will not misbehave. I wish if xcode could also show production env, and let me have a test it on development. A native iOS developer can help more, I don't have experience of using notifications on native.
@vaibhawc Can't solve this too. Looks like I have to rely on Apple's will. Anyway, thanks for information.
When you archive you project and upload to app to you will get a series of popups. If you scroll down on the first or second it will tell you which apn environment it will use. Im using the new Xcode and letting it handle my profiles. I've also got an app working in Test Flight with push notifications working.
Has anyone managed to solve this issue? I'm having the same problem with:
I found an answer that worked for me here https://forums.developer.apple.com/thread/63726.
Apparently the APNS environment is set to development no matter what (even if you change it in the .entitlements file) until you deploy it to testflight. This means you have to create a development cert on the apple dev page & upload that to the Firebase messenger dev key.
@evollu I think u can close this now
Most helpful comment
I found an answer that worked for me here https://forums.developer.apple.com/thread/63726.
Apparently the APNS environment is set to development no matter what (even if you change it in the .entitlements file) until you deploy it to testflight. This means you have to create a development cert on the apple dev page & upload that to the Firebase messenger dev key.