New iPad Pro announced: $599, 9.7-inch display, weighs less than one pound

Apple has just announced a new iPad Pro, a smaller version of its iPad Pro tablet released last year. The new iPad Pro has a 9.7-inch display and weighs less than one pound. The new Pro is the same size as the iPad Air 2, which Apple says is the most popular size of iPad use.

The display on the new iPad Pro is said to be 25 percent brighter and 40 percent less reflective than the iPad Air 2’s screen, and Apple claims that it has the lowest reflectivity of any tablet screen. Apple also claims that the 9.7-inch display is the brightest tablet screen on the market. It also features a new technology called “True Tone Display”, which measures the color temperature of ambient light and adjusts the display to match. The Pro also takes advantage of iOS 9.3’s new blue-light reduction feature for late-night use.

Aside from the display, the new iPad Pro is very similar to the larger model: it’s powered by the A9X processor and has a similar four-speaker system. Apple says it’s twice as loud as the Air 2. Apple is selling a smaller version of the Smart Keyboard for the down-sized Pro, and the new tablet is compatible with the Pencil stylus introduced last year. Other accessories include a new Lightning-powered SD card reader and USB camera adapter.

An interesting replacement for the iPad Air 2…

Stand to work if you like, but don’t brag about the benefits

NPR:

Too much sitting increases heart failure risk and disability risk, and shortens life expectancy, studies have found. But according to an analysis published Wednesday of 20 of the best studies done so far, there’s little evidence that workplace interventions like the sit-stand desk or even the flashier pedaling or treadmill desks will help you burn lots more calories, or prevent or reverse the harm of sitting for hours on end.

“What we actually found is that most of it is, very much, just fashionable and not proven good for your health,” says Dr. Jos Verbeek, a health researcher at the Finnish Institute of Occupational Health.

I actually have a standing desk from Oristand that I’m about to write a review on, and I like it but I’ve also personally always found standing desks to be one of those things that were just “too good to be true”.

As it turns out, I may be partially right. That does not mean you shouldn’t stand, or at least, not sit for 10 hours a day but it seems the health benefits have been overblown.

I’ve found that I do like to sit for part of the day, and stand for part of the day but it’s nice to be able to switch back and forth, and yes, there are desks that can raise and lower, but the Oristand also lets me quickly tuck it away and use my desk as a desk when I don’t feel like standing too.

The moral of the story is: If a standing desk is comfortable for you, then you should definitely use it. But if someone finds a regular desk easier to work with, then let them use that to do their work.

How Many Decimals of Pi Do We Really Need?

Marc Rayman, director and chief engineer for NASA’s Dawn mission, explaining why NASA uses 3.141592653589793 (“only” 15 decimal places) for its most accurate calculations:

Earlier this week, we received this question from a fan on Facebook who wondered how many decimals of the mathematical constant pi (π) NASA-JPL scientists and engineers use when making calculations:

Does JPL only use 3.14 for its pi calculations? Or do you use more decimals like say: 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920962829254091715364367892590360

[…]

The most distant spacecraft from Earth is Voyager 1. It is about 12.5 billion miles away. Let’s say we have a circle with a radius of exactly that size (or 25 billion miles in diameter) and we want to calculate the circumference, which is pi times the radius times 2.

Using pi rounded to the 15th decimal, as I gave above, that comes out to a little more than 78 billion miles. We don’t need to be concerned here with exactly what the value is (you can multiply it out if you like) but rather what the error in the value is by not using more digits of pi. In other words, by cutting pi off at the 15th decimal point, we would calculate a circumference for that circle that is very slightly off.

It turns out that our calculated circumference of the 25 billion mile diameter circle would be wrong by 1.5 inches. Think about that. We have a circle more than 78 billion miles around, and our calculation of that distance would be off by perhaps less than the length of your little finger.

Apple to Build out Own Cloud Infrastructure

Mark Bergen, reporting for Recode on reports that Apple is shifting some of its cloud infrastructure from AWS to Google:

In its bid to raise its name in cloud computing services, Google nabbed a big-name customer: Apple. The iPhone maker recently started storing portions of its iCloud and services data with Google’s cloud platform, according to sources familiar with the deal.

It’s a win for Google, which is gunning for larger companies as cloud customers. But it might be short-lived, as it looks like Apple is also simultaneously building out its own system to bring data stored on its millions of devices in house.

Currently, much of Apple’s iCloud luggage sits with Amazon Web Services, the leading cloud provider by a long mile, and also with Microsoft’s Azure. CRN, the publication which first reported the news, claims that Apple is trimming its reliance on AWS by turning to Google. At minimum, Apple would seem to be adding Google to the mix.

[…]

Then there’s Apple’s next step. Morgan Stanley, in a note last month, laid out the tea leaves: Apple has announced three data centers opening soon and spent an estimated $1 billion last year on AWS. It’s a logical move for Apple if it wants more independence from its tech rivals. And it’s one Apple should make to store the growing media libraries from its mobile, TV and TBD products.

