Apple is going to great lengths to ensure iPhone repairs are only performed by an Apple Genius or Apple Authorized Service Provider. According to iFixit, the company has added a dormant software lock on the newest models, which will be triggered whenever the battery is swapped.
That’s even if it’s a genuine Apple battery. Once the lock occurs, the iPhone will no longer show its battery health and display an “Important Battery Message” indicating that it may not be authentic.
Put simply, Apple is locking batteries to their iPhones at the factory, so whenever you replace the battery yourself—even if you’re using a genuine Apple battery from another iPhone—it will still give you the “Service” message. The only way around this is—you guessed it—paying Apple money to replace your iPhone battery for you.