Posts Tagged 'iPhone'

Remote Configuration: Ground Control

Here’s a nice start on remote configurability you might look at for adding into your apps:

mattt / GroundControl

Break free of the two-week tyranny of the App Store approval process!

Many developers don’t realize that they are allowed to remotely control the behavior of their app (provided that the application isn’t downloading any new code).

GroundControl gives you a dead-simple way to remotely configure your app, allowing you to add things like feature flags, impromptu A/B tests, or a simple “message of the day”

We’ve got pretty much exactly the same thing as a feature at the day job, and why yes it’s pretty darn handy to be able to patch, extend, or completely replace the functionality and display of a particular app on the fly. Where by “pretty darn handy” we mean “if you buy us a martini or seven and swear to keep silent, boy do we ever have some stories for YOU…” But any-ways, point is here, if there is anything that you can foresee might need changing on your app that doesn’t require new code, it would be very forward-looking of you to consider integrating something along the lines of this piece!

h/t: ManiacDev!

Continue Reading →
0

AGImageChecker

Now this looks like a downright lifesaver for all those of you who oversee a framework that powers a dozen team apps and counting with several hundred individual skinned and themed images going into each …

… oh, wait, that’s just us, is it? Well, no matter how many images you need to check, this’ll help:

angelolloqui / AGImageChecker

AGImageChecker is a lightweight iOS library that helps developers to find problems in their used images. It detects when images are smaller or different sized than their container views, producing resized or blurry images. Wrong images will have a colorfull border that helps you to detect them. Additionally, it adds a long press gesture to open an image detail and check useful information about the problem, such as the image size, the view size, the contentMode, the presence of retina version, the associated view controlller,… All of it out of the box, without changing your code (device and simulator)…

Screen Shot 2012-09-29 at 5.55.41 PM.png

That’s some handy diagnostics, indeed.

Speaking of images, if you need some handy placeholders during development, nowhere better to go than {placekitten}

…because everyone’s day is happier with kittens in it!

h/t: @cocoapods!

Continue Reading →
0

Extended Objective-C

Here’s a library of language extensions worth looking into:

jspahrsummers / libextobjc : “A Cocoa library to extend the Objective-C programming language.”

The Extended Objective-C library extends the dynamism of the Objective-C programming language to support additional patterns present in other dynamic programming languages (including those that are not necessarily object-oriented) … libextobjc currently includes the following features:

  • Safe categories, using EXTSafeCategory, for adding methods to a class without overwriting anything already there (identifying conflicts for you).
  • Concrete protocols, using EXTConcreteProtocol, for providing default implementations of the methods in a protocol.
  • Simpler and safer key paths, using EXTKeyPathCoding, which automatically checks key paths at compile-time.
  • Compile-time checking of selectors to ensure that an object declares a given selector, using EXTSelectorChecking.
  • Easier use of weak variables in blocks, using @weakify, @unsafeify, and @strongify from the EXTScope module.
  • Safer private methods, using EXTPrivateMethod, for declaring methods on a class, and getting notified if they conflict with other existing methods.
  • Scope-based resource cleanup, using @onExit in the EXTScope module, for automatically cleaning up manually-allocated memory, file handles, locks, etc., at the end of a scope.
  • EXTNil, which is like NSNull, but behaves much more closely to actual nil (i.e., doesn’t crash when sent unrecognized messages).
  • Synthesized properties for categories, using EXTSynthesize.
  • Algebraic data types generated completely at compile-time, defined using EXTADT.

Some pretty cool stuff there, yeppers. @onExit in particular looks like it remedies the only thing we occasionally miss about C++, stack-declared resource management wrapper classes. Even if you’re not chomping at the bit for any of this stuff though, digging around the implementation mechanics is extremely educational. Lots of material for Truly Evil™ interview questions here, indeed.

h/t: @JSpahrSummers!

Continue Reading →
0

Fingertips: Presentation Mode

This is a slick little helper for if you’re writing software designed to run presentations, or if you want to record some screen tutorials:

developmentseed / fingertips

Fingertips: Presentation mode for your iOS app

