I've been looking at the potential to port certain AI2 apps already written for Android, over to IOS. The particular apps make use of sensors (particularly the Accelerometer and in another case Orientationsensor). I wrote a small AI2 app to do a comparison of Android and IOS sensor behavior, one running on an Android tablet, and the other on an iPhone. I provided screenshots of that below, including the code Blocks used that are identical on both. Caveat, I can't currently Build IOS apps, only Android apps, so to keep it fair, did the comparison in the AI Companion apps for each device (IOS currently using v2.64.5 build 1 which is the only one I can locate via AppStore although I saw that the current "iosbuildservertest." indicates using companion 2.6.9u; and for the Android I am using 2.7.2u which appears to be the latest per "code." interface.). So these test comparisons are using the companion, not built/installed apps. Any/all feedback is welcome, and thank you in advance.
RESULT:
- Initially both Companions serve well, and for the first 15-20 minutes both Android and IOS, the app operates as-expected, quickly showing/updating the sensor variables (actually it looks a little like the Android sensors are a tiny bit more sensitive).
- After about 20-30 minutes of running, both devices have noticeably heated up a little more than usual, but still the app in the Companion of the Android continues to run flawlessly. But on the IOS side the sensor become more "jumpy" rather than showing smoother flow of changes, until changes pretty much stop occurring to the point one can conjecture an app needing that dataflow from the sensors would likely malfunction.
- Two unknowns here for me are, first these apps are running in their Companions (not compiled/built/installs apps) as stated initially, and second is the IOS Companion version 2.64.5 from AppStore.
- As a more of an aside, the OrientationSensor on both devices continued to operate flawlessly, unlike the Accelerometer on the IOS which began to become unresponsive after 20-30 min run. And also noting the Spinner that is included in this app, is not related to the other sensors at all - but it did perform nicely in Dark theme (as relates to the IOS).
CONCLUSION:
- Either the Android sensors are just plain better than the IOS sensors (which appear to malfunction), or the Companion versions are the issue (and possibly compiled/built/installed apps would both work fine on both devices). And since the block code is identical in both cases, while it continues to run flawlessly on the Android past 20-30minutes, don't see that being a cause. But I felt the comparison results were were still worth noting between the Android and IOS running the app on their Companions. And of last note, possibly a "throttle" on the Accerometer code aspects could help the IOS version from limping along at the end ... in fact I actual then added a count throttle to slow down the number of times we're trying to do calculations from the Accelerometer output, but the same pattern occurs on the IOS: works nicely up front, but later slows down to a crawl or stops.
*** Screenshot of running app:**
*** Screenshots of AppInventor "Designer" views:**
*** Screenshot of AppInventor "Blocks" (same for both Android and IOS tests):**