The WeChat application seen on an iPhone home screen on March 5, 2018.

Apple has long positioned the iPhone as a secure device that only its owner can open. That has led to battles with law enforcement officials who want to get information off them, including a well-publicized showdown with the F.B.I. in 2016 after Apple refused to help open the locked iPhone of a mass killer.

The F.B.I. eventually paid a third party to get into the phone, circumventing the need for Apple's help. Since then, law enforcement agencies across the country have increasingly employed that strategy to get into locked iPhones they hope will hold the key to cracking cases.