A little more than a week after iOS developers were threatened with legal action by a company that holds various patents, Apple’s legal department has struck back.

On May 13, many iOS developers reported receiving FedEx packages containing a threat that they risked patent-infringement lawsuits if they didn’t pay Lodsys to license a patent covering in-app purchasing and other app-related matters.

In a letter sent Monday (read the full text of the letter here) to patent-holder Lodsys and its CEO Mark Small, Apple says its existing license for patents covering in-app purchases applies to all iOS app makers as well.

The crux of Apple’s letter, from senior vice president and general counsel Bruce Sewell, is right in its opening paragraph, which reads in part: “Apple is undisputedly licensed to these patents and the Apple App Makers are protected by that license. There is no basis for Lodsys’ infringement allegations against Apple’s App Makers. In addition to stating that Apple would share the letter with developers—which it has—the company also says that it “is fully prepared to defend Apple’s license rights.”

Though it runs for three pages, Sewell could have ended his letter there. Lodsys has already publicly stated that Apple licenses its patents; the companies agree on that. Apple’s contention, which runs counter to Lodsys’s previously published view, is that Apple’s license covers iOS developers, too.

Under its license, Apple is entitled to offer these licensed products and services to its customers and business partners, who, in turn, have the right to use them.

But that’s not Sewell’s only point; his argument is twofold: Apple’s license to the Lodsys patents covers iOS developers, and the alleged patent infringement isn’t really occurring anyway. By way of example, Sewell cites Lodsys’s claims regarding alleged violations of its U.S. Patent No. 7,222,078, which Apple says “covers two-way interaction with the user and elicits user feedback.” Sewell writes:

Under your reading of the claim as set out in your letters, the allegedly infringing acts require the use of Apple APIs to provide two-way communication, the transmission of an Apple ID and other services to permit access for the user to the App store, and the use of Apple’s hardware, iOS, and servers.

In other words: These developers aren’t infringing Lodsys’s patents, because they’re using Apple software and hardware to provide the functionality that Lodsys alleged needed licensing. Apple’s point is that, since the technology is Apple’s, Apple’s license is sufficient. Sewell makes the same point again regarding another alleged example of infringement:

Claim 1 also claims a memory that stores the results of the user interaction and a communication element to carry those results to a central location. Once again, Apple provides, under the infringement theories set out in your letters, the physical memory in which user feedback is stored and, just as importantly, the APIs that allow transmission of that user feedback to and from the App Store, over an Apple server, using Apple hardware and software. Indeed, in the notice letters to App Makers that we have been privy to, Lodsys itself relies on screenshots of the App Store to purportedly meet this claim element.

Apple’s argument is thus fairly straightforward. The company licensed its use of the Lodsys patents, and the developers that Lodsys alleges infringe those patents in fact leverage Apple’s licensing, since any behaviors covered by the patents are actually driven by Apple’s technology, and not the developers’.

Citing the Quanta Computer, Inc. v. LG Electronics, Inc. 2008 Supreme Court case, Sewell writes that:

…because [the discussed] Apple products and services, under the reading articulated in your letters, entirely or substantially embody each of Lodsys’s patents, Lodsys’s threatened claims are barred by the doctrines of patent exhaustion and first sale… Therefore, Apple requests that Lodsys immediately withdraw all notice letters sent to Apple App Makers and cease its false assertions that the App Makers’ use of licensed Apple products and services in any way constitute infringement of any Lodsys patent.

Obviously, Apple’s firm letter to Lodsys doesn’t make the issue go away. Lodsys may force Apple’s hand by going forward with threatened litigation against App Store developers. But Apple’s letter at least offers some reassurance to iOS developers that the company takes the issue seriously, and that the company intends to defend its developers against such patent legal wrangling. Lodsys’s response, of course, remains to be seen.

Developers react

Developer reaction to the news was swift. TLA Systems developer James Thomson, who broke the story when he received a letter from Lodsys, expressed a feeling of great relief.

“I am extremely relieved that Apple has stood up for its developers against these patently unfair claims by Lodsys,” Thomson told Macworld. “I always believed they would, but it’s a huge weight off my shoulders to see it written in black and white. The last ten days have been some of the most stressful of my professional career, and I’d just like to say thanks to Apple and all our customers and friends who have been highly supportive of us during this time.”

Ken Landau, the President of MobileAge and another recipient of Lodsys’s legal threat, told Macworld that Apple’s letter is “real good for us developers… I’m really very happy. Apple did the right thing.”

“I’ve never seen iOS developers so excited about the walled garden,” Red Sweater Software’s Daniel Jalkut wrote on Twitter.

“I should write to Steve Jobs more often,” tweeted Iconfactory developer Craig Hockenberry. Earlier in the day Hockenberry posted an open letter to Steve Jobs on his blog where he referred to companies like Lodsys as “greedy predators.”

[Updated several times on 5/23 to add developer reaction and more analysis of the letter. Macworld editorial director Jason Snell contributed to this report.]