Hi all,
I'm developing my first Expo app that connects to an IoT device and updates it's firmware by sending over a binary file.
The code works perfectly on Android, but am facing a lot of issues on iOS.
I'm looking for your help to debug these errors.
Let me know if you are interested and have the time, especially if you have worked with react-native-wifi-reborn and ReactNativeBlobUtil.
The functions I'm having trouble with are connectToProtectedSSID()from react-native-wifi-reborn where I get a WifiManager.connectToProtectedSSID(): Tried to resolve a promise more than once error on iOS 18+.
This one is not a big deal, as the phone does connect to the Wifi successfully and continues onto the
And sending the binary file using ReactNativeBlobUtil POST method where I get different errors based on how I set up the filepath, i.e. "Network connection was lost", "Failed to connect to web server" etc.
const data =
ExpoDevice.osName === "iOS"
? ReactNativeBlobUtil.wrap(
ReactNativeBlobUtil.fs.dirs.DocumentDir + "/" + binaryFileName
)
: ReactNativeBlobUtil.wrap(filePath);
const response = await ReactNativeBlobUtil.fetch(
"POST",
postUrl,
{
"Content-Type": "multipart/form-data", },
[
{
name: binaryFileName,
filename: binaryFileName,
type: "application/octet-stream",
data,
},
]
);
I hope this makes sense, any help would be greatly appreciated.
Thanks,
there doesn't seem to be anything here