Posts Tagged 'Programming'

Shiny buttons redux

As you may recall from before, we’re all about the shiny glossy buttons, and the latest tool in the endless quest for shininess is a particularly nifty one: based on RRGCausticShader an OS X implementation and ported to the iPhone, complete with an app to determine precisely the flavor of shininess to display!

gloss-caustic-shader-screenshot.png

Yes, that there’s some serious shiny control indeed. Source is on github, enjoy!

Continue Reading →
1

NSInvocation+CWVariableArguments

Here’s a neat trick: parsing a variable argument list into an NSInvocation call in order to call an arbitrarily argumented method on the main UI thread.

… Too bad that they are untyped? 
No despair, we know the target object for our invocation, and we know what method to call. So we have what we need to fetch the NSMethodSignature object for the call, that contains all the type information we need to safely process the va_list.

Our target machine is a Mac running 32- or 64-bit Intel CPU, or an iPhone OS device with a 32 bit ARM CPU. Turns out that on both platforms va_list is simply a void* pointer, to the stack frame. Even better va_start() will always flush any argument passed into the register on the stack frame. So we can skip most of the boring argument handling, by treating the arguments like a byte buffer, only advancing and aligning the buffer according to the information in the NSMethodSignature object…

Not too sure that we’d actually recommend this as being a particularly good practice as compared to the conventional process of packing up your arguments in an NSDictionary, but it’s rather interesting code to look through and see just how the variable arguments are reconciled with the NSMethodSignature. Just in case you ever have a good reason to know how!

h/t: LinkedIn’s CocoaTouch!

Continue Reading →
1

Cypress Expansion Board Kit

Ooooh, this is really really nifty: Ever had any desire to do an iPhone hardware accessory? Well, looks like doing so just got a lot easier:

CY8CKIT-023.jpg

The easy-to-use PSoC-based development platform enables highly-integrated modular design of functions such as capacitive touch-sensing, LCD segment drive and much more for traditional iPhone and iPod accessories such as audio docks and speakers, chargers and automotive products. The platform also opens up a new realm of accessories that can leverage the 480 x 320 touchscreen display and many other features of the iPhone and iPod touch for a myriad of markets and applications, including health and wellness, point-of-sale, RFID, and diagnostics and instrumentation tools. Details on the new kit and a video demonstration are available at www.cypress.com/go/cy8ckit-023

Almost enough to make us wish we knew anything about hardware design!

h/t: MacSurfer!

Continue Reading →
2

iPad 3.2 SDK Roundup

So since it looks like we’ll be talking about all the new stuff in the 4.0 SDK very shortly, let’s take a minute here to round up some of the more worthwhile posts on what’s new and exciting in the newly not NDA’d 3.2 SDK for the iPad:

Jumping from iPhone to iPad Development, A Beginners Guide

The Good and the Bad: iPad from a Developer’s Point of View

What’s new in iPhone SDK 3.2

Noticed any others worth a gander, Dear Readers?

Continue Reading →
0

Tutorial: HTML5 iPhone App

Here’s another one in our dribble of  occasional mentions of the offline HTML5 alternative to building iPhone applications, just in case we ever have a problem with App Store restrictions or the need for a cross-mobile-platform deliverable enough to actually get into it:

How to Make an HTML5 iPhone App

… I’ll show you how to create an offline HTML5 iPhone application. More specifically, I’ll walk you through the process of building a Tetris game.

What am I talking about when I say “offline”? Well, it means that we have a custom icon, a custom startup screen, a native look-and-feel, and you can use the app even when the phone isn’t connected to the Internet.

The app should be as functional as it can when it is offline, just like normal native mobile apps.

This is a tutorial specifically for iPhones but most of these techniques apply to all phones that have HTML5-capable browsers…

Thorough walkthrough, easy to follow, covers offline data storage even. Good stuff, good stuff!

h/t: MobileOrchard!

Continue Reading →
1

Tip: Build and Archive

Just in case you missed this in the release notes for the iPhone SDK 3.2 which is final now so go download it, Xcode 3.2.2 has a handy-dandy new ‘Build and Archive’ command which will place your app and .dSYM into ~/Library/Mobile Device/Archived Applications, and list it in a new ‘Archived Applications’ entry under ‘iPhone Development’ in the Organizer window; from where you can run Apple’s initial validation checks if its metadata is on iTunes Connect, submit it directly, or hit the shiny new ‘Share Application…’ button, which will let you either save somewhere or email directly an .ipa file signed with your certificate of choice.

So, with any luck, it’s goodbye forever to those pesky ad hoc build distribution problems, and without needing to resort to workarounds like dsym-archiver. W00t!

Continue Reading →
3

CrashReportSender

OK, today we’ve got something for you that every single iPhone application developer should implement immediately. It certainly would have saved us being reduced to gibberingly apoplectic frustration last year. At least, you should implement it immediately if you’re not absolutely 100% certain that your app will never crash either because of your own code or because of any change in system libraries’ behaviour. Feel free to stop reading now if that’s the case.

Ah, you’re still here. Yes indeed, even if you yourself do happen to be absolutely perfect, those people who left because they trust Apple are pretty silly, aren’t they now? So let us continue.

The immediate problem we’d been faced with was bug reports like this one:

I observed the app crash during [REDACTED]. This occurred when a button was pressed…  [REDACTED] I believe. But I have tried this additional times and have not observed a crash, so it is not easily repeatable.

