Appium force iOS to connect to a wifi network

Is there a way for Appium to have an iOS device connect to a certain wifi network? Or see if it’s connected to a certain wifi network, if not connect to a different one?