Shylight

Certain types of flowers close at night, for self-defense and to conserve their resources. This highly evolved natural mechanism is called nyctinasty, and inspired Studio Drift to create Shylight, a light sculpture that unfolds and retreats in a fascinating choreography mirroring that of real flowers.

Shylight →

Elsewhere , Leave a comment

ionic emulate “[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7fd64840e790″

Got this error when running ionic emulate:

2015-03-16 11:13:24.112 ios-sim[50548:9106309] stderrPath: /Users/bramus/Projects/ionic/todos/platforms/ios/cordova/console.log
2015-03-16 11:13:24.113 ios-sim[50548:9106309] stdoutPath: /Users/bramus/Projects/ionic/todos/platforms/ios/cordova/console.log
2015-03-16 11:13:24.140 ios-sim[50548:9106309] -[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7fec20d08400
2015-03-16 11:13:24.140 ios-sim[50548:9106309] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7fec20d08400'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff85db066c __exceptionPreprocess + 172
	1   libobjc.A.dylib                     0x00007fff87d8876e objc_exception_throw + 43
	2   CoreFoundation                      0x00007fff85db36dd -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
	3   CoreFoundation                      0x00007fff85cfaaa4 ___forwarding___ + 1028
	4   CoreFoundation                      0x00007fff85cfa618 _CF_forwarding_prep_0 + 120
	5   ios-sim                             0x000000010b2b2cc9 -[iPhoneSimulator LoadSimulatorFramework:] + 245
	6   ios-sim                             0x000000010b2b47e3 -[iPhoneSimulator runWithArgc:argv:] + 2297
	7   ios-sim                             0x000000010b2b4bb4 main + 101
	8   ios-sim                             0x000000010b2b2b84 start + 52
	9   ???                                 0x000000000000000b 0x0 + 11
)
libc++abi.dylib: terminating with uncaught exception of type NSException
/Users/bramus/Projects/ionic/todos/platforms/ios/cordova/run: line 158: 50548 Abort trap: 6           ios-sim launch "$SIMULATOR_APP_PATH" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log" $TARGET_FLAG --exit
Error: /Users/bramus/Projects/ionic/todos/platforms/ios/cordova/run: Command failed with exit code 134
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:743:16)
    at Process.ChildProcess._handle.onexit (child_process.js:810:5)

The build succeeds fine, but the simulator cannot be launched. To fix it, update ios-sim

$ npm uninstall -g ios-sim
$ npm install -g ios-sim

After that ionic emulate should run fine again :)

Elsewhere , , Leave a comment

Push Notifications for the Web

push-message-b27d1cc8a4b125907d658982bbe5be2d

self.addEventListener('push', function(event) {  
  // Since there is no payload data with the first version  
  // of push messages, we'll grab some data from  
  // an API and use it to populate a notification  
  event.waitUntil(  
    fetch(SOME_API_ENDPOINT).then(function(response) {  
      if (response.status !== 200) {  
        // Either show a message to the user explaining the error  
        // or enter a generic message and handle the   
        // onnotificationclick event to direct the user to a web page  
        console.log('Looks like there was a problem. Status Code: ' + response.status);  
      throw new Error();  
      }

      // Examine the text in the response  
      return response.json().then(function(data) {  
        if (data.error || !data.notification) {  
          console.error('The API returned an error.', data.error);  
          throw new Error();  
        }  
          
        var title = data.notification.title;  
        var message = data.notification.message;  
        var icon = data.notification.icon;  
        var notificationTag = data.notification.tag;

        return self.registration.showNotification(title, {  
          body: message,  
          icon: icon,  
          tag: notificationTag  
        });  
      });  
    }).catch(function(err) {  
      console.error('Unable to retrieve data', err);

      var title = 'An error occured';
      var message = 'We were unable to get the information for this push message';  
      var icon = URL_TO_DEFAULT_ICON;  
      var notificationTag = 'notification-error';  
      return self.registration.showNotification(title, {  
          body: message,  
          icon: icon,  
          tag: notificationTag  
        });  
    })  
  );  
});

If you ask a room of developers what mobile device features are missing from the web, push notifications are always high on the list. As of Chrome version 42, the Push API and Notification API are available to developers.

Be sure to read up on ServiceWorkers first, as push notifications rely on them.

Also: looks complicated. A tad too complicated.

Push Notifications on the Open Web →

Elsewhere , , Leave a comment

Characteristics of a well-designed user interface

Great set of slides from my friend Bytte talking about the characteristics of a well-designed UI:

Elsewhere , , Leave a comment

Quantity Queries for CSS

fig6_firstchild_li

Styling elements based on the “more than one” and “fewer than two” thresholds is a neat trick, but a flexible “quantity query” interface would accept any quantity. That is, I should be able to style “more than or equal to n” for any value of n. Then I can style “more than or equal to 6” in our navigation menu.

Quantity Queries for CSS →

Elsewhere , , , Leave a comment

The Web’s Grain

Great piece by Frank Chimero. Starts with that nostalgic nineties feel and finds it way to photography, responsive design, and the fact that some websites try to blow you away with their design/technological advancements.

“Listen bub,” I say, “it is very impressive that you can teach a bear to ride a bicycle, and it is fascinating and novel. But perhaps it’s cruel? Because that’s not what bears are supposed to do. And look, pal, that bear will never actually be good at riding a bicycle.”

This is how I feel about so many of the fancy websites I see. “It is fascinating that you can do that, but it’s really not what a website is supposed to do.”

Reminds me of this quote (supposedly) from Jurassic Park:

Just because we can doesn’t mean we should.

Another interesting thing: On breakpoints he has to say this:

So, those media queries we write? It might be time to stop calling them breakpoints, and instead consider them points of reassembly.

Tomatoh, Potatoh … or is there more to it?

The Web’s Grain →

Elsewhere , , Leave a comment

Seascape

sea-gl

Fully-procedural sea surface computing. Without textures.

Wow!

Seascape →

Elsewhere , Leave a comment

Launchkit Review Monitor

launchkit-review-monitor

App Store reviews delivered to Slack and your inbox

Best part of it all: it’s totally free!

Review Monitor →

Elsewhere , , , Leave a comment

GLMap Framework

glmap

GLMap is a lightweight offline map component with a simple mechanism of integrating into any iOS or Android application.

With the GLMap framework, map data is prepared on CPU and is rendered directly on GPU using OpenGL ES 2.0. This allows each processor to do the job it does best. By splitting up data processing, we save CPU capacity for other tasks.

Vectors generated from OpenStreetMap data.

GLMap Framework →
Galileo Offline Maps, an app powered by GLMap →

Elsewhere , , , , Leave a comment

Riding Light

This animation illustrates, in realtime, the journey of a photon of light emitted from the surface of the sun and traveling across a portion of the solar system, from a human perspective.

Elsewhere , Leave a comment