Apple and International Business Machines will work together to create business software for iPhone and iPad users, setting aside a three-decade-old rivalry to cater to an increasingly mobile workforce. IBM’s staff will sell Apple devices to its business customers, and the two companies will work together to develop applications tailored to work with IBM’s data analytics and cloud services, the companies said Tuesday. Apple also will offer customer-service support for the apps. The partnership helps Apple pursue a bigger slice of the market for corporate users of smartphones and tablets. Working with its erstwhile foe also may help IBM chase other technology giants — including Apple — that have done a better job seizing on the mobile-computing boom.