Apple reports an almost 40 per cent fall in 2nd quarter earnings as global smartphone shipments slow