Posts Tagged 'Programming'

Dropbox Storage

So remember we looked at cloud syncing and figured the Dropbox option looked like a good one? Well, it does to other people too, and if you’re one of them, here’s a reasonable sounding suggestion for coexisting nicely with all those other people:

Add The Power of Dropbox to Every App

… My proposal, is that we create a folder in the Dropbox root called

.apps

as a central repository for third party app data. From there you use a reverse domain name system similar to your bundle id, but instead of dots, use new directories, and only use lowercase. So keeping with the 1Password example [a file called ".ws.agile.1Password.settings"], they would store their data in

.apps/ws/agile/1password/

This will be consistent for their iPhone, iPad, Android, Mac OS X and Windows clients. All of their 1Password apps will be able to find the data regardless of system being used. Any data that is system specific can be stored further down the hierarchy.

This system should keep everything clean, organized and out of view of the user. Windows users will still see the .apps folder but at least it’s just one folder and it’s name should make it’s meaning clear to most users…

Sure, sounds like a reasonable suggestion to us, we’ll go with that. And you should too!

h/t: @kwigbo!

UPDATES:

From @jessegrosjean, here’s an open source iOS/Dropbox library on github!

Now this is serious Dropbox leverage: Frenzy – The Dropbox powered social network.

Continue Reading →
1

Comic Relief

So, all you developers out there banging away on your apps … check out these videos for a chuckle:

5 New Ways to Build Apps for iPhone, Android and Web Browsers

Five start-ups unveiled services for building mobile applications and Web services this week at DEMO Spring 2011, bringing application development capabilities to the masses – or, at least, to people who lack traditional programming and mobile development skills…

Um, yeah. That’s going to work. Let’s pick a snippet about each, shall we?

… “MobileNation allows anyone to build apps for Android and iPhone. Anyone – you, me, even my mom,” Pedler said. “MobileNation is all browser-based. We don’t use any plug-in technology. Everything is point-and-click, drag-and-drop. There is no programming required.” …

… [Bizness Apps]‘s “Small Business iPhone and Android Apps” service helps customers build apps in 20 minutes and manage them for $40 a month. It also gives businesses the ability to publish those apps to the official iPhone and Android app stores…

… “We have the first commercial platform-as-a-service for HTML5 and JavaScript development,” said [Ajax] CEO Ruben Daniels. “This will impact everyone building cloud, mobile and social apps. Everyone here releasing an app will do so with Cloud9, and do it in half the time.”

… “ApSynth targets development of Web applications, rather than mobile, and provides its own market for users to publish their apps”…

… “Rather than help customers build stand-alone applications, ScreenReach gives them a way to develop “real-time interactive experiences,” which can then be consumed by end users through ScreenReach’s own Screach mobile application…”

Take a read, watch some videos. Be prepared to bounce around between “now where did they get the idea this was going to work?” and “people actually have given them money for this? Seriously?” But perhaps we are too cynical, and one of these will indeed live up to the grandiose expectations delineated above. If so … hey, you heard about it from us first!

Continue Reading →
0

make-fmwk

So speaking of things that it’s annoying to not have in iOS, how about not being able to build our own frameworks? That annoy you? Yep, that annoys us too, there’s a lot of libraries we use commonly like ASIHTTPRequest that just beg to be put into frameworks. Well, here’s the make-fmwk project on github that applies this article on creating one by hand to shell scripting up something kinda-sorta like a framework using a static library and healthy heaps of cleverness. We particularly like this linker trickery:

… this script proceeds as follows:

  a) The script reads a file as input (bootstrap.txt by default), which lists all source files for which linking must be forced.

  b) Each of these source files is then appended a dummy class (whose name comprises the nameof the file to avoid clashes). Both the definitions and the declarations are added to the source files in order to avoid additional header files. A backup of the original source file is made, and the dummy class is appended to the end of the file so that the original file numbers are kept intact. The dummy class itself does nothing more than expose an empty class method.

c) The library is compiled with the modified source code files, then the original files are restored.

  d) A bootstrap source file is created, which repeats the dummy class definitions (since we have no header files for them; class definition consistency is no issue here since we control the whole process). A dummy function is added to call the class method for all dummy classes. This file is saved into the static framework package as is.

