The reassurance that Apple won’t face legal risks over making the TikTok app available comes at a delicate time in its own negotiations with China.