Apple CEO Tim Cook introduces Apple tv+ during a launch event at Apple headquarters on March 25, 2019, in Cupertino, California. (Photo by NOAH BERGER / AFP)        (Photo credit should read NOAH BERGER/AFP/Getty Images)
PHOTO: NOAH BERGER/AFP/AFP/Getty Images
Apple CEO Tim Cook introduces Apple tv+ during a launch event at Apple headquarters on March 25, 2019, in Cupertino, California. (Photo by NOAH BERGER / AFP) (Photo credit should read NOAH BERGER/AFP/Getty Images)
Now playing
02:54
Apple TV+ gets star-studded intro
FILE - In this March 4, 2018, file photo, then-MacKenzie Bezos arrives at the Vanity Fair Oscar Party in Beverly Hills, Calif. Scott, philanthropist, author and former wife of Amazon founder Jeff Bezos, has married a Seattle science teacher. Dan Jewett wrote in a letter to the website of the nonprofit organization the Giving Pledge, on Saturday, March 6, 2021, that he was grateful to be able to marry such a generous person and was ready to help her give away her wealth to help others. (Photo by Evan Agostini/Invision/AP, File)
PHOTO: Evan Agostini/Invision/AP
FILE - In this March 4, 2018, file photo, then-MacKenzie Bezos arrives at the Vanity Fair Oscar Party in Beverly Hills, Calif. Scott, philanthropist, author and former wife of Amazon founder Jeff Bezos, has married a Seattle science teacher. Dan Jewett wrote in a letter to the website of the nonprofit organization the Giving Pledge, on Saturday, March 6, 2021, that he was grateful to be able to marry such a generous person and was ready to help her give away her wealth to help others. (Photo by Evan Agostini/Invision/AP, File)
Now playing
01:51
Billionaire Mackenzie Scott marries schoolteacher
Now playing
03:17
Do Americans know what's in the $1.9 trillion relief bill?
People continue to eat in dining pods despite indoor dining opening back up on Valentine's Day on February 14, 2021 in the Brooklyn borough of New York City. (Photo by Michael Loccisano/Getty Images)
PHOTO: Michael Loccisano/Getty Images
People continue to eat in dining pods despite indoor dining opening back up on Valentine's Day on February 14, 2021 in the Brooklyn borough of New York City. (Photo by Michael Loccisano/Getty Images)
Now playing
03:07
US economy added 379,000 jobs in February
small business loans
small business loans
Now playing
02:45
Funding delays leave small businesses in limbo
Mandatory Credit: Photo by JUSTIN LANE/EPA-EFE/Shutterstock (11700603g)
Pedestrians walk past a closed store in New York, New York, USA, on 08 January 2021. The United States' Bureau of Labor Statistics released data today showing that the US economy lost 140,000 jobs in December and that the unemployment rate is at 6.7 percent as businesses continue to struggle with the economic impact of the coronavirus pandemic.
Coronavirus Economy Impact, New York, USA - 08 Jan 2021
PHOTO: Justin Lane/EPA-EFE/Shutterstock
Mandatory Credit: Photo by JUSTIN LANE/EPA-EFE/Shutterstock (11700603g) Pedestrians walk past a closed store in New York, New York, USA, on 08 January 2021. The United States' Bureau of Labor Statistics released data today showing that the US economy lost 140,000 jobs in December and that the unemployment rate is at 6.7 percent as businesses continue to struggle with the economic impact of the coronavirus pandemic. Coronavirus Economy Impact, New York, USA - 08 Jan 2021
Now playing
01:30
Another 745,000 Americans filed for first-time unemployment benefits
In this Dec. 1, 2020 file photo, Chairman of the Federal Reserve Jerome Powell appears before the Senate Banking Committee on Capitol Hill in Washington.  Powell told Congress on Wednesday, Feb. 24, 2021,  that the central bank will not begin raising interest rates until the Fed believes it has reached its goals on maximum employment  and warned that many people in the hardest hit industries will likely need to find different jobs.  (AP Photo/Susan Walsh, Pool, File)
PHOTO: Susan Walsh/AP
In this Dec. 1, 2020 file photo, Chairman of the Federal Reserve Jerome Powell appears before the Senate Banking Committee on Capitol Hill in Washington. Powell told Congress on Wednesday, Feb. 24, 2021, that the central bank will not begin raising interest rates until the Fed believes it has reached its goals on maximum employment and warned that many people in the hardest hit industries will likely need to find different jobs. (AP Photo/Susan Walsh, Pool, File)
Now playing
02:18
Jerome Powell: US economy 'some time' away from full recovery
PHOTO: YouTube/Everyday Astronaut
Now playing
01:19
Watch SpaceX Mars prototype rocket nail landing, explode on pad
Now playing
02:55
Marriott CEO: We want travelers to feel safe
CHICAGO, ILLINOIS - JANUARY 15: Demonstrators participate in a  protest outside of McDonald's corporate headquarters on January 15, 2021 in Chicago, Illinois.  The protest was part of a nationwide effort calling for minimum wage to be raised to $15-per-hour. (Photo by Scott Olson/Getty Images)
PHOTO: Scott Olson/Getty Images
CHICAGO, ILLINOIS - JANUARY 15: Demonstrators participate in a protest outside of McDonald's corporate headquarters on January 15, 2021 in Chicago, Illinois. The protest was part of a nationwide effort calling for minimum wage to be raised to $15-per-hour. (Photo by Scott Olson/Getty Images)
Now playing
03:31
What a $15 minimum wage really looks like
PHOTO: MyHeritage
Now playing
01:01
Watch old photos come to life using AI
Now playing
01:19
Warren proposes wealth tax: 'It's time for them to pay a fair share'
Nigerian former Foreign and Finance Minister Ngozi Okonjo-Iweala smiles during a press conference on July 15, 2020, in Geneva, following her hearing before World Trade Organization 164 member states' representatives, as part of the application process to head the WTO as Director General. (Photo by Fabrice COFFRINI / AFP) (Photo by FABRICE COFFRINI/AFP via Getty Images)
PHOTO: FABRICE COFFRINI/AFP/Getty Images
Nigerian former Foreign and Finance Minister Ngozi Okonjo-Iweala smiles during a press conference on July 15, 2020, in Geneva, following her hearing before World Trade Organization 164 member states' representatives, as part of the application process to head the WTO as Director General. (Photo by Fabrice COFFRINI / AFP) (Photo by FABRICE COFFRINI/AFP via Getty Images)
Now playing
04:05
WTO Chief: We need equitable and affordable access to vaccines
Goya Foods President Robert Unanue speaks at a press conference with Carlos Vecchio, the Venezuelan Ambassador who is recognized by the United States on December 21, 2020 in Doral, Florida. The two held the press conference to discuss details of a recent shipment of humanitarian aid to Venezuela, donated by Goya Foods. (Photo by Joe Raedle/Getty Images)
PHOTO: Joe Raedle/Getty Images
Goya Foods President Robert Unanue speaks at a press conference with Carlos Vecchio, the Venezuelan Ambassador who is recognized by the United States on December 21, 2020 in Doral, Florida. The two held the press conference to discuss details of a recent shipment of humanitarian aid to Venezuela, donated by Goya Foods. (Photo by Joe Raedle/Getty Images)
Now playing
03:24
Goya CEO under fire for false Trump election claims
Now playing
01:23
'There should be no threats': Biden's message to union-busters
Now playing
04:34
See what has happened to Trump's DC hotel after his loss
(CNN Business) —  