Fingertips is a small library (currently, one class) that gives you automatic presentation mode in your iOS app. Note that currently, this is only designed for the iPad 2 and iPhone 4S (or later), which feature hardware video mirroring support. This library does not do the mirroring for you!

Just drop in our replacement UIWindow subclass and your app will automatically determine when an external screen is available. It will show every touch on-screen with a nice partially-transparent graphic that automatically fades out when the touch ends.

Here’s a demo video

Handy if you need it!

h/t: @romainbriche!

Continue Reading →
0

UICollectionView Collection

So if you’ve paid any attention to new iOS 6 stuff at all, you’ve probably noticed that this UICollectionView thing sounds remarkably interesting:

A collection view is a way to present an ordered set of data items using a flexible and changeable layout. The most common use for collection views is to present items in a grid-like arrangement, but collection views in iOS are capable of more than just rows and columns. With collection views, the precise layout of visual elements is definable through subclassing and can be changed dynamically. So you can implement grids, stacks, circular layouts, dynamically changing layouts, or any type of arrangement you can imagine…

Yeah? That kinda strains your credulousness a bit, doesn’t it? Let’s look for a second opinion, shall we?

The Awesomest UI Class I’ve Ever Seen

UICollectionView is spectacular. The combination of a clear interface and incredible flexibility make it an absolute masterpiece of API design. The UIKit engineers who designed it have truly outdone themselves. It is by far my favorite feature of the iOS 6 SDK. Make sure to watch WWDC sessions 205 and 219 if you haven’t yet seen them…

“Awesomest”. “Spectacular”. “Masterpiece”. Don’t hold back, tell us how you really feel. How about a third opinion? A fourth?

… Barely containing excitement. :) ) UICollectionView* stuff is Magic, pure Magic.

… UICollectionView is fucking awesome. It will change the face of iOS apps.

“Pure Magic”. “Fluffily Awesome”. Yes, a concrete degree of enthusiasm can be ascertained there as well. Anyone else?

UICollectionView is possibly the most important enhancement Apple has ever made to iOS’s base control set … Expect to see amazing new UIs in iOS 6 apps that do things with visual data presentation that were never possible before. Expect to see dynamic grids that can be resized, reordered, and visually transformed in imaginative ways…

Well, then. Looks like UICollectionView winds hands down the Industry Achievement Award for “Most Gushing Fanboism Ever Over a Flippin’ API”, indeed. Looks like it’s pretty safe to predict that there’s going to be a lot of people doing nifty stuff with it, and we might as well get a jump on that by collecting the first few introductions to it out of the box here:

First off, if you haven’t got it already, we thoroughly recommend you head over to chez Wenderlich and pick up the iOS 6 By Tutorials book; the two chapters on UICollectionView are worth the price alone if you haven’t been experimenting with it already, and hey there’s 25 other chapters bonus covering pretty much everything significant new there is.

Second off, rather than completely splitting your presentation layer code at iOS 6, you might wish to look into steipete / PSTCollectionView:

Open Source, 100% API compatible replacement of UICollectionView for iOS4.3+

You want to use UICollectionView, but still need to support iOS4/5? Then you’ll gonna love this project. I’ve originally written it for PSPDFKit, my iOS PDF framework that supports text selection and annotations, but this project seemed way to useful for others to to keep it for myself :) Plus, I would love the influx of new gridviews to stop. Better just write layout managers and build on a great codebase.

The goal is to use PSTCollectionView on iOS 4/5 as a fallback and switch to UICollectionView on iOS6. We even use certain runtime tricks to create UICollectionView at runtime for older versions of iOS. Ideally, you just link the files and everything works on older systems…

Ideally, yes. In practice, no doubt this is a good opportunity for collaboration by us all, yes? (h/t: ManiacDev)

It’s even there for people too cool to use Objective-C:

Xamarin: Introduction to CollectionViews

RubyMotion: RubyMotion gets iOS 6, iPhone 5, debugger

And here’s other intros and tips to get you started … which will no doubt become a longer list in the nearish future:

UICollectionView Example (h/t @romainbriche)

How to Use NSFetchedResultsController with UICollectionView (h/t ManiacDev)

UICollectionView Sample code for iOS 6

A simple UICollectionView tutorial

UPDATES:

Example iOS Source Code Of A Customizable Coverflow Container Using UICollectionView

