Revert "Revert "Repair broken iOS build--take 2""

This reverts commit 5fa4926a7f69e4dc02014bf1350af6a5f968ae9e.