Fix iOS context switch

Allow setting of context before calling for the list of contexts in iOS (Android already works).

Fixes Issue #2322