Beginning UICollectionView In iOS 6: Part 1/2 and Part 2/2

LXReorderableCollectionViewFlowLayout for iOS

Sticky Headers for UICollectionView using UICollectionViewFlowLayout

LXReorderableCollectionViewFlowLayout “Extends`UICollectionViewFlowLayout` to support reordering of cells.”

A Springboard-Like Layout With the UICollectionView Class

UICollectionViewWaterfallLayout “This layout is inspired by Pinterest. It also is compatible with PSTUICollectionView.”

How to Add a Decoration View to a UICollectionView

UICollectionView custom layout tutorial

MagrackCollectionView

Deleting cells from UICollectionView via NSNotification

Pinterest-style UICollectionViewLayout for UICollectionView

RFQuiltLayout “is a subclass of UICollectionViewLayout that positions various sized cells like a mason laying bricks.”

MSCollectionViewCalendarLayout ” is very similar to the “Week” view in the Apple Calendar/iCal app.”

UICollectionView Example with UICollectionViewFlowLayout

Workaround to vanilla UICollectionView+UICollectionViewFlowLayout using non-integral origins.

Custom iOS UICollectionViewLayout Modeled After The iCal App

Putting a UICollectionView in a UITableViewCell

mpospese / IntroducingCollectionViews has several samples from a conference talk.

How To Create A Rotating Image Wheel Using UICollectionView

Creating a Paged Photo Gallery With a UICollectionView

Open Source iOS Control For Easily Creating A Flowing Image Thumbnail Grid View

ASCollectionViewController “makes working with NSFetchedResultsController, UIMenuController and UIRefreshControl easier.”

Continue Reading →
0

A PonyDebugger For Princess Coders

So there you were squealing “DADD-EE, I want a PONY for my debugging!” and why look what those super helpful folk over at Square have come up with for you:

PonyDebugger: Remote Debugging Tools for Native iOS Apps

PonyDebugger is a remote debugging toolset that operates as a client library and gateway server combination using Chrome Developer Tools on a web browser to debug an application’s network traffic and data store. We began by implementing an iOS client library to debug our application’s network traffic sent via NSURLConnection and its Core Data stack. To get started, check out the GitHub repository.

Improved network traffic debugging is always handy, although our QA department has been managing to get by with Charles, but wait, what? “And its Core Data stack?”

Core Data Browser

Another cool feature of PonyDebugger is its ability to remotely debug an iOS application’s Core Data stack. By registering managed object contexts, a user can browse all of their entities, properties and drill-down relationships through Chrome’s IndexedDB browser.

coredata-example.png

The great advantage is that it doesn’t require access to nor implementation of an SQLite data store. This means that browsing data is easy, whether through the Simulator or on a real device. There’s also no difference between tracking an in-memory object store or an object store that has a SQLite persistent store, as it interacts directly with an NSManagedObjectContext.

Woah. How does that work?

How It Works

The WebKit Web Inspector, which Chrome Developer Tools is heavily based on, implements a protocol that defines all of the commands, events and types that each debugger “domain” implements. For example, the network debugging feature is implemented by communicating events and commands with Inspector’s Network Domain protocol.

Chrome Developer Tool’s Remote Debugging API exposes and documents (part of) its API for developers to communicate their own data to its developer tools application. We created an iOS client that implements this protocol and communicates a native iOS application’s network requests and managed objects to the developer tools through a WebSocket connection.

Well, that gets our Totally Awesome Award 2012 Edition™ hands down. Well deserved kudos to the authors for their great work and Square for open sourcing it for the rest of us!

h/t: @olebegmann! (And why yes pretty much all the rest of you reading this too, but we saw his tweet first.)

UPDATE:

Tool/Library Providing An F-Script Like Shell For Tweaking iOS Apps Remotely is a nicely complementary tool.

Continue Reading →
1

Tip: Unrecognized Selector Detection

Oooh, this is an extra special helpful tip for those annoyingly untraceable ‘unrecognized selector sent to instance’ annoyances:

Quick and easy debugging of unrecognized selector sent to instance

… All you need to do is pop over to the Breakpoint Navigator, click the + button at the bottom and choose Add Symbolic Breakpoint…

