iOS app thoughts

my iPhone 6S (iOS 10.0.2) will lockup when trying to connect with https://emoncms.org. But all works A-OK with a local emonPi. I am using emoncms app version 1.0 (5).

EDIT: also the Save button (upper right) never appears when trying to connect with https://emoncms.org

EDIT2: if I don’t use the Scan QR Code and hand type the emoncms URL and API read key, all works A-OK.

Pretty sure I’ve fixed this. I’ll release a new build tonight.

Hmm. Are you entering both an address and an API key? It won’t enable until you’ve entered both.

If I use the QR code from emoncms.org then the emoncms app will lock up.

If I use the URL and API (manual entry) from emoncms.org then all works OK.

Ah I see. At what point does it lock up?

found another not to nice behaviour in a apps graph (finally found how to reproduce it)
when you use the usual zoom option via pinching etc the graph zooms in but stays visible. But you can also double tap on the graph and it zooms in … but out of the screen. Even when you zoom out it doesn’t refit inside the visible frame, you need to scroll up and down
Hope the video attached is accepted and clear

https://community.openenergymonitor.org:/uploads/default/original/2X/3/31efa7ffcf2bee843971f5bc9921a0ff9f589d28.mp4

Nice thanks for finding these things! I’m stopping zoom from working at all.

immediately after it sees the QR code. The camera turns off, there is no “Save” and then I am in the Settings. Clicking Feed or Apps does nothing.

OK good to know. I’ll have a look. Thanks!

Another thing @glyn.hudson - can you make sure that your iPhone is set to send crash reports please? You can do it from Settings → Privacy → Diagnostics & Usage, and then make sure the “Share with app developers” is turned on. That way I get the crash reports. I see you have some crashes, but I can’t access them, which I assume is because you have that turned off.

1 Like

Press Scan QR Code:

 

Show camera the QR:

 

The Accounts Details page appears for a split second. And then quickly disappears without clicking Save.

 

Then the Settings page appears. Clicking Feeds or Apps does nothing except change the blue highlight at the bottom of the screen.

Thanks @Jon! Found, and fixed. Will be in the next build (not the one I just released - sorry!).

it works!!

FYI - I had to “quit” the app (double click Home button and then swipe up on the emoncms app) to get the 1.0(6) to work.

Ok, I’ve turned on sharing the logs.

Here is the fist part of the latest crash log (with latest version (6) from test flight):

