Revert "iOS 8 fix"

This reverts commit 524f777c4df25ca74358b936dbbad58bd1707475.
Upgrade iOS code for iOS 8 bug fix