Taiwan’s Foxconn posted a weaker than expected rise in quarterly profit amid warning signs from key customer Apple Inc and its global suppliers that demand for iPhones could be softening.