At one time, the staggering success of the iPhone helped catapult Apple to become the world’s most valuable company. Now, its lackluster smartphone sales are dragging down Apple’s business.

Apple (AAPL) said Tuesday that its revenue for the first three months of 2019 declined 5% from the year prior to $58 billion as it grappled with sluggish smartphone demand. iPhone sales for the period fell 17% from the year prior.

For years, Apple’s iPhone business appeared to defy gravity as the company managed to sell more devices and gradually charge more for them. But that narrative was shattered at the beginning of this year when the company warned investors that iPhone sales had taken a hit from a slowdown in China amid an ongoing trade war.

However, on a conference call with analysts after the earnings report Tuesday, CEO Tim Cook signaled that the worst may be over for the iPhone as Apple sees signs of improvement in China. In particular he cited “improved trade dialogue” between China and the United States and “very positive customer response to the pricing actions we’ve taken in that market.”

Apple has faced stiff competition in China from competitors like Huawei and Xiaomi, which offer cheaper smartphones at a time when Apple is embracing phones with four-figure price tags. Apple recently reduced the price of some of its products, including the iPhone XS and XR, by nearly 6% in some instances.

Still, Apple has a long way to go to start growing again in China, which was not long ago viewed as one of its most promising markets. Apple posted revenue of $10.2 billion in China for the first three months of the year, down 21% from $13 billion in the same period a year ago.

“While China continues to be soft, it appears Apple saw strength in the last few weeks of the quarter across the board on a rebound in iPhone demand,” Daniel Ives, an analyst with Wedbush, wrote in an investor note Tuesday after the report.

Looking back at the last five months, Cook said “November and December were the most challenging.” Cook added: “Our goal now is to pick up the pace.”

During the most recently completed quarter, Apple offset some of its iPhone declines with continued growth in its digital services business. The services segment, which includes products such as Apple Pay, Apple Care and Apple Music, generated a record $11.5 billion in revenue during the quarter, a 16% increase from a year ago. It is currently Apple’s second biggest revenue driver, ahead of the Mac and iPad.

Apple is looking to grow this segment even more: last month it held a splashy, celebrity-filled press event to unveil multiple new paid subscription services.

The growth in services helped push Apple’s overall revenue above Wall Street’s muted expectations. Apple also appeased investors by announcing plans to repurchase another $75 billion worth of shares and increasing its dividend.

Apple stock rose 5% in after-hours trading Tuesday following the earnings report.