Those are great, aren’t they? And of course, the idea of a user being able to follow instructions like “please send me the crash report, which you can find after you next sync at this path…”, well that’s just crazy talk. So we decided that for the sake of our blood pressure, we needed to put in some way to get those crash reports directly. And it seems that state of the art in free code to help you out with that is still the long-ago–mentioned PLCrashReporter … but there’s a new twist to it. An awesome twist. On awesome toast. With a side dish of awesome. And that twist would be the CrashReporterDemo project.

Really, it’s quite sadly misnamed indeed, because it’s not just a reporter demo, it’s a complete crash management and automatic feedback system. “And automatic feedback?” you say? Why, yes, indeed, “and automatic feedback”, we said. Like this. Your app crashes, next time it starts the user gets a screen like this (pardon the greenly redacted bits, but this project is still SOOPER SEEKRIT):

CrashReporterCrashed.png

No particularly big deal so far, if still waaaaaaay better than most apps manage. But this, ah this is the awesome part, the user taps ‘Yes’ and nigh on immediately this shows up:

YeahIKnow.png

Woah. Have you ever seen any application do that before? We have never seen any application do that before. That’s just so insanely awesome that “awesome” blushes and hides itself as not being up to the task of adequately conveying its awesomeness. We do so wish we’d had this last summer as the angry emails poured in and the angry one-star reviews piled up and we begged the grinning gargoyles athwart the Apple approval process to p-p-p-please let us publish a four line fix as they sat back on their evil haunches and cackled hysterically at our discombobulation. Alright, perchance we exaggerate somewhat; it may be that their cackling was not actually hysterical. But it felt that way at the time. Not that we’re bitter or anything, mind you. It was an educational experience that poking around the undocumented corners of the SDK is actually not as clever an idea as it may appear at the time. But we digress.

How this project brings the magic is that it includes online PHP scripts to handle the submission — and local support to symbolicate the crash reports on your own machine and send them back up to the server, how awesome is that indeed — sort it by version, and identify them as being a particular “pattern”. And you can set a fix and a fixed version online to that pattern. Like, for the above, this:

CrashReporterPattern.png

and then on the versions screen — which will fill in the future version you note for a fix automatically — set the type of resolution (fixed, submitted to Apple, now available for upgrade, …) and tell it to notify future submitters;

CrashReporterVersions.png

… and then they will get an appropriate alert as shown above.

So yeah, I trust that now you follow where we were coming from when we said this is something that “every single iPhone application developer should implement immediately“. If not sooner. That repository again, you can find it here.

But wait! There’s even more! If setting this up on your own server is too much of a strain — although it’s not that hard, really — it’s available as a free service online at macdevcrashreports.com! Or it will be, anyways; at present it’s in limited signup beta testing. Probably worth signing up with once they go commercial, I’m sure. In the meantime, the open source version works just fine. We’d call out “awesome” again, but “awesome” is running and crying from overuse in the post already, so we’ll just reiterate that this is something we’re going to consider mandatory for any future projects we’re actually going to be tasked with supporting after initial release!

Continue Reading →
3

Monetization: Burstly

So a couple weeks ago, we mentioned a very interesting looking ad management platform called .app/ads? Yeah, they’ve gone and rebranded themselves,

burstly-logo.jpg

so for the sake of easy archive searching after the however long it is until we actually get around to thinking about putting a new ad platform into a project, here’s an update to point you at the all-new, all-wow, www.burstly.com. Very pretty indeed. And Apple developers will have a bit of a chuckle at their documentation library design, no doubt.

Also, check out this good introductory app monetization blog post. From which we also learn that they do see themselves as having a direct competitor, the new to us AdMarvel. Although since AdMarvel is now owned by Opera, one does wonder just how much focus they’re going to be sparing for iPhone development needs.

And see what the press is saying at MobileBeat and at TechCrunch, and this missive from a VC investor. Certainly does look very interesting, and something that looks worth jumping into right away …

… if not for the elephant in the room here, which is what’s reportedly coming from Apple in short order.

It certainly is interesting times on the advertising front!

Continue Reading →
1

Source: SCSegmentedControl

You ever had that problem where you just had too darn many choices to fit into a UISegmentedControl? Well, here’s a solution: make it multi-line!

SCSegmentedControl.jpg

Cute. Maybe stretching the HIG a trifle — but cutely stretching them! It’s part of the TouchCustoms repository on github, which is apparently a collection of kibbles and bits used by ScreenCustoms a duo out of Belarus. Looks like some other goodies in there too if you rummage a bit…

Continue Reading →
2

Source: FJSTransitionController

Here’s a possibly handy piece of source from The Flying Jalapeño Lives — FJSTransitionController! Which is:

Well, FJSTC is a custom “top level view controller” to be used as a replacement for UINavigationControllers and UITabBarControllers. It handles transitions between view controllers, but with more flexibility.

Instead of managing a stack or an array of view controllers, FJSTC manages a Dictionary. You can associate VCs with keys and load them arbitrarily…

That would’ve been kinda handy, well last week actually, when we were putting a bunch (thirty-one, to be exact) of inconsistently hierarchical views into a navigation controller and winding up with hints of inelegance whilst doing so. But hey, it’s working-ish now, although we might consider retrofitting it, since FJSTC includes a few other nifty features like FTUtils-provided animations. If that sounds interesting, source on github and project on codaset!

Continue Reading →
0
Page 62 of 90 «...3040506061626364...»