When a static framework is then added to a project, the bootstrap code gets compiled as well (thus the term “bootstrap” I introduced). Even if the dummy function it contains is not used, the linker will happily load all dummy classes since their class method is called, which effectively loads the modules they reside in, yielding the desired effect…

Indeed. And they have an example of how to bundle things up using, wait for it, ASIHTTPRequest we mentioned above. So next time we stick that into a project, we’ll give this .staticframework stuff a shot and see if it actually simplifies things any.

h/t: @romainbriche!

UPDATES:

Note from the comments that iOS-Universal-Framework may be a more up-to-datedly functional way of accomplishing this!

If you’re making static libraries in any form, read Universal static library problem in iPhone SDK.

Another take on the subject: jverkoey / iOS-Framework

Continue Reading →
7

Hardware Specs

Ever have trouble remembering what exact hardware is in what iDevice models? Here is a very thorough indeed handy reference page for that:

iPhone, iPad, and iPod Touch Secrets

GPU versions, max cellular speeds, all kinds of tidbits we haven’t seen collected this expeditiously anywhere else. Well worth a bookmark.

And while we’re on the subject of hardware differences … check out this video for demonstration of just exactly how much speeds have increased from the iPhone 2G through the 4G. Striking, indeed.

iPhone 2G/3G/3GS/4 Speed Comparison

h/t: @shashivelur, @gaminghorror!

Continue Reading →
0

Implementing VoiceOver

So do you explicitly support VoiceOver in your apps? Um, well, never have we either. But here is an excellent introduction to it to read:

Adding VoiceOver to Dex

A blind, non-native english speaking user wrote in to say how happy they were with Dex’s support of VoiceOver, an assistive technology in iOS that helps people navigate through apps with sound. I politely wrote back that I’m happy they are happy but I didn’t do anything special to support VoiceOver; however if they had any feedback to let me know. In this blog post I’ll cover what Voice Over is all about and review the few recent additions I made to Dex to make it work even better with VoiceOver…

A lot easier than you’d think! Also note the videos here on the subject.

Also, Matt Legend Gemmell has an extended discourse on Accessibility here:

Accessibility for iPhone and iPad apps

Here’s the deal: if you’ll agree to just read this one article (do it over lunch or while you’re on the bus), I’ll absolve you of any moral obligation to think about accessibility for your software. If you decide to pursue the subject afterwards, that’s great – it’s completely up to you…

as well as offering review services for your accessibility implementations.

Continue Reading →
0

NSAttributedString+HTML

So you annoyed that we have NSAttributedString on iOS these days … but no way to use it conveniently, unlike on the desktop? Well, so is Oliver Drobnik, and unlike us, he’s doing something about it:

UIWebView must die

Almost always when we iOS developers want to display some rich text we are using UIWebView. That’s not by choice, since traditionally Apple did not provide any classes to us being able to show formatted text.

That changed slightly with the iPad, because in 3.2 we got CoreText as well as CATextLayer. CoreText gives us NSAttributedString which is basically a string that can have different attributes for ranges of characters. Those attributes can either be standard ones, like to describe the font, color, size and paragraph format. Or they can be your own arbitrary attributes.

I’ve shown how to programmatically construct these in my previous article on Core Text. The one thing though that is still missing from making CoreText really useful are ways to create attributed strings. Clearly doing it all in code is not feasable.

In this article I am introducing an Open Source project that aims to provide the missing functionality to iOS developers…

Also see this followup article about applying this to developing a commercial rich editing text component.

Now, it would be utterly unsurprising to see the desktop NSAttributedString RTF/HTML/etc. initializers appear in iOS in the nearish future, and hey maybe full rich text editing might not be too much to dream about either … but if you have formatted text display needs today, hey this project looks great!

Continue Reading →
2

CATiledLayer

Excellent introduction to CATiledLayer over at Cocoa Is My Girlfriend today:

Subduing CATiledLayer

… It seems like a magical sort of technology because so much of its implementation is a bit of a black box and this fact contributes to it being misunderstood. CATiledLayer simply provides a way to draw very large images without incurring a severe memory hit. This is important no matter where you’re deploying, but it especially matters on iOS devices as memory is precious and when the OS tells you to free up memory, you better be able to do so or your app will be brought down. This blog post is intended to demonstrate that CATiledLayer works as advertised…

