What is a JSON feed? Learn more

JSON Feed Viewer

Browse through the showcased feeds, or enter a feed URL below.

Now supporting RSS and Atom feeds thanks to Andrew Chilton's feed2json.org service

CURRENT FEED

Stuart Breckenridge

Made with ones and zeros.

A feed by Stuart Breckenridge

JSON


How Microsoft Has Become the Surprise Innovator in PCs

Permalink - Posted on 2017-07-27 05:25

Farhad Manjoo’s article, How Microsoft Has Become the Surprise Innovator in PCs, has some fundamental flaws. He writes:

The hybrid Surface Pro — the inheritor of that first Surface’s vision, the latest version of which was released in May — hasn’t just become a moneymaker for the company. It was also the clear inspiration for the Apple iPad Pro, which supports a pen and keyboard but still feels less like a full-fledged laptop than Surface does.

Why would you compare the iPad Pro to how much it feels like full-fledged laptop? If you want a full-fledged laptop then get a full-fledged laptop! And while you’re at it, define full-fledged. Does a full-fledged laptop need to have an Ethernet port, a Display Port, and some USB connectivity? If so, is a MacBook Pro with USB-C only connections not a full-fledged laptop?

I have an iPad Pro and a MacBook Pro and I don’t ever feel the need to define my iPad Pro in terms of its laptopyness. Similarly, I don’t compare a MacBook Pro to either an iMac or Mac Pro.

Farhad continues:

And in the spring, Microsoft showed off Surface Laptop, which sounds humdrum enough; in shape and purpose, it isn’t much different from the MacBook Air, Apple’s pioneering thin and light laptop. But Microsoft’s machine has a better screen than the Air, and, more important, a future. People loved the Air, but Apple doesn’t appear to want to upgrade it, so Microsoft stepped in to perfect Apple’s baby.

I’d argue that the Surface Laptop’s competitor is the MacBook, not the MacBook Air. The MacBook has a slightly smaller display but a higher PPI, USB 3.1, and is significantly lighter. That said, the MacBook doesn’t have a multi-touch display and the integrated GPU isn’t as good the one in the Surface Laptop.

Also of note: the article makes no mention of other PC makers. Is the implication that Asus, Lenovo, HP, et al., are simply not innovating at all?


The Drag and Drop API Is Simplicity at Its Best

Permalink - Posted on 2017-07-26 15:28

Sometimes an API comes out of nowhere and astounds you with its power and simplicity. I’ve just had that experience with the new drag and drop API in iOS 11. In my FFI List app, with around 20 lines of code, I’ve been able to implement functionality that allows users to drag an FFI from the app into any other app that supports text drops.

The first step is specifying a drag delegate for the table view:

savedFFITableView.dragDelegate = self

The second step is implementing the UITableViewDragDelegate:

func tableView(_ tableView: UITableView, itemsForBeginning session: UIDragSession, at indexPath: IndexPath) -> [UIDragItem] {
    return dragItems(for: indexPath)
}

The final step, similar to Apple’s sample code, is to create the drag item(s):

func dragItems(for indexPath: IndexPath) -> [UIDragItem] {
    let item = CDStack.shared.savedFetchedResultsController.object(at: indexPath) as! FFISavedEntity
    var validity:String {
        if item.valid == "false" {
            return "This FFI is currently not on the GIIN list."
        } else {
            return "This FFI is currently on the GIIN list."
        }
    }
    let string = "Name: \(item.name)\nGIIN: \(item.giin)\n\(validity)".data(using: .utf8)
    
    let itemProvider = NSItemProvider()
    itemProvider.registerDataRepresentation(forTypeIdentifier: kUTTypePlainText as String, visibility: .all) { completion in
        completion(string, nil)
        return nil
    }
    
    return [UIDragItem(itemProvider: itemProvider)]
}

With those three short snippets this is the result:

