Posts Tagged 'Programming'

ColorSense for Xcode

Now here’s a nifty plugin for your colour programming:

ColorSense for Xcode

ColorSense is an Xcode plugin that makes working with UIColor (and NSColor) more visual.

There are many tools that allow you to insert a UIColor/NSColor from a color picker or by picking a color from the screen. But once you’ve inserted it, it can be hard to remember which color you’re actually looking at in your code because you basically just have a series of numbers.

This is where ColorSense comes in: When you put the caret on one of your colors, it automatically shows the actual color as an overlay, and you can even adjust it on-the-fly with the standard Mac OS X color picker…

Screen Shot 2012-09-16 at 11.25.58 AM.png

Pretty neat, huh? Handy functionality and a lovely open source example of how to write an Xcode plugin, too!

h/t: @steipete!

Continue Reading →
1

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

Zyngapocalypse Now

Best. Deconstruction. Ever. of the social gaming genre:

Zyngapocalypse Now (And What Comes Next?)

Significant losses, declining ARPUs, failing mobile acquisitions and shareholder selloffs. A stock price down to $3.01. A product catalog repeating previous mistakes. Media coverage ranging from the mystified to “I told you so”. A vague promise to get into gambling. Last week was miserable for Zynga and, as the bellwether of social games, was not good news for the whole sector. As Zynga goes, so eventually go Wooga, EA Playfish and countless others.

Both inside and outside the walls of Facebook, the story of social games has become one of dead geese and golden eggs, flatlined growth, formulaic games and shady practises. Many warned that the sector was slowing down, but sometimes giants need to fall. It needs to get bad enough before people start to really consider what’s next…

Nicely insightful comments in plentitude as well; if you’re at all interested in game design, most strongly recommend you read the whole thing!

h/t: @justinlbaker!

Continue Reading →
0

EVFaceTracker

Now this is a seriously nifty idea:

Face Tracking

… I thought it would be nice if we could use the front facing camera of a phone for interacting with an app. I had to see if this idea could be implemented.

Since iOS 5 Apple has added a face detection api. My idea was to detect a face and estimate the distance the device is from your face based on the size of the detected face. If the rectangle of the detected face is big, then the device is close to your face, if it’s small, then the device is far away from your face. With a similar technique it is also possible to calculate the angle of the device in relation to the face. This angle is calculated based on how fare the detected face rectangle is away from the center of the screen…

… For implementing face detection in your own application I created a class that can easily be added plus a demo project that changes the zoom level and shadow offset for a text. The only thing you have to do in your application is to add the EVFaceTracker class and listen to a deligate message so that you can react on the rectangle of the detected face.

Pretty cool, huh? Source is on github, check it out!

h/t: ManiacDev!

Continue Reading →
0

JCGridMenu

Here’s a rather nicely executed control for space-efficient options presentation from @joseph_carney:

joecarney / JCGridMenu

This is a simple IOS control that works as a 44x44px menu using rows and columns to show and hide options. It’s not big but it is clever, here is the obligatory screen shot…

jcgridmenu.jpg

Check out the video here to see more capabilities as well as the rather elegant animations. Nice piece of work, yep. Think we’ll drop it right into a video app we needed an elegant way to overlay some controls on, actually.

And Messr. Carney gets a gold medal with oak leaf clusters for the Best. License. EVAR:

Licence

What licence? I built this code for me to solve a problem. It solved my problem. I open sourced as I thought it might benefit the developer community at large.

Use it if you want to use it but don’t come crying to me if it doesn’t work.

If you want to pretend you built it first and start selling it as your own, then grow up and stop being a prick. Nobody wants to buy shit like this, you’ll never be Steve Jobs so wake up and smell the roses.

If you do use it and your app has millions of downloads, all because of the fact that you implemented my menu, then some sort of recognition somewhere would be cool.

Other than that, do with it what you will…

Heh. The WTFPL Non-Prickish Attribution License, we could call it?

Continue Reading →
1

IAP Validation: Beeblex

So no doubt you’ve heard — and if you haven’t, pay close attention! — that IAP cracking is now easily available,

iAP Cracker by urus; it cracks easy dlc/inapp purchases. As long as the game/app doesn’t check the purchase with a server. It uses mobilesubstrate for this: buy something inapp like normal and youll get it free!

and if you haven’t set it up yet, been thinking “Huh, maybe I should get on that Verifying Store Receipts bit, like, now…”

… well, has the Camera Plus dude and friends got a service for you: Beeblex!

IAP validation. Easy and free.

Simple, secure and free IAP validation for iOS apps.

No strings attached. We promise!

Validate receipts securely

Beeblex verifies IAP receipts against Apple’s servers to help prevent receipt spoofing and man-in-the-middle IAP attacks

We use strong encryption and time-limited tokens to make it very hard for an attacker to send fake receipts to your app.

Easy to use

Beeblex is a fully-hosted service. There is no need for you to install server-side software, or rent any extra hardware.

Integration in your app is easy with out SDK—in most cases, you should be able to get going in a matter of minutes.

Free forever

Beeblex is free, and we intend to keep it free. There are no catches, no time limited trials, no limits.

Well, there doesn’t really sound like there’s any downside here, does there now? For those of us who incline to the cynical, be reassured by

Why are you making this available for free?

Frankly, because we can, and because someone should. We develop iOS apps ourselves, and IAP receipt verification is more complicated than it needs to be.

We thought that a service like Beeblex could help developers of all sizes, including ourselves; therefore, we simply created it.

At some point, we plan on adding more for-pay services, but the basic verification service will remain completely free.

The iOS community is just full of such nice people, isn’t it now? SDK is on github, check it out!

UPDATES:

A Ruby Gem/CLI For Easy iOS In-App Purchase Validation On Your Own Server if you really want.

Continue Reading →
1
Page 4 of 82 «...23456...»