BelledonneCommunications / flexisip

Linphone.org mirror for flexisip (git://git.linphone.org/flexisip.git)
http://flexisip.org
GNU Affero General Public License v3.0
140 stars 68 forks source link

Bad APNS server selected in this case #167

Open oguilbaud opened 11 months ago

oguilbaud commented 11 months ago

If the name of the application and/or the name of the certificate file contain ".dev", the APNS server is systematically the Apple development server. (for me this is a big problem, as my application contains the term ".device") I found the problem in /src/pushnotification/apple/apple-client.cc line 45 To solve it, you need to replace it with

const auto apn_server = StringUtils::endsWith(certName, ".dev") ? APN_DEV_ADDRESS : APN_PROD_ADDRESS;

That's all