According to a source familiar with the matter, Apple already has a team working on this; it’s known internally as “McQueen,” as in Steve. It’s unclear if that project will materialize or when. But a source tells Re/code that the codename refers to Apple’s intent, sometime in the next few years, to break its reliance on all three outside cloud providers in favor of its own soup-to-nuts infrastructure.

The move to their own data centers falls in line with Tim Cook’s longtime refrain:

“We believe that we need to own and control the primary technologies behind the products that we make.”

It is interesting that Apple uses all three major cloud providers now, but it does give each one the edge to say both: Apple iCloud is hosted here, but not to be able to say they are the primary iCloud hosting provider.

Indies And The App Store

Brent Simmons:

Rene Ritchie, in What no indie developer wants to hear about the App Store, writes:

Big apps get all the attention these days, just like big movie, music, or book releases — or big toy releases — and indies get what little is left, when there’s even a little left. The App Store is big business, and that’s how big business works. Only our nostalgia keeps us thinking otherwise. Just like our nostalgia for the corner store in the age of online and big box.

On this same subject, Ben Thompson’s Why doesn’t Apple enable sustainable businesses on the app store? is worth a re-read.


Obviously some companies are doing well — such as Omni, where I work — selling productivity apps on the App Store.

And indies would do better than they are right now — possibly much better — if the App Store had trial versions, upgrade pricing, and a faster and better review process. (And the Mac App Store should make sandboxing either less onerous or, preferably, optional.) (And — since I’m listing the ponies I want — it would help if Apple took something like 10% rather than 30%.)

But a couple other things are true:

There was never a golden age for indie iOS developers. It was easier earlier on, but it was never golden. (Yes, some people made money, and some are today. I don’t mean that there were zero successes.)

And there’s a good chance that many of the people you currently think of as thriving iOS indie developers are making money in other ways: contracting, podcast ads, Mac apps, etc.

I agree with Brent on a lot of points here. As an indie app developer, there are moments when you wish some things were done differently.

Chuq Von Rospach on Fixing the Apple App Store

I’m a strong believer that the indie developers are where the innovation comes from, not to mention the next generation of experts on the platform, and that it makes sense to invest in supporting them beyond what the revenue their apps will return through sales on the platform, but in all honesty, the revenue numbers and analytics make that a tough sell, and Apple is likely in that place where there are 300 proposals on the project list for the next year, and resources for 50 of them, so how do you choose which ones make the cut?

Eric Schmidt spotted snapping pics with an Apple iPhone

Apple Insider:

Former Google CEO and current Alphabet Executive Chairman Eric Schmidt was in South Korea for a press event this week, where he was spotted taking pictures of the event using an Apple iPhone instead of a Google Android handset. […]

While the sight of Schmidt using an iPhone, and not an Android device, may come as a surprise to some, it’s not entirely unexpected — Schmidt continued to use a BlackBerry well after the launch of Android, candidly admitting he preferred the handset’s physical keyboard.

Wonder what the story will end up being here…

Adding Push Notifications to your Parse Server App

I was originally going to write about how to use node.js to enable push notifications, but the latest version of Parse Server now includes basic push notification support using Google Cloud Messaging (GCM) for Android devices and Apple Push Notification Service (APNS) for iOS devices.

Instead, I decided to write about how to enable the built-in push notifications in your Parse Server apps using the updated service.

There are already guides out there on this, but I wanted to put as much information as I could in one place, rather than clicking through to various sources.


Getting Started

This post assumes you previously set up a Parse Server install on Heroku, so some steps will make more sense if you’ve followed that tutorial as well.

To get started, you’ll need your credentials to both GCM and APNS in order to send push notifications to iOS and Android devices.

Preparing your APNS (iOS) credentials

Preparing your Apple Push Notification Service credentials is actually the longest, most detailed part of this post. There are a few steps to follow so I’ll keep them as quick and as short as I can (by the way, if your app is Android only, then you can skip this step obviously):

  1. Log in to the Apple Developer Member Center and click on identifiers under iOS Apps and locate your application in the list.
  2. If you haven’t registered an App Id yet, then click the + symbol and fill out the form, _make sure you check the Push Notifications checkbox.
  3. Click Settings or Edit to continue.
  4. Choose either the Development or Production certificate option and click Create Certificate.
  5. Follow the instructions in the Add iOS Certificate Assistant and click continue.
  6. Using the Certificate Signing request that was just created, generate the APNS Push SSL certificate.
  7. When the Download button appears, you can download your certificate(s). you may need to reload the page for this to update.
  8. Open the download certificate, this will open in the Keychain Access app.
  9. You should see your certificate under My Certificates. If you don’t then check Certificates and it may be there instead.
  10. The final step is to export your certificate as a .p12 file.
    1. Select the certificate that was just added to Keychain Access and select File -> Export Items... from the menu. _Make sure you have select My Certificates from the category menu on the lower left-hand side, if it’s not highlighted then you will not be able to export the certificate as a .p12 file.
    2. When saving the file, use the Personal Information Exchange (.p12) format.
    3. Create a folder in your parse server app called certs and copy the file there.

Ok, you’ve got your .p12 file, we’ll use this shortly to configure push notifications, now onto setting up your GCM credentials.

