Apple and Swedish telecommunication company Ericsson have entered into an agreement that ends all litigation between the two tech firms and will see them collaborate on future technologies such as 5G development, video network traffic management, and wireless networks.

The companies' seven-year, worldwide patent cross-licensing agreement will also see Apple pay a lump-sum to Ericsson, as well as a fraction of its iPhone and iPad profit in royalties. It's unclear exactly how much money Ericsson will make from the deal, but given the number of devices Apple sells, it's likely to be an enormous sum.

"We are pleased with this new agreement with Apple, which clears the way for both companies to continue to focus on bringing new technology to the global market, and opens up for more joint business opportunities in the future," Kasim Alfalahi, chief intellectual property officer at Ericsson, said in a statement

Back in February, Ericsson sued Apple in several different jurisdictions for patent infringement. According to the Swedish company, Apple has been violating 41 patents over the past few years with its iPhone and iPad, particularly ones related to GMS, UMTS, and LTE technologies, reports TechCrunch. Ericsson went so far as to try to get the US-based International Trade Commission to ban the sale of iPhones and iPads.

The agreement means Ericsson is dropping all its lawsuits around the world, including those in Germany, the UK, and the Netherlands. The company holds over 35,000 patents related to wireless technologies and it has licensing agreements with many phone manufacturers.

News of the agreement caused Ericsson shares to rise 5.4 percent while Apple's fell 2.7 percent.