It’s been a crazy week! Appointments and events have been cutting into my afternoons all week, so I’ve barely had any time to work on #exist for #ios. I’m still struggling with a really annoying bug that’s affecting one user in the #applehealth #sleep integration version, so I still can’t release it to all our users. @josh is going to help me implement a fix because I’m all out of ideas.
#ios
May 2017
I’m quite stuck on #exist for #ios at the moment. I have one last bug in the #applehealth #sleep integration version that’s in beta, and I can’t figure out how to fix it. And with #customtracking I’m stuck trying to find a library to do something that @josh was able to find multiple libraries for on Android. Today Josh helped me explore a couple of library options and now I’m just trying to make one of those bend to my will so I don’t have to build it myself from scratch.
Finally got my latest build of #exist for #ios uploaded to #TestFlight yesterday after failing for four days. Had to use Application Loader instead of Xcode in the end, because Xcode just kept failing. #laterlog
Although I’m still annoyed by some of the UI changes to #itunesconnect (why can’t I see what version my testers last installed?!), I do like that once a beta build is approved by TestFlight reviewers it now goes straight out to my external testers without me doing anything. Very helpful since TestFlight reviewers tend to do their thing while I’m asleep!
April 2017
I’ve been trying to upload a new version of #exist for #ios to #TestFlight since yesterday but Apple’s servers keep throwing an error so I’m stuck waiting for that to be fixed.
In the meantime I’ve been working on email copy, screenshots, and a blog post ready for the launch of our #applehealth #sleep integration.
Working on the last few bug fixes in the #applehealth #sleep integration in #exist for #ios. Those last few stragglers are stopping me releasing to all our users, so I really want to get them sorted soon.
Just one more fix to make for #applehealth #sleep integration in #exist for #ios, then I think I can release it! Yay!
Yesterday I made some good progress on #customtracking in #exist for #ios. I’ve got custom tags showing up in the Timeline. Next up is making them look right on the Today tab. Then I’ll get started on the UI and backend code for submitting tags. #laterlog
Yesterday I spent the afternoon working on adding #customtracking to #exist for #ios. @josh helped me work out the basic steps to get the user’s custom tags showing up, but I got stuck on the layout and ran out of time to get it working.
I also finally made it to a #cocoaheads meetup last night. I’ve been meaning to go for months and something always stops me, so even though I got off at the wrong train station and had to walk an extra 25 minutes to get there, I made sure I did!
#exist #android #customtracking beta testing is going a little better today. Got some feedback from a few people in the group, and nudged some others to get it installed. Couple of small issues, but overall I think we’re not far off. Helped @belle make a start on it in the #ios app today also. She should have an easier time of it hopefully as I’ve already had to figure out how it’ll all work.
Some final bug fixes in #exist for #ios today. Part of my update that adds #applehealth #sleep syncing was to make the initial sync cover the past 30 days instead of the past 14. I found a timeout issue in that process, thanks to some good user feedback, and sorted that out today.
Submitted a new build using the new #TestFlight setup. Thankfully it didn’t take too long to figure out where they’d moved all my cheese to, and some parts of the process are more simple now (e.g. seems like they’ve removed the specific “notes for review” section, which I never used anyway). Feeling good about getting sleep out to all our users very soon!
Couple more bug fixes in #exist for #ios today. Hoping to get another beta version out before this week is over. Looking forward to starting #customtracking once the #applehealth #sleep integration is done.
Bug fixes in #exist for #ios today. One of the recent bug fixes I made for #applehealth #sleep wasn’t quite right, so I fixed that, and another reported by a beta tester from the latest version. Looking forward to getting this next version out to testers, as I think it’s getting quite close to release-ready!
Today I did a few improvements to the beta version of #exist for #ios: I added an option to force sync #applehealth data from the past 30 days in case it doesn’t stay up-to-date, made all Apple Health data sync 30 instead of 14 days when first set up, and added a message to tell users who only track time in bed or time asleep but not both that they should use a different sleep tracking app.
More bug fixing for #applehealth #sleep in #exist for #ios today. Trying to knuckle down and get the next update out soon.
March 2017
Ahhh I thought I fixed that crash in #exist for #ios yesterday but I didn’t. Should have known that if I couldn’t reproduce it, it probably wasn’t what I thought I’d fixed. Turns out, it was only affecting some of our UK users, because they just switched to daylight saving time last weekend and some naïve usage of date objects on my part created a crash in some cases. So I tracked that down and fixed it today with @josh’s help.
Got my first two bug reports for the #applehealth #sleep beta in #exist for #ios today. Thankfully both for the same issue, which I’ve already fixed.
Sad to see how bad everyone’s data is, though. The main reason we put off this integration is because Apple Health doesn’t enforce any kind of data standards on the apps syncing to it, so the data I can get out tends to be low-quality, inconsistent, or both. I was hoping I was worrying about this more than necessary, but so far I’ve seen exactly the kind of bad data I expected in most cases.
Finally released the first #applehealth #sleep beta in #exist for #iOS today!
Found a couple of small things I hadn’t done in #exist for #ios today, but background #healthkit updates are going well! Expecting to release the first #applehealth #sleep beta this week.
Seems like #exist for #ios is updating #healthkit data in the background fairly regularly now. Fingers crossed it stays that way. After a little more testing to make sure the updating works well I’ll send it out to beta testers for the first round of #applehealth #sleep testing.
Also worked a little on #larder for #ios this afternoon. It’s frustrating how slow I am when using #swift still.
Left #exist for #ios alone over the weekend to see how well my #healthkit background updating would work. Today I had a look at the logs and it looks like all my data is updating without me opening the app, but not as often as I’d like. A change I made to stop duplicate updates occurring seems to be stopping a lot of non-duplicate updates getting through, so I had to try a different approach to de-duping the updates. I also noticed the app is getting a lot of “Network connection lost” errors when trying to send requests. Not sure what that’s about yet, as I haven’t been able to reproduce those errors to debug them. Still, getting closer and closer to releasing the #applehealth #sleep update to beta testers!
Yesterday I tried using beginBackgroundTaskWithExpirationHandler to ask #ios to give my app more time to complete tasks in the background. This seems to have fixed the #exist for iOS bug @josh and I have been struggling with for a week now. Certain calls, usually when my app was in the background, were taking ages and eventually timing out during the handshake stage with the server. It seems like it was actually iOS killing the tasks, but I don’t know why it was taking so long to do so. I didn’t try this beginBackgroundTask method earlier because everywhere I’ve seen it mentioned it seems to be used for continuing tasks in the background that were started in the foreground, which isn’t what I’m doing, but it seems to have worked anyway! #laterlog
Spent a very frustrating afternoon with @belle trying to debug an esoteric timeout issue between her #ios app and the #exist server. For some reason, in certain conditions, all of her requests to the server hang for like 30 seconds, and then time out in the “ssl handshake” stage (verified on the server). I can’t find anyone else with this issue, and we tried a bunch of different things to fix it but were basically stabbing in the dark. To top it off, it’s not even consistent — requests made while the app is in the foreground do work, and occasionally the background ones do also. And browsers and the Android client don’t have issues. Just iOS. Argh! I’m out of ideas. Maybe if I wish hard enough it’ll magically fix itself…
Aaaargh #applehealth! I’ve had the majority of the #sleep integration in #exist for #ios done for days now, but I’ve been fighting with getting the background observers working. I can’t watch the logs run in realtime, because I’m testing for #healthkit waking up my app in the background and telling it to send new data to Exist, and it won’t do it every time I add new data, because it wants to save battery. So I’m stuck adding data and waiting an hour or so before grabbing the log file to see if anything happened.
Fixed a bug in #exist for #ios today that was causing the app to crash when users turned on location tracking for the first time. Also continued some refactoring of #healthkit code in an effort to get background observers working for #applehealth #sleep and other HealthKit data. The idea is that iOS will notify my app when the user syncs new data to Apple Health, rather than me checking for it regularly. Still trying to get that working for activity data, but it seems to be working well for sleep so far.
So the #applehealth #sleep integration in #exist for #ios is pretty much done! Apart from lots and lots of testing and probably fixing lots of bugs, of course.
Woo! Got #customtracking working in a hacky way in #exist #android. Solved some minor issues with that on the server side, and then verified all works as it should. The next step will be to actually make a nice UI for adding and tracking various custom habits and events, and at some point I’ll deploy the backend stuff to the live server so we can test it for real with some beta testers.
I also spent some time helping @belle figure out more #ios #healthkit sleep logic. Getting closer!
Making great strides today with #applehealth #sleep integration in #exist for #ios! Thanks to some help from @josh last night I got on the right track and today I figured out why I wasn’t adding up all the sleep data per day correctly. I fixed that, and also added some code to check what the longest period of “time in bed” is per day, so I can get bedtime and wake time from that record, in case there are multiple “time in bed” periods. I also added a check to make sure I only use data from one app per day, so if users record data from multiple apps for the same day I’ll just take the first app’s data and ignore the rest so they don’t get doubled-up data in Exist.
February 2017
First pass of the #exist #customtracking backend done today. Didn’t get time to make the custom Android client that can talk to it, ended up spending the evening helping @belle sort out some sleep logic for #healthkit stuff in #ios. Healthkit is like a dumb database returning low-level records, rather than giving a nice daily summary, so it’s much more akin to the crappier APIs I’ve had to integrate (cough-withings-cough) than the lovely ones like Fitbit’s. We’ll also have to implement custom de-duplication as healthkit won’t prevent multiple apps adding overlapping sleep records. Super fun times!
More work on #location fixes in #exist for #ios today. Really hanging out to get onto some performance improvements soon, thanks to inspiration from #playgroundscon, but I have to finish the #applehealth #sleep integration first. Always more to do…
Still slogging away at #HealthKit refactoring in #exist for #ios as well as adding sleep data from Apple Health. Got some help from @josh to help me figure out the best ways to make my HealthKit code as generic and simple as I can, and after implementing his suggestions I’ve probably cut about half the code involved in the Apple Health integration. I’m expecting lots of bugs to work through, but really happy about cleaning this up, as it’s definitely been the most complicated, messy code in the app.
Today I sent out the January edition of #themonthlyreview and did some admin for #hellocode. I also did a little more work on my #applehealth sleep branch in #exist for #ios, but I’m trying to simplify all my HealthKit code at the same time as adding sleep data, so there’s quite a bit to do.