What I want to do — and what I haven’t worked out yet — is dragging from the search table view on to the saved tab in order to save FFIs. It’ll take a bit more work, but I’m sure it’s doable.


Control Center States in iOS 11

Permalink - Posted on 2017-07-25 14:53

Ryan Jones (via Twitter):

Absolutely nails the difficulties in understanding the current Control Center UI.


The End of Microsoft Paint

Permalink - Posted on 2017-07-24 14:17, modified on 2017-07-25 13:54

Zoe Klienman:

Microsoft’s graphics program Paint has been included in a list of Windows 10 features that will be either removed or no longer developed.

Paint has been part of the Windows operating system since its release in 1985 and is known for its simplicity and basic artistic results.

I was never a frequent user of Paint other than for cropping1 or resizing screenshots. However, what has stood out over the last few years is the artwork from Jim’ll Paint It. It continually cropped up on my Facebook feed and, in my opinion, gave Paint a hilarious new lease of life (for a short while).2

Update (2017-07-24): Paint will not be retired. It’ll just be moved to the Windows Store.

  1. Before the Snipping Tool arrived. ↩︎

  2. Check out: Roger Moore Bond Villain Reunion and Kebabba the Hutt ↩︎


Subscription Pricing

Permalink - Posted on 2017-07-21 15:31, modified on 2017-07-22 11:23

Subscription pricing is a contentious issue when it comes to software. Two great articles caught my attention over the last few days.

Michael Tsai:

It’s certainly true that people are wary of subscriptions. But I wonder how much of the recent backlash is due to the subscription model itself and how much is due to the fact that, in practice, transitions to subscriptions have effectively been large price increases.

Nick Heer:

While Tsai points out that subscriptions have increased the price of software for their typical lifespan, let’s not forget that some people are comfortable using an older version of software for longer.

I agree with both of these points of view. However, I also believe that people are wary of subscriptions because they don’t know what will happen at the end of their subscription period. Based on my subscriptions, if I stop paying at the end of the subscription period or otherwise cancel:

  • Creative Cloud: I’d lose access to Photoshop and Lightroom, making the apps useless
  • Office 365: I’d lose access to the Office Suite, making the apps useless
  • TextExpander: Snippets would stop expanding, making the app useless
  • 1Password: My account would be frozen but existing items would be usable
  • WebStorm: I’d lose access to future updates, but I’d have a perpetual license for the latest version of the software as at the end of my subscription

Of all those, I think WebStorm provides a reasonable middle ground in a subscription model: when you cancel you’ll have a perpetual license to use the latest version of the software as at the end of your subscription. It’s the most equitable solution for consumer and developer, and, to Nick’s point, lets people use the software version that they are happy with, while not paying for future releases that mean nothing to them.


App Store Receipt Validation with Node and Express

Permalink - Posted on 2017-07-21 03:01, modified on 2017-07-22 11:23

I just released my first Node package: itunes-validation. The package provides functionality to validate app receipts with the App Store, in either sandbox or production scenarios. Here’s an example of how to use the package:

$ git clone https://github.com/stuartbreckenridge/itunes-validation.git
$ cd itunes-validation
$ npm install
$ npm start

Once the app is running, two endpoints are available with the following query parameters:

  • GET /0.1/sandbox (for sandbox receipt validation)
  • GET /0.1/production (for production receipt validation)
Parameter Required Description
receipt Yes Base 64 encoded receipt string.
secret No Only used for receipts that contain auto-renewable subscriptions. Your app’s shared secret (a hexadecimal string).
exclude No Only used for iOS7 style app receipts that contain auto-renewable or non-renewing subscriptions. If value is true, response includes only the latest renewal transaction for any subscriptions.

If you are testing with the sandbox, then the below sample code should provide some pointers.1

// Struct which represents receipt data returned by Apple.
struct Receipt: Decodable {
    var receipt: [String:String]
    var status: Int
}

