No more third-party repairs: Apple to lock batteries on new iPhones
Apple batteries can be replaced only by authorised service providers.
According to iFixit, if you replace the battery in the newest iPhones by yourself, a message appears indicating you need to service your battery in the Settings menu. The message is an indicator of poor battery.
However, it still shows up when you put in a brand new Apple battery. It is only when an Apple authorised service provider authenticates a battery to the phone, the message disappears.