Posts Tagged 'Programming'

Speaking Binary Plist

So we’ve mentioned various options for fast JSON parsing for your data communications needs before; but if you really want speed of said communications, how to do it? Why, don’t use XML or JSON, naturally! That’s one of the points in this writeup, the rest of which is worth a read too:

Hipmunk for iPhone Post-Mortem

… Parsing large amounts of JSON sucks. Even on an iPhone 4.

Import times were upwards of five seconds, turning JSON into native collection objects and then mapping these to local Core Data entities. Just awful. Luckily, I work with people who are way, way smarter than I am. I asked hardcore Pythonista and Real Programmer Andre von Houck if he could make the server spit out Binary Plist files instead of JSON, saving me the parsing overhead.

A couple of days later, he’d written something from scratch to do this. Since I could skip the parsing, import times dropped by 2500ms. Andre is a badass…

Well, good on Andre. Let me check the desk drawers …. nope, no Andre. So that’s all very nice, but of not much immediate applicability to the Andre-less, it seems. Or, wait, does it?

… Compiling a plist server side doesn’t seem to be as big of a chore as you’d think. In fact, there’s a github project that will do the server side compilation for you…

Hmmm. That does sound interesting. “CFPropertyList”, you say?

The PHP implementation of Apple’s PropertyList can handle XML PropertyLists as well as binary PropertyLists. It offers functionality to easily convert data between worlds, e.g. recalculating timestamps from unix epoch to apple epoch and vice versa. A feature to automagically create (guess) the plist structure from a normal PHP data structure will help you dump your data to plist in no time…

… CFPropertyList does not rely on any “Apple proprietary” components, like plutil. CFPropertyList runs on any Operating System with PHP and some standard extensions installed.

Although you might want to deliver data to your iPhone application, you might want to run those server side services on your standard Linux (or even Windows) environment, rather than buying an expensive Apple Server. With CFPropertyList you now have the power to provide data from your favorite Operating System….

Well now, that’s even more interesting than it sounded. Plus there’s a Ruby version and a Python version if you’re too cool to do PHP. OK, next time we have some actual input into how server communications are to be done, we know what we’re pointing the web dudes at!

h/t: @pzearfoss!

Continue Reading →

MapKit Tutorial

Übertutor Ray Wenderlich is at it again — this time an excellent (but you knew that) introduction to, well,

Introduction to MapKit on iOS Tutorial

MapKit is a really neat API available on the iPhone that makes it easy to display maps, jump to coordinates, plot locations, and even draw routes and other shapes on top.

I’m writing this tutorial because about a month ago I attended a neat event in Baltimore called Civic Hack Day where I played around with MapKit to display some public data such as place locations, crime data, and bus routes. It was kind of fun so thought others might be interested to learn how it works …

Don’t skip right past it ’cause you think you know MapView already; let us draw your attention to

… In the process, you’ll learn how to … query and retrieve government data available via the Socrata API …

Betcha you don’t know how to do that yet. But soon!


And after you’re introduced, check out: Adding polygon map overlays

Continue Reading →

Chameleon Project

So the big news of the iOS developer twitterverse today was — as chances are you know already, if you happened to be online at all — the unveiling of

Screen shot 2011-03-23 at 12.04.21 AM.png

If you’re an iOS developer, you’re already familiar with UIKit, the framework used to create apps for the iPhone, iPod and iPad. Chameleon is a drop in replacement for UIKit that runs on Mac OS X. In many cases, your iOS code doesn’t need to change at all in order to run on a Mac.

This new framework is a clean room implementation of the work done by Apple for iOS. The only thing Chameleon has in common with UIKit are the public class and method names. The code is based on Apple’s documentation and does not use any private APIs or other techniques disallowed by the Mac App Store…

We’ve noticed a pretty big upswing in people asking for Mac versions of their iPad projects since the Mac App Store was opened, so this will be most handy indeed, we suspect. Read the project site, and check out the code on github!


And there’s another option now — TwUI is the porting layer used by Twitter for Mac!

Continue Reading →

Core Data Grab Bag

There’s been a couple articles posted lately both promising to be first in a series that talk about simplifying Core Data access, always worth reading for some new ideas:

1) Super Happy Easy Fetching in Core Data

This post is the first in a short series of topics describing how to I’ve made using Core Data a little simpler without giving up the power features you still need. The full project from which this series is derived is available on github

2) Simplifying Core Data Part I

