Getty Images

Apple will do its part to help with the California housing crisis by donating $2.5 billion to state and other efforts. That comes against the backdrop of housing prices continuing to rise in parts of the state and a growing homeless population -- which Democratic presidential candidate Bernie Sanders says the company helped create.

Apple

The commitment will take two years to be fully utilized by the state and will be spread out to help develop new housing projects, fund first-time homebuyers and address issues with the homeless.

"Before the world knew the name Silicon Valley, and long before we carried technology in our pockets, Apple called this region home, and we feel a profound civic responsibility to ensure it remains a vibrant place where people can live, have a family and contribute to the community," said Tim Cook, Apple's CEO, in a statement Monday. "Affordable housing means stability and dignity, opportunity and pride. When these things fall out of reach for too many, we know the course we are on is unsustainable, and Apple is committed to being part of the solution."

Apple will commit $1 billion to a housing investment fund that will give the state and othes a line of credit to develop and build new, lower-cost housing for low- to moderate-income families. Another billion will help first-time homebuyers with financing and down payment assistance. The iPhone maker will also contribute some of its land in San Jose, worth $300 million. In addition, it will provide $150 million to fund long-term forgivable loans and grants for the Bay Area. The last $50 million will go to help the homeless in Silicon Valley.

Sen. Bernie Sanders, a Democrat from Vermont, responded Monday to Apple's pledge, calling it hypocritical.

"Apple's announcement that it is entering the real estate lending business is an effort to distract from the fact that it helped create California's housing crisis -- all while raking in $800 million of taxpayer subsidies and keeping a quarter trillion dollars of profit offshore in order to avoid paying billion of dollars in taxes," the Democratic president candidate said in a press release Monday. "We cannot rely on corporate tax evaders to solve California's housing crisis."

The Cupertino, California-based company has a history of tax problems. The US Senate investigated Apple in 2013 over its $103 billion held in offshore accounts. This past September, the company began a legal battle with the European Union over a $14 billion tax bill from 2016 it says "defies reality and common sense."

Other Silicon Valley tech companies have also chipped in to deal with the crisis. Facebook last week pledged $1 billion to help the region, where housing prices have skyrocketed. In June, Google donated $1 billion to help with the housing shortage in the Bay Area.

Originally published on Nov. 4.

Update, Nov. 5: Adds Sen. Sanders comment.