Archive for December 2, 2015

Wednesday, December 2, 2015 [Tweets] [Favorites]

Adobe Animate CC

Adobe (via Scott Hanselman):

Flash has played a leading role in bringing new capabilities to the web. From audio and animation, to interactivity and video, Flash has helped push the web forward.

Today, open standards like HTML5 have matured and provide many of the capabilities that Flash ushered in. Our customers have clearly communicated that they would like our creative applications to evolve to support multiple standards and we are committed to doing that. So today we are announcing Animate CC, previously Flash Professional CC, which will be Adobe’s premier web animation tool for developing HTML5 content while continuing to support the creation of Flash content. Adobe Animate CC will be available in early 2016.

Susie Ochs:

But Flash isn’t going away. Animate CC will still support Flash creation, along with HTML5, WebGL, 4K video, and SVG. And you’re still going to run into content online that requires Flash Player, such as Facebook games and, yes, even some Flash video. Adobe says that Facebook will be sending back “security information” to Adobe so the company can improve Flash Player’s security. Adobe’s blog post also mentions having worked with “Microsoft and Google to help ensure the ongoing compatibility and security of Flash content” in browsers.

Jacob Kastrenakes:

By acknowledging that Flash is dying, Adobe is able to better position its animation tools for the future. Flash Professional CC is already capable of creating HTML5 content — in fact, it already represents a third of all content created in the app, according to Adobe. By taking up the name Animate CC, Adobe is able to sell Flash Professional CC as a general animation tool, rather than a tool geared toward Flash.

Previously: Thoughts on Flash.

Generating Core Data Swift

Human Friendly:

There are two [Xcode] generation options, with “Use scalar properties for primitive data types” you get usefully typed integers, floats, doubles and bools but lose the expression to express optionals/nil values. This is presumably due to the limitations of the Objective-C based API. It also expresses date types as NSTimeIntervals (Doubles) rather than NSDates. The other option will generate with objects so you will get NSDates but for number values and Booleans you will get NSNumbers which lose information about whether it is a floating point type, integer or boolean.

[…]

The Core Data model file is actually a very simple XML file and parsing it is relatively straightforward. I’ve written a quick (but brittle so far) parser using NSXMLParser. This means that I can easily get at the key information (Entities, Attributes and the relationships) to generate the code I need.

See also: mogenerator.

Flickr’s Experience With iOS 9

Rocir:

Flickr provides a huge amount of public content, including many amazing photos. If anybody searches for “Northern Lights” in Spotlight, shouldn’t we show them our best Aurora Borealis photos? For this public content – photos, public groups, tags and so on – we leverage NSUserActivity, with its new search APIs, to make it all searchable when viewed.

[…]

Every time a user opens a photo, public group, location page, etc., we create a new NSUserActivity and make it current. The more often a specific activity is made current, the more relevant iOS considers it. In fact, the more often an activity is made current by any number of different users, the more relevant Apple considers it globally, and the more likely it will show up for other iOS users as well (provided it’s public).

[…]

In Flickr, we have a few different domains. That means that each one of flickr.com, http://www.flickr.com, m.flickr.com and flic.kr must provide its own JSON association file, whether or not they differ. In our case, the flic.kr domain actually does support different paths, since it’s only used for short URLs; hence, its “apple-app-site-association” is different than the others.

[…]

If the user taps on a photo in one of these cells, it will open the photo view. But if the user taps on another user’s name, it will open that user’s profile view. Previews of these UIViewControllers should be shown accordingly. But the “peek and pop” mechanism requires you to register a delegate on your UIViewController with registerForPreviewingWithDelegate:sourceView:, which means that you’re working in a much higher layer. Your UIViewController’s view might not even know about its subviews’ structures.

Previously: Flickr for iOS 9.

Swift and C Libraries

Chris Eidhof:

We started with a very simple invocation of qsort and sorted some numbers. Then, we put it into a function and made it work on any array of numbers. The moment we started making it generic, things got really complicated. The blocks were relatively okay, but once we needed to use this qsort_r strategy with the void pointer, things got a bit magical. However, this is a very common pattern in C libraries, and anytime you want to wrap a C library, you can use this technique. You might also think, “Why would I ever want to wrap a C library?” I think that once Swift is open-source, we want to run it on multiple platforms, for example Linux. And on Linux we will probably not have access to all the Apple frameworks that exist on Cocoa and iOS. We will need to wrap frameworks all of a sudden for networking, drawing things, etc. Then, it will be important that you know how to work with C libraries. That’s why I think this can be very useful.