Apple and Google are among those who joined the tech giant in its bid to strike down a law preventing companies from telling customers the government is seeking their data.