SAN FRANCISCO — Two recent federal lawsuits accuse Apple Inc. of improperly interfering with the text messages of its former iPhone customers.

Messages sent between iPhone users are transmitted via Apple’s iMessage service, which the company says is faster, more efficient and gives texters the ability to see when their messages have been read. But plaintiffs allege when a customer switches to a non-Apple device, his or her phone number remains stuck in the iMessage network. Therefore, Apple retains control of text messages sent by other iPhone users, and the messages often never make it to their intended recipient, according to the complaints, both filed last week in the Northern District of California.