// Function to validate receipt
func obfuscatedValidationMethod() {
    let receiptData = NSData(contentsOf: Bundle.main.appStoreReceiptURL!) // get receipt data
    let base64Receipt = receiptData?.base64EncodedString(options: .endLineWithLineFeed) // Convert to base 64

    var valUrl = URLComponents(string: "http://localhost:8443/0.1/sandbox") // create URL
    let queryItems = [URLQueryItem(name: "receipt", value: base64Receipt)] // create query
    valUrl?.queryItems = queryItems // add query items to URL
    let request = URLRequest(url: valUrl!.url!) // create URL request with URL
    
    let session = URLSession.shared // create URLSession
    /* Create task */
    let task = session.dataTask(with: request) { (data, response, error) in
        guard let responseData = data else {
            return 
        }
        let decoder = JSONDecoder()
        do {
            let decodedReceipt = try decoder.decode(Receipt.self, from: responseData)
            if decodedReceipt.status == 1 {
                // Do something with invalid receipt.
            }
        } catch {
            // Handle error.
        }
    }

    task.resume()
}

Links:

  1. Swift 4 code. For brevity, I also assume there is receipt data(!). ↩︎


1Password for iOS Now Auto-Copies One-Time Passwords

Permalink - Posted on 2017-07-18 04:44, modified on 2017-07-22 11:23

1Password is an app I cannot live without. It’s the first app I install on a new iOS or macOS device. However, a long bugbear has always been the way the app handles one-time passwords:

  • you’d be on a login page;
  • you’d open 1Password to get the username and password;
  • the username and password would be inserted;
  • then a one-time password page would be presented;
  • you’d go back into 1Password to copy the one-time password; and,
  • then you’d paste the one-time password

It was a laborious process, but, thankfully, that’s no longer the case. In v6.8, released yesterday, a new feature was added:

One-time passwords now copy themselves to the clipboard automatically whenever you fill an item that has a one-time password.

It’s such a welcome feature. 👍🏻


Apple Previews New Emoji

Permalink - Posted on 2017-07-17 22:36, modified on 2017-07-22 11:23

In celebration of World Emoji Day Apple has posted a nice preview of emoji coming later this year with iOS 11.

My personal favourite is the Exploding Head emoji.


Net Neutrality

Permalink - Posted on 2017-07-11 14:52, modified on 2017-07-22 11:23

Tomorrow, July 12th, is Battle for the Net day. If you’re not sure why net neutrality is important, consider this brief write up:

The FCC wants to destroy net neutrality and give big cable companies control over what we see and do online. If they get their way, they’ll allow widespread throttling, blocking, censorship, and extra fees.

While I don’t live in the U.S., I do consider the internet to be a shared resource and something we should all look after1. I am supporting this call to action by having the Battle for the Net widget on my site tomorrow. You should too.

  1. Similar to our planet, which is something else the Trump administration are actively neglecting. ↩︎


Downloading the WWDC 2017 Sample Code

Permalink - Posted on 2017-07-07 15:20, modified on 2017-07-22 11:23

Downloading all the sample code from WWDC is a fairly tedious task. However, Johannes Fahrenkrug has created a handy RubyGem to download all the sample code for you. The code is available on GitHub and the gem is really easy to use.

It should be noted that all the sample code comes to 393.5 MB.


The Correct Way to Initialise a UITableViewCell

Permalink - Posted on 2017-07-07 13:31, modified on 2017-07-17 04:10

Below I present four options for initialising a UITableViewCell. Of these options, I tend to use the second option (or a close variant) in production code, and for brevity, option 4 in sample code.

What do you prefer? Are there other, safer options available?

Option 1:

var cell: UITableViewCell! = tableView.dequeueReusableCell(withIdentifier: cellIdentifier)
if cell == nil {
    cell = UITableViewCell(style: .default, reuseIdentifier: cellIdentifier)
}
return cell

Option 2:

guard let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier) else {
    let newCell = UITableViewCell(style: .default, reuseIdentifier: cellIdentifier)
    return newCell
}
return cell