About half a year ago I asked the community about an idea to make Core Data more generic. I was looking for validation of my idea, which attempts to generalize the handling of Core Data among different threads. I received a few responses, but didn’t feel anyone fully digested what I was trying to do. Since that post, I’ve reworked my prototype into a framework, tested it, and made it easier to work with. I’m using the framework in two iPhone projects (and soon a third), and it has greatly simplified my life when it comes to Core Data…

“Simplified”, “Core” and “Data” certainly are three words that go well together, particularly in that order, don’t you think?


On The Usefulness of Core Data’s user info

Core Data and Threads, Without the Headache

Smarter and More Reusable Core Data

More bugs in NSFetchedResultsController

Saving JSON to Core DataHandling Incoming JSON Redux

Managing Information with CoreData

How To Use Custom Classes With Core Data Without Fear

Core Data Quick and Easy!

Transient Properties in Core Data

Transient Entities and Core Data

Core Data and the Undo Manager

Autosaving Core Data managed object context

Parent Watching Its Child

Five Lessons Learned from Migrating to iOS Core Data


Magical Record: how to make programming with Core Data pleasant

Let’s Be Friends. Core Data Relationships

Core Data, a couple of tips

Importing and Displaying Large Data Sets in Core Data

Core Data Queries Using Expressions

Temporary Storage In Apple’s CoreData

Using Core Data with iCloud

Seeding CoreData databases with ruby

Getting Started with Mogenerator

Full Featured Automatic Core Data Class Generator

Accessing An API Using Core Data’s NSIncrementalStore

Save Core Data Asynchronously

blindingskies/BSFetchedResultsController for post fetch filtering and sorting

Getting Started With Core Data In iOS 5 Using Xcode Storyboards

Core Data in iCloud + QuickLookiCloudCDTPlugin

Core Data Image Caching

Core Data on iOS 5 Tutorial: How To Preload and Import Existing Data

Creating a CoreData Model in Code

Unit Testing With Core Data

ObjectiveREST: A simple project to provide REST capabilities to CoreData applications

Using the AWS Persistence Framework for Core Data

NSIncrementalStore – The future of web services in iOS / Mac OS

Accessing an API using Core Data’s NSIncrementalStore

Under the Sheets with iCloud and Core Data: The Basics

Importing Data Made Easy + Handling Incoming JSON Redux

Tool: Slick Core Data Editor With Objective-C Code Generation

Core Data Migration Woes with Binary Data and External Storage == Data Loss

Debugging Core Data Objects

TICoreDataSync – synchronize via Dropbox, iDisk, WebDAV and more

Core Data Made Easy: Some Code + Practices for Beginners and Experts

Core Data on iOS 5 Tutorial: How To Work with Relations and Predicates

CoreData + AFNetworking = AFIncrementalStore

Lightweight Objective-C Active Record Implementation For Managing Core Data Objects

How To Store and Display Images in a Core Data iPhone App

Rack::CoreData – Automatically generate REST APIs for Core Data models

Multi-Context CoreData

Core Data Growing Pains – Nested context issues

BWObjectMapping – JSON to NSManagedObject

How To Synchronize Core Data with a Web Service – Part 1 and Part 2

iOS Quick Tip – Viewing Core Data’s Generated SQL

iOS 6 Tutorial Series: Syncing CoreData Across Devices Using iCloud

NSFetchRequest+Explain allows debugging NSFetchRequests and NSPredicates in visual way

Core Data Migration – Standard Migration Part 2: Migration Boogaloo

Optimizing Core Data searches and sorts

NSFetchedResultsController -sectionNameKeyPath Discussion

Under the Sheets with iCloud and Core Data: The Basics and Seeding iCloud and How it Works

App Scaffolding Kit That Automatically Allows You To Sync Your Core Data Apps Online

There is a Bug in the NSFetchedResultsControllerDelegate Documentation and UITableView And NSFetchedResultsController: Updates Done Right

Customizing Core Data Migrations

iOS Library For Automatically Creating CRUD Interfaces (Scaffolding) Using A Core Data Model

nothirst / TICoreDataSync: “Automatic synchronization for Core Data Apps, between any combination of Mac OS X and iOS: Mac to iPhone to iPad to iPod touch and back again.”

Library For Integrating Web Services Turning JSON Data Into Core Data Backed Native Objects

overcommitted/ParcelKit “integrates Core Data with Dropbox using the Dropbox Datastore API.”

Stop Writing Data Parsing Code in Your Apps issue 4: Core Data Overview, Core Data Application, Data Models and Model Objects, Importing Large Data Sets, Fetch Requests, Custom Migrations

