Added separate threads for iOS too.

Added separate threads for the two methods for iOS too.