BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

iOS app crashes (on push data?)

I’m running Blynk 2.5.6 (latest) on iOS 9.3.5 on an iPhone 4s. A second or two after the app starts and my Blynk layout loads, it crashes / quits. I suspect it may coincide with a Blynk.virtualWrite() call, because everything seems okay for a second or two before the crash (maybe when my “timer” kicks in with blynkPublish()). My phone is not jailbroken (as in other threads). My app layout uses a degree character in the naming of a gauge widget, and it has a history graph widget.

You can see (most of) my code here: http://pastebin.com/RgTdYcQW
Not shown are the classes backing my sensor and blinkenlights.
Everything seems OK on the Android version of the Blynk app running on Android Kit Kat.

I’d be happy to PM you my blynk email, but I’m pretty sure it’s the same as I use here on the forums. Is there any way I can pull some debug out of the blynk app or adjust my code to avoid this problem (if it’s a known issue)?

Thank you.

Edit: My first pastebin leaked my auth code, so I went in to reset it. The iOS app said “couldn’t get auth code” but it let me push the refresh button. After refresh, the app still crashed when looking at the widget layout for about 5 seconds. Before the widget layout loaded I made it the longest time ever in the blynk app – about 20 seconds (enough for me to refresh the token and poke around). This confirms that the virtualWrite is unrelated. I’ve uninstlaled and re-installed. Sometimes I can push the QR code button fast enough to open the camera, but the app still crashes after fewer than 10 seconds.

Here’s what seems to be crashing it:

String tc = String(tmp2color(tmp.tempF));
Blynk.setProperty(gauge, "color", tc.c_str());

I think setProperty is not yet implemented on IOS App.

Well, I have seen the gauge widget change color briefly sometimes before the crash. In any case, the app shouldn’t crash for non-implemented properties, right? This means I can’t use both my iPhone and Android device to control my things unless they have different code on them, which is inconvenient.

In general I agree with you, but it’s still two different platforms running one solution and it’s software made by man and we are not infallible too, so there are bound to be bugs here and there.