For many people, smartphone shopping comes down to a choice of Apple's iPhone or one powered by Google's Android software.
But now consumers can get an iPhone and fill it with Google.
Google has become one of the most prolific and popular developers of apps for the iPhone, in effect helping its competitor make more appealing products -- even as relations between the companies have deteriorated.
While some of its Internet services were built into the iPhone from the start, Google has stepped up its presence in the last eight months, pumping out major new iPhone apps or improving old ones. It also has expanded efforts to hire developers to make more such apps.
A maps app Google released in December has been the most downloaded program for the iPhone for much of the last month. The company has cranked out a YouTube app, an iPhone version of its Chrome Web browser and better software for gaining access to its Gmail service. Two dozen iPhone apps from Google are available on Apple's App Store, with variations for the iPad.
Google's strategy may look self-defeating at first. But analysts and technology executives say it is simply acknowledging the obvious: that there is an enormous market of avid iPhone users it wants to reach, an audience that is a target for ads and that can yield a bonanza of data that will allow Google to improve the online products that produce much of its profits.
Google's support for the iPhone also looks like a win for Apple, which, after all, makes money when it sells an iPhone that is used to gain access to Google services.
But potential risks lie in Google's growing presence on Apple's devices, especially when it comes to apps that replace basic functions like Web browsing, maps and e-mail.
IPhone users who spend much of their time in Google apps could deprive Apple of valuable data it needs to improve its own online services like maps. And those apps could help Google build a deeper connection with users that makes them more likely to switch entirely to Android smartphones later.
"The best way to recruit users to those devices is to get them using the services," said Chris Silva, a mobile analyst at Altimeter Group, a tech industry research business. "Find them where they are, get them using the services and ramp them up so when they have devices equivalent to the iPhone, they are already in the market."
Stephen Stetelman, a real estate agent in Hattiesburg, Miss., is a prime example of an iPhone user whose loyalties are divided between Apple and Google. The first thing Mr. Stetelman, 25, said he did when he got a new iPhone two weeks ago was to download all of Google's major apps, including Gmail, Chrome and Google Maps -- all of which he said he considered better than the comparable Apple apps that came with the phone.
"It's a little ironic," Mr. Stetelman said. "But I think honestly the grace of Apple is in their design and in their hardware. As far as online services and applications and stuff, I think Google is still top of the line."
People like Mr. Stetelman make executives at Apple nervous. Early in the iPhone era, Steven P. Jobs, the company's former chief executive, who died in October 2011, did not want Apple to approve any apps for the device that replaced its core functions, one former senior Apple employee said.
Apple executives have long believed that they would need to build up many of the same services that Google offers to compete long-term in the mobile market, according to this person, who did not want to be named to avoid jeopardizing relationships.
Eventually, under scrutiny from federal regulators, Apple softened its stance and began allowing apps for the iPhone, like Web browsers, that competed with important built-in apps.
Natalie Kerris, a spokeswoman for Apple, declined to comment for this article.
Apple has moved to reduce the presence of Google services in apps that come installed on its phones. Last year it removed the YouTube app -- one that Apple created for the earliest iPhones so they would have access to YouTube videos. It also stopped using Google data to power its mapping application.
Instead, Apple began using its own maps service, which has been widely criticized for mistakes, including misplaced landmarks and inaccurate addresses. Timothy D. Cook, Apple's chief executive, issued a rare apology last September for its maps product and later shook up the company's management ranks, in part because of the problems.
Apple's decision to stop including Google's services on its devices forced Google to quickly ramp up its own software development for Apple's mobile operating system, iOS.
While Google had engineers devoted to iOS projects, it had to hire outsiders to help quickly design a Google Maps app for the iPhone.
That app appears to be a huge hit. Widely praised by technology reviewers, Google Maps for the iPhone was downloaded more than 10 million times in the 48 hours after its release last December, Jeff Huber, a Google senior vice president, said in an online post at the time.
Other Google apps are among the most commonly used on the iPhone. Last November there were 11.8 million unique users of a new Google-created YouTube app for the iPhone in the United States, and 6.4 million users of its Google Search app, placing them both in the top 20 list of iPhone apps with the biggest audience, according to Nielsen.
In October, Google updated its search application for the iPhone with voice capabilities that more closely resembled those of Siri, the often-maligned virtual assistant included in the iPhone.
Google also bolstered its efforts last year to hire more iOS developers, many of whom might be unlikely to consider working for the company because of its focus on promoting the Android operating system on mobile devices.
Last July, Google bought Sparrow, a Paris-based start-up that made a popular app for using Gmail on the iPhone, and moved some of its engineers to Silicon Valley.
Last December, it began posting Web ads to recruit iOS developers, providing a link to a Q.&A. on the subject with the headline, "Wait, Google has iOS mobile apps teams?"
Chris Hulbert, a freelance programmer who spent three months working for Google in Australia last year, wrote a blog post in which he compared working on iOS apps there to "working behind enemy lines."
Google said it had not changed its strategy on Apple devices, but rather was continuing to build apps for all devices.
"Our goal is to make a simple, easy-to-use Google experience available to as many people as possible," said Christopher Katsaros, a Google spokesman. "We've developed apps for iOS for some time now, and we're delighted to see the recent enthusiasm for them."
Unlike Apple, Google makes its money not from selling phones but from selling ads that appear on those phones. So it cares less about which phone a consumer uses and more about whether that consumer uses Google apps -- and shares data with Google and sees Google ads.
When a consumer uses Chrome on the desktop at work, for instance, then opens the same tabs and continues using Chrome on phones elsewhere, Google knows much more about that consumer's behavior, including the consumer's location and the searches. The company's hunger for such data has, of course, raised privacy concerns.
Chetan Sharma, an independent mobile analyst, says Google's focus on iOS should concern Apple. "It just pushes Apple to up their game in software," he said. "They're kind of behind."interact
This article originally appeared in The New York Times.