Read and enjoy! With just one caveat; if you intend to use CATiledLayer in 3.x compatible projects, read QA1637 first, or CRASH HORRIBLY. Whichever.

Continue Reading →
0

Sensible TableView

So you want some more help with your table views than the open source tutorials we’ve mentioned here and there? Weeeelll, maybe you want to spend some money — $99, to be exact — and buy Sensible TableView. What do you get for that $99? Quite a bit, reputedly:

This easily is the best iOS TableView framework I’ve ever seen!

… Sensible TableView (STV) is the most comprehensive, fully featured and best designed Table View framework I’ve ever seen. It literally shortens a task that took 4-5 hours in the past to just a few minutes.

As an example, the table view [below] takes roughly five lines of code. That’s it!

stv.png

You don’t have to deal with UITableView’s many delegate methods nor do you have to reinvent the wheel time and again, as STV gracefully handles all of this for you in the background.

The way STV works is pretty unique, too.

It basically takes your Objective-C data transfer objects or – should you use it – your Core Data objects and leverages the Objective-C runtime to learn about their structure and properties. From that information it automagically creates a fully functional, basic Table View Model…

Yep, sounds pretty interesting. If you’ve done any work with it, let us know if you’re as enthralled with it as that fellow!

h/t: @iPhoneDevGuy!

Continue Reading →
0

Mac App Store vs. Download

Trying to deal with Mac App Store vs. direct downloads of your app? Here’s some good thoughts:

This App Is Your App

… This leads to a conundrum if you continue to sell software directly, or offer preview beta releases for direct download. How can you offer access to these releases for customers who purchased through the MAS and thus do not have the “Registration Code” that direct-purchase customers receive? Apple provides no means of determining the identities of, or contact information for, authorized MAS customers. But even though I don’t know who these customers are, I want to treat them as first-class customers in every regard.

For me, I decided that the compromise is to provide, for those MAS customers who want it, full access to the direct-download versions of my software. Today, any customer who buys a MAS edition of my applications will find that, after running that edition at least once, they are automatically authorized to run direct-download versions of the app from that time forward…

Not really what we’d call a good solution … but good solutions are pretty much impossible without some accommodation of this situation on Apple’s part. In the meantime, this is about as good advice as it gets.

UPDATE:

Here’s another excellent article, Mac App Store Guide:

Unfortunately, there’s not much information on how to create a product that can also be distributed through more traditional channels, such as your own product website. This guide will help you update your Xcode projects to make it as simple as possible to create products for both channels simultaneously…

Continue Reading →
0

Cocoa C++ Wrappers

So let’s say that you’re looking at developing an iPhone app that needs to share source with Another Platform, so C++ is the logical common ground; but you’d like to keep your iPhone side written the right way, of course. Here’s a helpful post about wrapping std::vector in an NSArray:

Mixing STL, NSArray and Bindings

I am currently writing a crossplatform library that needed to be quick, small and efficient. The library is a parser for a particular file format that I need to work with. The library needs to work on Mac, Windows, and with Java through JNI.

I thought about using Objective-C for the engine and then using GNU-Step or CocoTron but that has a huge overhead and writing the JNI would be a night mare. I didn’t want to write it in straight C, i wanted to use STL’s strings and collection classes and boost’s smart pointers. So C++ it was.

When writing the Objective-C wrapper and test app I wanted to use Cocoa’s bindings mechanism to quickly display the results. The solution was to wrap the classes, very thinly, using an NSArray wrapper around the vector.

In this article we will walk through writing a thin wrapper around a C++ object that parses lines of text out of stores those lines in a vector of strings. The sample project can be downloaded from here

Another interesting bit here:

Hoard: A Nice Abstraction on Cocoa Collections

… Hoard gives you a super simple way to instantiate collections of any sort, containing data of any type, and then “view” that data as one of several available collection types (including both Cocoa and STL collections). You can also instantiate a hoard from any of the included Cocoa or STL collections…

Any libraries, patterns, or snippets to add here that you’ve found useful in constructing C++/Objective-C core functionality engine bits, Dear Readers?

Continue Reading →
0
Page 40 of 93 «...1020303839404142...»