Looking through a file from the Facebook iOS SDK, I came across a reference to this:-

if (appBridgeType && [dictionary[FBAppBridgeTypesMetadata.tag] isEqualToString:FBAppBridgeTypesTags.png])

The bit that interested me in particular was the use of FBAppBridgeTypesMetadata.tag and FBAppBridgeTypesTags.png which seemed to be strings and constants. I've used string constants before, but have never seen this .xyz construction.

It turns out its a simple struct:-

static const struct {
    NSString *data;
    NSString *png;
} FBAppBridgeTypesTags = {
    .data = @"data",
    .png = @"png",

I do rather like the way this is so self-contained. Must endeavour to learn a bit more C!!

Having moved last year to Octopress to generate of static websites (such as this one), a major advantage presents itself; as the sites are now platform independent, the generator code can be swapped out with ease.

In line with my focus on Objective-C for native iOS development and Node.js for everything else, I thought it'd be a good idea to see how easy it would be to use node to generate the labs and blog sites…

Continue →

For the last few apps I‘ve been working on, I’ve used Parse.com as a backend, allowing for syncing data between app and website/cms.

For the most part, it has been an excellent experience, and I'd recommend it to anyone needing a hosted backend solution for a web, desktop or mobile application. There are however some gotchas which you may need to be aware of …

Continue →

Recently I’ve been trying out Stencyl, which is a game making framework, based on MIT’s Scratch, which publishes to Flash and iOS. Version 2 uses Actionscript, but the new version currently in beta uses Haxe NME for more speed and ease of publishing to more platforms, including Android.

Continue →

These next two are features I'd like to see implemented in iOS 7, both of which I think could be very big news for developers initially, and the platform as a whole once developers get to grips with them.

  • XPC / Promises / Intents - one area that Android is definitely ahead of iOS is in the ability of various apps to interact with each other. Ole Bergman has an excellent introduction to Android‘s intents and promises (and in the same vein “charms” in Windows 8) and how these might be implemented in iOS. Its quite an old article now (a year old at time of writing); since that time Apple have released iOS6 which has some movement in that direction; again Ole has written about Apple’s remote view controllers. I'd love to see this sort of thing pushed much further and, perhaps related, giving users the ability to set the default app to handle e.g.: email.

Personally, I think that if implemented well and extensively, this could be huge for iOS development and the utility of iOS as a whole.

  • SceneKit - introduced in Mac OS X 10.8, scene kit provides scene graph management for Open GL. Although there are some good libraries in this vein for iOS, it would make a huge amount of sense to have scene kit in iOS providing a similar environment for working with Open GL as in Mac OS X.

From experience working with one of the open-source scene graph libraries out there, this is definitely an area where a well implemented library from Apple could have a huge impact on the development of 3d in games and interfaces on iOS.

Fingers crossed on seeing either or both of these in iOS 7!

Having started the process of migrating to predominantly static websites, the one very obvious issue is that there's no easy way of adding a contact form…

I've been using Parse.com a fair bit recently for iOS work, and recently for an iOS/Android/web project.

One of the recent additions to Parse is the cloud code system which allows you to run code on their servers, included in that are a number of modules for interacting with other web services.

Continue →

Here‘s the first in a series of blog posts about things I’d like to see in iOS7 - some are areas that I think need improving (from experience developing apps), some are more broad and about possibilities that would make the platform stronger. The first couple, today, are general fix-its; born from recent experience:-

  • Fix UILocalNotifications; having recently worked on an app which needed to implement reminders (with associated actions), UILocalNotifications was the only real option (I didn‘t want to use push notifications because the user might be offline, and Reminders.app and EventKit don’t allow you to launch straight into your app). The problem is that the granularity of repeats for UILocalNotifications is very coarse, plus there is a limit of 64 per app. I ended up with a solution that grouped notifications into half hour time slots, which worked for that app, but really a lot of pain could have been avoided with finer grained control of repeats and no hard limits.

  • Git + Storyboards / Xibs playing nice - I like Xibs and Storyboards; they suit the way that I think, and give me a way of prototyping and iterating rapidly through adding real functionality in only a little longer than it takes to do in wireframe. The biggest problem is that they really don‘t work well with SCM primarily because they don’t merge nicely. This is annoying with Xibs, but really hard work with Storyboards which might contain your entire app. I'm not sure exactly what the answer is here, but the boffins at Apple must be able to figure something out!

That's it for today; more to come.

Quick tip … when working with CALayer shadows, its useful to set shouldRasterize to YES - this helps with performance (along with setting the shadowPath). The problem is that it also rasterises everything else in the layer, including all the text - which then looks awful. There are a couple of options …

  1. set the rasterization scale (thus ensuring the rasterization is done at correct scale for the device - retina/non-retina):

    layer.rasterizationScale = [[UIScreen mainScreen] scale]];
  2. or move the shadow into its own layer and adding that as a sublayer.

Both options work - it depends on what your specific use case is, as to which is going to be better for your app.

Having spent the last 14 or so years building complex PHP driven CMS (and other dynamic) systems, its funny how nowadays I'm passing off much of that to 3rd parties eg: Parse.com or 3rd party applications Wordpress.

Part of this is that I'm focussing on other things (mostly native iOS development), partly because the whole landscape is changing; but also because “applications” like Octopress and Jekyll are finding a sweet spot between being dynamic (the site is generated on the fly) and static (everything is hard coded).

By working with a pre-processor, I get much of the flexibility of templates, document fragments etc but end up with a static website which can be served very very quickly.

Using client side scripting (Javascript) to add interactive features, perhaps in conjuction with service providers (like the aforementioned Parse.com), we can have the best of both worlds.

We'll see!

by Andy

Copyright © 2013 - Brothers Bennett - Powered by Hexo
- Ported theme GreyShade -