Option 3:

if let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier) {
    return cell
} else {
    let newCell = UITableViewCell(style: .default, reuseIdentifier: cellIdentifier)
    return newCell
}

Option 4:

let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier)!
return cell


The Case for Keeping Touch ID

Permalink - Posted on 2017-07-06 15:24, modified at 15:33

As a result of Ming-Chi Kuo’s research note, there’s been quite a bit of interesting discussion about the iPhone 8 dropping Touch ID in favour of using facial recognition technology.

Benjamin Mayo, at 9to5Mac:

KGI’s Ming-Chi Kuo has sent out a new report with his top predictions for the 2017 iPhone lineup: two iterative updates to the iPhone 7 and iPhone 7 Plus, as well as the all-new OLED iPhone 8. The analyst believes that the iPhone 8 will feature the highest screen-to-body ratio of any phone on the market, thanks to the addition of the ‘notch’ at the top of the screen and a virtual home button.

However, KGI dampens spirits by stating that the virtual home button will not support fingerprint recognition, and that the OLED iPhone will not include a Touch ID sensor of any kind …

For several practical reasons, I don’t think Apple will remove Touch ID from any of the 2017 iPhones:

  1. How would you unlock your iPhone when you are not looking at it?
  2. In low-light scenarios, e.g. at the cinema or a bar, would your only option be to use a passcode?
  3. If you wear any headwear, e.g. a niqab, burka, balaclava, or perhaps even sunglasses, how would Face-to-Unlock work?

It doesn’t make sense to remove Touch ID and replace it with something that is sub-optimal by comparison. My guess — well, hope — is that if Face-to-Unlock is implemented, it will be done so in an additive fashion and not in a way where Touch ID is consigned to the scrap heap.


Simple JSON Parsing with Codable

Permalink - Posted on 2017-07-06 00:41, modified at 14:55

As I rewrite Amazing Flag Quiz for iOS 11, one of the greatest things I’ve come across is the new Codable protocol in Swift 4. Before I get into why it’s great, here’s a bit of background: Amazing Flag Quiz v1 to v2.1.2 (current) contains an XML file of ids, country names (short and long, I don’t know why!), continent names, flag image names, and population (I don’t know why!). That file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<countries>
  <country>
    <ID>0</ID>
    <shortCountryName>Afghanistan</shortCountryName>
    <longCountryName>Afghanistan</longCountryName>
    <countryFlag>Afghanistan.png</countryFlag>
    <countryPopulation>25500100</countryPopulation>
    <countryContinent>Asia</countryContinent>
  </country>
  <country>
    <ID>1</ID>
    <shortCountryName>Aland</shortCountryName>
    <longCountryName>'c5land Islands</longCountryName>
    <countryFlag>Aland.png</countryFlag>
    <countryPopulation>28355</countryPopulation>
    <countryContinent>Don't Use</countryContinent>
  </country>
  ...
</countries>

To use this file meant creating an NSXMLParser and all the code that goes along with it. For version 3 of Amazing Flag Quiz, I’ve decided to convert the XML to JSON and use a Country struct that conforms to Decodable.

The tidied up JSON file looks like this:

[
  {
  "name": "Afghanistan",
  "game": "Asia",
  "excludeFromWorldChallenge": false,
  "flag": "AF.png"
  },
  {
  "name": "Albania",
  "game": "Europe",
  "excludeFromWorldChallenge": false,
  "flag": "AL.png"
  }, 
  ...
]

The Country struct mirrors the data set:

/// Representation of data as held in the countryFlags.json file.
struct Country: Decodable {
    var name: String
    var flag: String
    var game: String
    var excludeFromWorldChallenge: Bool
}

I then have a single function to extract a Country array for the game type the player picks:

func flags(for gameType: GameType?) -> [Country] {
    
    let decoder = JSONDecoder()
    let data = try? Data(contentsOf: file!)
    let decodedData = try? decoder.decode([Country].self, from: data!)
    
    guard let countries = decodedData else {
        return []
    }
    
    if gameType == nil {
        return countries
    }
    
    if gameType == GameType.world {
        return GKRandomSource.sharedRandom().arrayByShufflingObjects(in: countries.filter({ $0.excludeFromWorldChallenge == false })) as! [Country]
    }
    
    return  GKRandomSource.sharedRandom().arrayByShufflingObjects(in: countries.filter({ $0.game == gameType!.rawValue })) as! [Country]

}

If a player selected the Asia game type:

let gameArray = flags(for: .asia) // returns a shuffled array of Asian countries.

Codable has made JSON parsing so simple. I’d recommend the Ulimate Guide to JSON Parsing With Swift 4 by Ben Scheirman as further reading.


Happy Birthday, iPhone

Permalink - Posted on 2017-06-30 14:33, modified on 2017-07-04 10:50

There’s only been one iPhone generation that I wasn’t part of: the first. In the UK the iPhone was only available on o2 and I was with T-Mobile. That fact, coupled with my contract renewal time-frame, meant that I upgraded to a different phone: LG Viewty.

While the rest of the world wishes the iPhone a happy birthday, I thought I’d jot down some thoughts about the LG Viewty.

The front of the phone was OK, while the back of the phone was hideous: the camera lens was huge but, to be fair, it did take really good pictures. It also had 120fps video and direct upload to YouTube (in 2007). The camera, in retrospect, was way ahead of its time.

The back panel of the phone was removable. The reason I know this was that mine was faulty and kept falling off. The whole phone had to be sent for repair for three weeks and during this time I was given a loaner feature phone with capacity for 100 text messages.

Anyway, while the Viewty’s operating system was LG’s, the user interface was an Adobe Flash variant…so it was unresponsive and buggy. The Viewty also came with a stylus and I used it maybe three times. Tapping buttons provided haptic feedback, but because it was a resistance based touchscreen you had to put in effort, and have patience, before said feedback was felt and your tap was registered.

After about three months I gave up with the Viewty and sold it on eBay. For the remainder of my contract I used a Sony Ericsson W580 that I bought in a rage from Argos.

I’m glad the iPhone 3G came along when it did.


Australia Pushing for Encryption Back Door

Permalink - Posted on 2017-06-26 10:59, modified at 12:28

Here we go again. Tim Hardwick, via Macrumors:

Australia claimed the increasing use of strong encryption on smartphones and other devices was hindering law enforcement’s capacity to gather and act on intelligence, and said it wants tech companies to do much more to give intelligence and law enforcement agencies access to encrypted communications.

No politician anywhere, or at anytime, has been able to explain the benefits to the country of their respective security services having the ability to know everything about the public’s private communications.

Providing a back door to encrypted communications – breaking encryption – is something that would be abused by both domestic security services and bad actors1 alike.

  1. Foreign, domestic, political, commercial…the list is endless. ↩︎


Made With ARKit

Permalink - Posted on 2017-06-21 13:10, modified on 2017-06-26 12:28

You should follow Made With ARKit on Twitter. The early tech demos of what’s being made with ARKit are incredible. Here’s a few:


European Parliament Committee Recommends End-to-End Encryption For All Electronic Communications

Permalink - Posted on 2017-06-19 00:44, modified on 2017-06-26 12:28

In a rare sign of complete competence, the European Parliament’s Committee on Civil Liberties, Justice, and Home Affairs recommendation on end-to-end encryption makes total sense. By Lucian Armasu, Tom’s Hardware:

The European Parliament’s (EP’s) Committee on Civil Liberties, Justice, and Home Affairs released a draft proposal for a new Regulation on Privacy and Electronic Communications. The draft recommends a regulation that will enforce end-to-end encryption on all communications to protect European Union citizens’ fundamental privacy rights. The committee also recommended a ban on backdoors.

Interestingly, the Committee also believe that metadata associated to data is within the scope of end-to-end encryption:

The metadata includes the numbers called, the websites visited, geographical location, the time, date and duration when an individual made a call etc., allowing precise conclusions to be drawn regarding the private lives of the persons involved in the electronic communication, such as their social relationships, their habits and activities of everyday life, their interests, tastes etc.

The protection of confidentiality of communications is also an essential condition for the respect of other related fundamental rights and freedoms, such as the protection of freedom of thought, conscience and religion, and freedom of expression and information.

I wonder how this would affect a company’s ability to comply with law enforcement requests for metadata? My assumption is they simply won’t be able to. Earlier this month, Tim Cook confirmed that Apple had provided metadata to UK authorities (via The Telegraph):

“Encryption doesn’t mean there’s no information,” said Cook. “Because metadata probably exists and metadata, if you’re putting together a profile, is very important.”

I don’t think this would be possible under the new recommendation.

Bringing the focus back to the Strong and Stable™ UK Government, there is still total incompetence when it comes to end-to-end encryption. Jonathan Haynes (via The Guardian):

She [Amber Rudd, Home Secretary] said she supports end-to-end encryption for families (presumably those using WhatsApp?), for banking and for business. But she insisted: “We also need to have a system whereby when the police have an investigation, where the security services have put forward a warrant signed off by the home secretary, we can get that information when a terrorist is involved.”

Ridge challenged Rudd that this was “incompatible with end-to-end encryption”. Rudd said it wasn’t. But Ridge is right: it is incompatible. As Cory Doctorow wrote when Cameron was suggesting the same thing: “It’s impossible to overstate how bonkers the idea of sabotaging cryptography is to people who understand information security.” A lot of things may have changed in two years but the government’s understanding of information security does not appear to be one of them.


iTunes UK Pricing of Modern Family Season 8

Permalink - Posted on 2017-06-18 05:14, modified on 2017-06-26 05:36

During a sale last year I bought seasons 1 - 7 of Modern Family on iTunes (UK) for £34.99. Season 8 has been available on iTunes (US) for a little while at a price of $34.99 and I was expecting the UK price to be around £34.99 as well.

How wrong was I?

£54.78. It’s robbery.

Update (2017-06-26): The price of the HD version has dropped to £17.99. That’s a 67% reduction. I hope people who bought at the £54.78 price are recompensed.


FeedPress Adds Experimental JSON Feed Support

Permalink - Posted on 2017-06-03 13:00, modified on 2017-06-26 05:36

From the FeedPress blog:

There is nothing FeedPress customers need to do in order to get JSON compatible feeds. Simply append the ?format=json parameter to the end of your RSS feed.

So simple. I’ve been testing it and it seems to be working well. My experimental feed is here.


Apple's Lower Priorities

Permalink - Posted on 2017-06-01 01:45, modified on 2017-06-26 05:36

An interesting series of articles regarding Apple’s lower priorities. First, David Sparks on the text and screen effects in Messages:

We have now had text and screen effects on iOS for eight months. Are you using them? Perhaps more importantly, does Apple remember they exist?

Dr. Drang followed up with:

  • The iPad features introduced in iOS 9 were followed up with… nothing in iOS 10
  • TV
  • The one-and-a-half-year refresh for the late 2016 MacBook Pro
  • The over-four-years betweek iWork releases

Nick Heer at Pixel Envy:

  • Remember Live and Dynamic wallpapers? Neither has been updated since their introductions in 2015 and 2013, respectively.
  • Remember the “Learn to Play” feature in GarageBand? It was introduced in 2009, and hasn’t been updated since 2010. The artist lesson store is exactly the same as the day it launched nearly eight years ago.

I’d also posit that FaceTime video calling is due for an update. It’s essentially the same product today as it was when it was released six years ago and could do with some new features, for example, group calling1.

  1. There was an episode of Modern Family that used some nifty video editing that made it look like FaceTime had this feature implemented. It was very, very clever. ↩︎