Open Source Framework Extending Core Data With Peer-To-Peer Synchronization Options

Introducing Ensembles: Core Data sync the way it should be

Lightweight migration tip from Stack Overflow

A Guide to Core Data Concurrency

cynicalcocoa/cycoredata: “A coredata wrapper with simple rules that make multithreaded reading and writing much more pleasurable.”

Core Data Concurrency Debugging

Core Data Editor Is Now Open Source

Continue Reading →

iOS Media APIs

Excellent post from Matt Gallagher here for anyone working with media APIs:

A history of iOS media APIs (iPhone OS 2.0 to iOS 4.3)

After initially starting with a small set of fairly basic media APIs in iPhone OS 2.0, the APIs and the features they provide have dramatically increased in the past 2 years and provided a rapidly moving target for developers trying to remain current. In this post, I’ll try to summarize all of the different APIs in iOS 4.3 for playing media, when they arrived, what their purposes are, what their limitations are and what it’s been like to remain up-to-date and support new features…

Best succinct yet comprehensive writeup on the subject we’ve seen anywhere, give it a read!

Continue Reading →

Tip: Embossed Text

Here’s a simple method to get that embossed text effect all the cool kids like:

Achieving an Embossed Text Effect With Interface Builder

… Select the label and change the shadow to a white color. Then change the V. Offset setting to positive 1. This will position a white “shadow” one pixel below the text making it appear as though light is glaring off the lower edges of the text border and creating the illusion that the text is embedded into the background…

… The effect can similarly be produced with white or light-colored letters. To do this, instead of using a white shadow with a vertical offset of +1, you would use a black shadow with a vertical offset of -1…

Huh. Thought embossing was a little more complex than that, for some reason. But hey, if that looks good enough, there you go then!

Continue Reading →


If you’re so unfortunate as to have to deal with porting .NET code to the Mac, or if you actually like C# (???) this might be of interest to you:

MonoMac 1.0 is out

Almost a year ago we started building a set of Mono bindings for building native MacOS X applications.

Our original goals were modest: bind enough of AppKit that you could build native desktop applications for OSX using C# or your favorite .NET language. We leveraged a lot of the code that we built for MonoTouch our binding to the CocoaTouch APIs.

During the year, the project picked up steam, we got plenty of contributions to MonoMac and grew beyond the original conservative goals.

In a year we:

Indeed. That’s some enthusiasm there, certainly. Can’t muster up quite that level ourselves, but hey, it’s always nice to know what options are out there!

Continue Reading →


If you’ve got an app that involves images worth printing, you might want to check out the tap2print service:

Why Use Tap2print API?

Tap2print is the only service that provides you with a complete process of ordering print directly from your current and future application screens.

By using the Tap2print API, you can seamlessly allow your users to enjoy the benefits of a print order process, while creating a new revenue stream for current and future applications.

How much does it cost?

Integration with the Tap2print API for you as an application developer is free of charge. The cost for your users depends on the product and the delivery destination. We keep prices competitive and fair.

What kinds of items can be created with your photos using Tap2print?

Currently, we have three product types: Photo accordion, greeting cards and magnets. Additional products will be supported as part of the Tap2print roadmap.

Who earns money here?

Tap2print is based on a revenue sharing model between the application developer, the print service provider and Tap2print. We believe this method increases the motivation of both parties involved in the offering, ensuring a constantly improving product and a continuous high level of service.

That sounds kinda interesting, doesn’t it? If you’d like to see it in action, there’s an app using it here on the App Store, check it out!

Continue Reading →


So no doubt you remember that last ad hoc distribution post where we thought the Hockey framework looked pretty interesting? Well, if you were following @hockeyapp you noticed today

Introducing HockeyKit: a rewrite of Hockey, the iOS Ad-Hoc updater. New UI, more features & basic Android support

Definitely looks worth checking out if you like to run your own betas, code is on github; and if you don’t, apparently there is a hosted service planned with signup landing page here.

Continue Reading →

Tip: Device Console Logging

Did you know that you can access the system console log from an iOS app? We did not know that. Here’s the detailed explanation:

Accessing the iOS System Log

But briefly, the trick is that the Apple System Log facility is present on the device, as you’d probably expect, but you might not have expected that asl.h is in the official SDK if you go browsing about /usr/include … and the chances are pretty good you wouldn’t have expected that apps that use it would get approved by the review team. But as there are shipping apps that use it, apparently it’s totally legit. A logging facility would be pretty handy to build into our ad hoc builds, indeed!

Continue Reading →
Page 40 of 95 «...1020303839404142...»