{"bug_type":"109","os_version":"iPhone OS 10.0.2 (14A456)","build_version":"6","timestamp":"2016-10-21 16:13:32.02 +0100","is_beta":true,"app_name":"EmonCMSiOS","app_cohort":"2|date=1477062000000&sf=143444%2C29%20ab%3AWJ6jMoo2&tid=267a98bff1e0a5015752aaab33ec34d5fc494e0d1129728671d541e25020d6bf&ttype=e","bundleID":"com.swipestack.emoncms","incident_id":"65081794-A20B-4BDE-8170-3952AF46C36B","name":"EmonCMSiOS","is_first_party":false,"app_version":"1.0","share_with_app_devs":false,"slice_uuid":"0a1399e3-e68e-397c-a685-abb947068003","adam_id":1155940049}
Incident Identifier: 65081794-A20B-4BDE-8170-3952AF46C36B
Beta Identifier:     C22B9A2D-44C6-4681-9760-22256EA19ACA
Hardware Model:      iPhone5,4
Process:             EmonCMSiOS [742]
Path:                /private/var/containers/Bundle/Application/F493952E-64B3-4550-A0F8-3A7B7D018703/EmonCMSiOS.app/EmonCMSiOS
Identifier:          com.swipestack.emoncms
Version:             6 (1.0)
Beta:                YES
Code Type:           ARM (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.swipestack.emoncms [735]


Date/Time:           2016-10-21 16:13:31.6698 +0100
Launch Time:         2016-10-21 16:13:23.0000 +0100
OS Version:          iPhone OS 10.0.2 (14A456)
Report Version:      104

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000000e7ffdefe
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread:  0

Filtered syslog:
None found

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   EmonCMSiOS                    	0x000d8af8 0x71000 + 424696
1   EmonCMSiOS                    	0x000b73dc 0x71000 + 287708
2   EmonCMSiOS                    	0x000b70a8 0x71000 + 286888
3   EmonCMSiOS                    	0x000b712c 0x71000 + 287020
4   RxSwift                       	0x00c5723c 0xbc7000 + 590396
5   RxSwift                       	0x00c5657c 0xbc7000 + 587132
6   RxSwift                       	0x00c56a18 0xbc7000 + 588312
7   RxSwift                       	0x00c58274 0xbc7000 + 594548
8   RxSwift                       	0x00c56308 0xbc7000 + 586504
9   RxSwift                       	0x00c569dc 0xbc7000 + 588252
10  RxSwift                       	0x00bf67f8 0xbc7000 + 194552
11  RxSwift                       	0x00bf6c28 0xbc7000 + 195624
12  RxSwift                       	0x00bf6f84 0xbc7000 + 196484
13  RxSwift                       	0x00bf7070 0xbc7000 + 196720
14  RxSwift                       	0x00c58274 0xbc7000 + 594548
15  RxSwift                       	0x00bf6e08 0xbc7000 + 196104
16  RxSwift                       	0x00bf7034 0xbc7000 + 196660
17  RxSwift                       	0x00c1f9b0 0xbc7000 + 362928
18  RxSwift                       	0x00c1da9c 0xbc7000 + 354972
19  RxSwift                       	0x00c1c0ac 0xbc7000 + 348332
20  RxSwift                       	0x00c1c1b4 0xbc7000 + 348596
21  RxSwift                       	0x00c0a208 0xbc7000 + 274952
22  RxSwift                       	0x00c0a440 0xbc7000 + 275520
23  RxSwift                       	0x00c12b04 0xbc7000 + 310020
24  RxSwift                       	0x00c12c40 0xbc7000 + 310336
25  RxSwift                       	0x00bd1518 0xbc7000 + 42264
26  RxSwift                       	0x00bd0e48 0xbc7000 + 40520
27  RxSwift                       	0x00bd567c 0xbc7000 + 59004
28  RxSwift                       	0x00bdbdd4 0xbc7000 + 85460
29  RxSwift                       	0x00bdb558 0xbc7000 + 83288
30  RxSwift                       	0x00c65004 0xbc7000 + 647172
31  EmonCMSiOS                    	0x000903a4 0x71000 + 127908
32  EmonCMSiOS                    	0x000903e4 0x71000 + 127972
33  UIKit                         	0x21adefce 0x21ab8000 + 159694
34  UIKit                         	0x21aded8c 0x21ab8000 + 159116
35  UIKit                         	0x21c65b5c 0x21ab8000 + 1760092
36  UIKit                         	0x21b7e106 0x21ab8000 + 811270
37  UIKit                         	0x21b7ddae 0x21ab8000 + 810414
38  UIKit                         	0x21b7dd28 0x21ab8000 + 810280
39  UIKit                         	0x21ac4864 0x21ab8000 + 51300
40  QuartzCore                    	0x1f8f03d8 0x1f7fa000 + 1008600
41  QuartzCore                    	0x1f8e45ee 0x1f7fa000 + 959982
42  QuartzCore                    	0x1f8e447e 0x1f7fa000 + 959614
43  QuartzCore                    	0x1f874f6a 0x1f7fa000 + 503658
44  QuartzCore                    	0x1f893534 0x1f7fa000 + 628020
45  UIKit                         	0x21aba91e 0x21ab8000 + 10526
46  CoreFoundation                	0x1ca3d484 0x1c980000 + 775300
47  CoreFoundation                	0x1ca3b700 0x1c980000 + 767744
48  CoreFoundation                	0x1ca3bb16 0x1c980000 + 768790
49  CoreFoundation                	0x1c98b072 0x1c980000 + 45170
50  CoreFoundation                	0x1c98ae80 0x1c980000 + 44672
51  GraphicsServices              	0x1e133bfc 0x1e12a000 + 39932
52  UIKit                         	0x21b32ace 0x21ab8000 + 502478
53  UIKit                         	0x21b2d200 0x21ab8000 + 479744
54  EmonCMSiOS                    	0x0007997c 0x71000 + 35196
55  libdyld.dylib                 	0x1c15650a 0x1c153000 + 13578

Thread 1:
0   libsystem_kernel.dylib        	0x1c22c744 0x1c215000 + 96068
1   libsystem_pthread.dylib       	0x1c2dd80c 0x1c2dc000 + 6156
2   libsystem_pthread.dylib       	0x1c2dd49c 0x1c2dc000 + 5276

Thanks Glyn! I’ll take a look. Typical that you’re the only one having a crash so far! But that’s good to uncover all the bugs!

And fixed. Build going out shortly.

It was because the numbers used to represent the timestamps going into the emoncms API for the feed data endpoint was too big to fit into a 32-bit Int. And that only reared it’s ugly head on the iPhone 5C because that’s 32-bit. On 64-bit architectures, a normal Int is 64-bit.

See, this is why it’s great you got the iPhone 5C Glyn! I wouldn’t have found that!

1 Like

Thing is that Apple is now pushing hard to get the apps native 64bit only and drop the 32 bit … why hell did they allow these older devices being 32 bit to up to ios10 then ?
Think I miss the logic here .
But nice you figured it out.
Upped to ß7 and will fool around with it tomorrow.
Trying also to imagine what to do with the widget ? Not sure to what point you can program it but maybe somehow make it configurable so we can get some set of values in there ? Maybe depending on available size allow the 2 numbers from each app choosen to show there ? And link it direct to that specific app in the application ?

2 cents

edit with extra idea

maybe also make it so that once in an app (graphs, not the one of the feed) make it possible to swipe to the next/previous graph of the next app … less going back and forth …and if possible use pre fetch of the apps next/previous to make it fluent ? We’re not always under 4g coverage …

edit 2 (long term idea)

again I … in settings used logout … there is no confirmation and out you are. No big deal as the qs scan is quick and easy but … yor apps configrations are gone … maybe set

  1. a confirmation box metioning the apps will be lost
  2. option to ‘export’ apps settings (icloud ?) in case so when you relog you can reload the apps config ?

I like this idea (above).

One other thing I’d like to see is to be able to log into two different servers. My local emonpi on my local network (via http) AND the emoncms.org server (via https).

Yah, good fix. Awkward little bug.

Latest version is working great on 5c :slight_smile:

other issue that is not really an issue but still

if you want to send a feedback it uses the default mail app but I use another one (not to mention airmail)
In my case I can’t use the build in feedback as there are no accounts setup in Mail. Does the api allow to call a third party mail application ?

edit request

  • in vertical mode the graphs from app is +/- 12 hours which is fine, possible to set in horizontal mode +/- 24 h view ?

  • maybe use the setting that the iPhone doesn’t go to sleep when using the app, some might like to use it as a monitor. Now it fades out and iPhones locks after the period set.

What are your thoughts on the colour scheme? Did you choose a white background since this is standard for iOS apps? Do Apple have guidelines on this (similar to Google Material design guidelines)

As you have probably seen the background for Emoncms MyElectric and the Android app is black / grey. Do you think a black / grey background would look out of place as the background for the iOS app? If not could I vote for grey to be used? I’m not an iOS developer and have no experience of user Apple products, therefore, I’m probably not the best to judge, however, IMHO it would be nice to have a relatively consistent colour scheme between Emoncms-web, Android and iOS apps.