Adding isAvailable function to the iOS code