Preparing your GCM (Android) credentials

Google Cloud Messages is a lot easier to configure than APNS was (by the way, if your app is iOS only then you can skip this step obviously):

  1. Enable GCM for your Android project in the Google Developer Console. This will give you your GCM sender ID, which is your project number. The project number should be a large integer like 129437206252.
  2. Go to the Google developer credentials page, and create a new API key. This API key is your GCM API key.

Configuring Your Parse Server App to Push

Now that we’ve gotten our credentials, we need to update our app to use them.

Let’s look at the config we used in our last post about Parse Server:

var api = new ParseServer({
    databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
    cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
    appId: 'MYAPPID',
    clientKey: 'myclientKey',
    masterKey: 'myMasterKey'
});

First, make sure you run npm install --save parse-server@latest to update your app to the latest version of Parse Server.

Also, you will need to make sure you set the masterKey as that is necessary for sending push notifications from your app via API calls.

Ok, let’s add the new push configuration:

var api = new ParseServer({
    databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
    cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
    appId: 'MYAPPID',
    clientKey: 'myclientKey',
    masterKey: 'myMasterKey',
    push: {
        android: {
            senderId: '', // The Sender ID of GCM
            apiKey: '' // The Server API Key of GCM
        },
        ios: {
            pfx: 'certs/mycert.p12', // the path and filename to the .p12 file you exported earlier.
            cert: '', // If not using the .p12 format, the path to the certificate PEM to load from disk
            bundleId: '', // The bundle identifier associated with your app
            key: '', // If not using the .p12 format, the path to the private key PEM to load from disk
            production: true // Specifies which environment to connect to: Production (if true) or Sandbox
        }
    }
});

Configuring Your Parse Apps to use Parse Server

To update your iOS and / or Android apps to use Parse Server instead of Parse, all you have to do is change the server URL to your installation.

Make sure you update to the latest versions of the SDKs so that you have support for Parse Server.

For example, if you followed the previous post about installing Parse Server on Heroku, then you would point your apps to use: https://NAME_OF_YOUR_HEROKU_APP.herokuapp.com where NAME_OF_YOUR_HEROKU_APP is the name of your heroku app you created.

Configuring your iOS apps

[Parse initializeWithConfiguration:[ParseClientConfiguration configurationWithBlock:^(id<ParseMutableClientConfiguration> configuration) {
    ...
    configuration.applicationId = @"MYAPPID";
    configuration.clientKey = @"myclientKey";
    configuration.server = @"https://NAME_OF_YOUR_HEROKU_APP.herokuapp.com/parse";
    ...
}]];

Configuring your Android apps

Parse.initialize(new Parse.Configuration.Builder(myContext)
    .applicationId("MYAPPID")
    .clientKey("myclientKey")
    .server("https://NAME_OF_YOUR_HEROKU_APP.herokuapp.com/parse")
    ...
    .build()
);

You should also update your app so that it registers for GCM with both Parse’s GCM sender ID and your app’s GCM sender ID. To do this, specify the additional GCM sender ID with the following <meta-data> tag as a child of the <application> element in your app’s AndroidManifest.xml.

For example:

<meta-data
    android:name="com.parse.push.gcm_sender_id"
    android:value="id:YOUR_SENDER_ID" />;

Viewing Installations

Once you’ve configured and updated your apps, you’ll be able to see installations using this curl command:

curl -X GET \
    -H "X-Parse-Application-Id: MYAPPID" \
    -H "X-Parse-Master-Key: myMasterKey" \
    https://NAME_OF_YOUR_HEROKU_APP.herokuapp.com/parse/installations

This will show you how many people have your app installed.

Sending Push Notifications

I know, this was the entire reason you read this far, you want to know how to send push notifications correct? I thought so.

Currently, Parse Server can only send push notifications using API requests with your master key. So, for example:

curl -X POST \
    -H "X-Parse-Application-Id: MYAPPID" \
    -H "X-Parse-Master-Key: myMasterKey" \
    -H "Content-Type: application/json" \
    -d '{
        "where": {
            "deviceType": { "$in": [ "ios",  "android"  ]  }
        },
        "data": {
            "title": "Ant-man",
            "alert": "This is awesome. It is awesome."
        }
    }' \
    https://NAME_OF_YOUR_HEROKU_APP.herokuapp.com/parse/push

Will send a push notification to all registered ios or android devices. Push notifications are formatted as title and alert with alert being the actual message.

Push notifications can also be sent from cloud code:

Parse.Push.send({
    where: {
        "deviceType": { "$in": [ "ios",  "android"  ]  }
    },
    data: {
        "title": "Ant-man",
        "alert": "This is awesome. It is awesome."
    }
}, { useMasterKey: true });

You can now do push notifications to your iOS and Android apps!


Closing Out

Hopefully, this guide will be useful for seeing how to add push notifications to your Parse Server apps. Parse Server is shaping up to be a handy utility so it’s fun to look at the various pieces of it.

In a future post, I’ll show you how to integrate a proper job queue which can then take trigger notifications based on certain criteria, such as a new message notification in a chat room that a user has subscribed to, for example.