Apple's (AAPL 0.51%) iPhone sales have been going only one way in recent quarters: down. Cupertino has been seeing consistent declines in the sales of its flagship product thanks to the overall weakness in the smartphone industry, as well as company-specific shortcomings that have given rivals the space to grow.

Apple's iPhone problem was on full display last quarter: Revenue from sales of its smartphone products fell 12% annually, while every other segment recorded impressive growth. Given that Apple generates half of its total revenue from selling iPhones, this is a problem that the company needs to fix. The good news: The company has taken a couple of steps that will go a long way in getting its iPhone sales back on track.

Hand drawing stock chart pointing upward.

Image Source: Getty Images

Apple seems to have found a cheaper production base

Apple has been emblematic of companies affected by the U.S.-China trade war, as it assembles its iPhones in the Asian nation. But the Trump administration's latest round of tariff hikes could ensure that Chinese-made iPhone models get costlier once the 15% import duty starts being levied in December.

But Apple contractor Foxconn has found a way to help Apple escape that challenge by ramping up output in India, as Bloomberg reported. Foxconn set up shop in India in 2015 and currently has a couple of assembly plants there. It now plans to expand the capacities of those plants, while opening two more facilities to boost output.

The contractor is already employing 15,000 employees at its first India plant in a special economic zone in the southern part of the country. The Bloomberg report says that 90% of the employees at this plant are women, and Foxconn is paying them just $130 a month. This translates into just over $4 a day, and is around a third of the average factory wage in China.

Foxconn's second plant, a few hours away from the first, currently employs 12,000 people. This plant is partially automated. Foxconn had already been making changes to its factories to manufacture Apple's latest iPhone models in India, which were earlier used to make older models. The India-made iPhone XS and XR were supposed to go on sale in India last month.

All in all, Foxconn already has a base to for its production shift. It can get low-cost labor and the assistance of a favorable government desperate to boost its flagging economy and control rising unemployment. So don't be surprised to see Apple's contract manufacturer start making more iPhones in India, meant for both the local and export markets.

And once Apple starts manufacturing in India, it will be able to escape the tariffs that the Trump administration plans to bring into effect later this year. This will save management in Cupertino from making the tough decision between absorbing higher costs and taking a margin hit or passing on the same to customers by hiking prices and risking a sales hit.

Capturing a bigger piece of India's smartphone market

Apple has also received a shot in the arm from the Indian government, as it can finally start selling its iPhones directly in the country. In the past, a web of complex regulations meant that Apple was forced to rely on third-party distributors and other partners, who added to the price of the devices, which were already costly in India thanks to import duties.

Now that the Indian government has eased restrictions on sourcing of local components, Apple is going to step on the gas by spending a ton of money on retailing infrastructure in India. Government sources have reportedly told an Indian daily that Apple is planning an investment of INR 1,000 crore (approximately $140 million at the current exchange rate) to set up an online retailing platform and retail stores across major Indian metropolitan areas.

Once Apple deploys its own sales infrastructure in India, it can sell its devices at a lower price since there won't be middlemen demanding a share of the pie. At the same time, as Apple ramps up production of Indian-made iPhones, it won't have to pay the 20% import duties that are levied on imported smartphones.

This will help Apple become more competitive in that market from a pricing perspective. Thanks to the reasons already mentioned, its devices have historically been priced at a premium in India compared to their prices in the U.S. This has given rivals the opportunity to undercut the iPhone, relegating Apple to the third position in the premium smartphone segment in India, where offerings from Samsung and OnePlus hold sway.

Given that India is one of the few bright spots in the smartphone industry and is defying the global slowdown, Apple is making the right moves by moving deeper into this market. India supplied just $2 billion of Apple's revenue last year, but the company's latest moves could lead to strong growth of that number in the foreseeable future.