Stuart Breckenridge

Fitness Bugs in watchOS 2 and iOS 9

I’ve been using watchOS 2 and the iOS 9 betas for app development, but with a marathon coming up I thought I’d see what state the fitness and activities apps were in. Below are the issue I’ve come across:

  • Activities glance UI is distorted. (Radar: 21582510)
  • Activate on wrist raise during workouts is slow. (Radar: 21582523)
  • Watch OS 2 and iOS 9 do not connect to external heart rate monitors. (Radar: 21582562, 21582581).

Another important note for those considering the update to the watchOS 2 beta: there is no known downgrade path back to watchOS 1.0.1. Apple hasn’t announced an equivalent to the iOS DFU mode. If you upgrade you need to stick with watchOS 2 for the entire beta cycle.


— Supported by —


Optional vs Empty Table Views in Swift

A recent post on Natasha The Robot looks at different (but equally valid) approaches for handling the display of data when table views are empty or optional.

I prefer a variation on the non-optional approach using the didSet observer.

// Tableview Data Source
var dataArray = [String]() {
        didSet {
            dataTable.reloadData()
        }
    }

didSet is not called during initialisation of the array, so using the observer ensures that the tableView isn’t reloaded until a new value is set.

In viewDidLoad, I hide the tableView until data is available:

override func viewDidLoad() {
        super.viewDidLoad()
    
        // Hide TableView 
        dataTable.alpha = 0.0
        
        // Load TableView
        loadTableViewData()
    }

loadTableViewData parses JSON in the background and passes an array back in the completion handler (which is called on the main thread)1:

private func loadTableViewData()
    {
        // Show indicator while loading.
        UIApplication.sharedApplication().networkActivityIndicatorVisible = true
        
        let parser = JSONParser()
        parser.parseJSON { (list) -> Void in
            // Hide indicator, set dataArray to list, show tableView
            UIApplication.sharedApplication().networkActivityIndicatorVisible = false
            
            self.dataArray = list
            
            UIView.animateWithDuration(0.2, animations: { () -> Void in
                self.dataTable.alpha = 1.0
            })
        }
    }

In the UITableViewDataSource functions, there is no need to consider optionals:

extension ViewController: UITableViewDataSource
{
    func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return dataArray.count
    }
    
    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCellWithIdentifier("Cell") as UITableViewCell!
        
        cell.textLabel?.text = dataArray[indexPath.row]
        
        return cell
    }
}

I’ve uploaded a sample project to GitHub which contains some sample JSON.

  1. I’m using networkActivityIndicatorVisible as a placeholder to show parse progress. ↩︎


New Website

I’ve been on Wordpress, SquareSpace, Tumblr, and Ghost. All of them were good in their own way, but didn’t give me the level of control I wanted. So I’m giving Jekyll a try.

Content from my old website is still in the process of being transferred1. You’ll may also see some broken links for a while as Amazon’s Route53 has really screwed up the DNS records for my old domain.

A bit of background on the design:

  • The theme is Minimal Mistakes.
  • Typography is provided by Cloud.Typography. Currently a combination of Whitney and Ideal Sans, though I’ve been known to chop and change.
  • Hosted on Amazon S3 and distributed via Cloudfront as the CDN.
  • RSS is provided by FeedPress.
  1. I’ve had to export from SquareSpace to Wordpress, and then Wordpress to Jekyll. ↩︎


Destiny: The Taken King director defends £40 expansion price tag

Update: Bungie has reversed course and will now sell The Taken King as separate DLC with access to all the exclusive content, without the need to repurchase all content.

“Bungie has defended the full-fat £40 price tag of Destiny’s upcoming major expansion The Taken King, as well as the fact that fans will have to rebuy the base game and its existing two add-ons to access exclusive content in The Taken King’s Collector’s Edition.”

Putting DLC behind a paywall is fair game, but putting exclusive DLC behind a paywall that requires you to rebuy everything you’ve already bought is criminal.

The Q&A in the article is astounding: I’ve never seen a Bungie employee give such poor, arrogant, and dismissive responses.

Eurogamer: Well, yeah. I would rather do that - pay a few pounds or dollars or whatever - than spend money on things I already own.

Luke Smith: [Laughs] Well, we have nothing more to talk about regarding your opportunity to spend extra money in Destiny, other than The Taken King and the three versions we’ve announced.


Issues Persist in Halo: The Master Chief Collection

As a project, Halo: The Master Chief Collection is enormous. It includes all four Master Chief Halo games, plus Halo 3:ODST as a downloadable extra, over 100 multiplayer maps, and was developed by no less than six development studios. A package of this size inevitably means that there will be bugs…

So many bugs that it has been patch happy since release (1, 2, 3, 4, 5, 6). I only bought my Xbox One last week so I missed all the previous patches and only received the latest patch during the install of the game. That being said, I’m still seeing some issues with the game.

  • In single-player on Halo 4 when using Save & Quit it has saved the game at the previous checkpoint instead of the current checkpoint, on several occasions.

  • Multiplayer matchmaking can take upwards of 10 minutes, even on the popular playlists.1

  • In Team Slayer I’ve joined several matches where there has only been one team.

There’s still some work to be done.

  1. This is likely a combination of matchmaking issues and the population of players online at the time of playing. ↩︎