In the Symbol field enter this symbol:

-[NSObject(NSObject) doesNotRecognizeSelector:]

Now when any instance of any object within your program is sent a message to which it does not respond you will be presented with a backtrace that takes you right to the point where that message was sent…

Cool beans! That’s the first time in quite a while we’ve run over something worth adding to our standard breakpoint collection of

malloc_error_break

objc_exception_throw

_NSAutoreleaseNoPool

_objc_fatal

+[NSException raise:format:]

Any other breakpoints on your essentials list, Dear Readers?

h/t: iOS Dev Weekly!

Continue Reading →
1

Smart App Banners

Chances are you idly noted ‘Smart App Banners’ in the WWDC hoopla — oh, you didn’t? Well, to refresh your memory,

… Instead of those annoying overlays that many mobile sites show you to alert you of their mobile apps, Apple will use a more unified system in iOS 6. Instead of these banners, Apple will now show a link to the App Store (or to the app, if you have already installed it) when you open a site that also offers a mobile app. Apple calls this feature “Smart App Banners” …

– and didn’t think further than “well, that’s another mild annoyance smoothed out of the way”, right? Well, actually, they’re smarter than that; not only can they notify your web surfer of the native app, they can deep link into it:

Smart App Banners

… The second kind of problem that the banners solve in a smart way is to actually allowing website makers to deep-link to specific content. Like in the TED example above I’ve opened up a page of an individual video. If I have the TED.com app installed then tapping the banner button should also open up the app to this very same video.

This is achieved by the second (optional) parameter in the tag, named “app-argument”. This has to be a valid URL because it is passed as NSURL into the app, similar to launching the app with a custom URL scheme. Here TED.com simply passes the URL of the video page to the app because this is probably the permalink to this piece of content. Their app will know how to go to the video that corresponds to this URL…

Nifty, huh? Nagging the user to install an app, that’s mostly just annoying, but giving them a good reason to, now that’s useful!

Continue Reading →
0

NimbusKit’s NISnapshotRotation

In case you haven’t bothered watching WWDC 2012 Session 240, it’s one of the more interesting ones:

Go beyond the basics of rotations and learn best practices for getting maximum performance and smooth transitions between interface orientations. See when and how to use rasterization and snapshotting to create gliding animations, gain insight as to how the render server model works, and understand how some of the built-in apps on iOS get their visual effects.

And in case you haven’t bothered implementing snapshot rotation yet, now there’s a convenient Nimbus class for it:

An object designed to easily implement snapshot rotation.

Snapshot rotation involves taking two screenshots of a UIView: the “before” and the “after” state of the rotation. These two images are then cross-faded during the rotation, creating an animation that minimizes visual artifacts that would otherwise be noticed when rotation occurs.

This feature will only function on iOS 6.0 and higher. On older iOS versions the view will rotate just as it always has.

This functionality has been adopted from WWDC 2012 session 240 “Polishing Your Interface Rotations”.

Come to think of it, have we mentioned NimbusKit before? Hmmm … once in passing. But it’s worth another look if you skipped over it then; seems to be developing nicely. And it’s always refreshing to see an open source project that considers documentation worthwhile, isn’t it now?

h/t: @steipete!

Continue Reading →
0

Released: The Kraken

If you’re looking around for an open source 3D engine to mess with, here’s a new option:

Kraken Engine

Kraken Engine is an open source graphics / game engine written in C++ with OpenGL ES 2.0. It targets iOS devices (iPhone, iPad, iPod Touch) and is designed to be cross platform. It supports some features not found in most mobile engines:

  • Per-pixel phong lighting with specular maps, diffuse maps, and DOT3 normal mapping
  • Both forward rendering and deferred lighting pipelines
  • Multiple point and directional lights per scene
  • Post-processing effects such as vignetting and Depth of Field
  • Real-time shadow mapping with PSSM (Parallel Split Shadow Maps)
  • Asset pipeline imports objects, materials and scene graph directly from Autodesk FBX files

krengine-deferred-lighting-5.jpg sample2.jpg

Still under heavy development, but if that looks interesting, check out the code here!

Continue Reading →
0
Page 4 of 90 «...23456...»