|You want your application to perform a system-level change of network connection? I am not an Apple developer but as far as I know Apple leaves very little space for open developers to create these applications.
Following are a few threads where you can see how to detect the network changes, but how to apply these changes would be difficult.
How to check for an active Internet connection on iOS or OSX? - Stack Overflow[^]
c# - A Method with 2 Kind of Return Type - Stack Overflow[^]
Finally, if you just want to connect to the Raspberry Pi, why don't you connect it to the same network? Subnetting may help in this matter.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~