Skip to main content

Posts

iPhone Compiler Fails: No architectures to compile for

Hey guys, I'm trying to implement this in my iPhone app: http://code.google.com/p/core-plot/downloads/detail?name=alpharelease_0.1.zip&can=2&q=&sort=-uploaded . I figured I'd first try to run the sample they provide. I'm attempting to open and compile the project located in /Source/examples/CPTestApp-iPhone/ . It says my base SDK was missing right off of the bat, so I edited the Project settings and the Active Target to use the iOS4 SDK, which I've done before for samples and had work. I'm not sure what to do. I'm running one of the newest Unibody Macbooks, with 10.6.4. Here is my full error: // - start - // Check dependencies [BEROR]No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=i386, VALID_ARCHS=armv6 armv7). // - end - // Thoughts? Thanks! Josh

Testing view helpers

I'm currently working on a Rails plugin used for generating iPhone specific HTML meta-tags. I'm trying to use ActionView::TestCase for unit tests but keep getting the same error. See file contents and error below. Any ideas or help would be much appreciated. test_helper.rb require 'rubygems' require 'test/unit' require 'active_support' require 'action_view' require File.join(File.dirname(__FILE__), '..', 'lib', 'iphone_helper') iphone_test_helper.rb require 'test_helper' class IphoneHelperTest < ActionView::TestCase test 'br' do tag = tag('br') assert_tag_in tag, '<br />' end end error RuntimeError: In order to use #url_for, you must include routing helpers explicitly. For instance, `include Rails.application.routes.url_helpers

Check for private API "usage&rdquo; yourself?

So, we all know Apple forbids using private or undocumented APIs in iOS apps. I have no problem with this, as there are sound technical reasons for why this is a good idea. However, twice now I've had an app rejected for using private APIs, when this was not actually the case. It's not difficult -- the private APIs include symbols like connectionState , setThumbnail , setOrder and so on. Any calls you make to methods named as such will be flagged as a private API use, even if the method being called is something you have defined yourself. For a program doing something with connections, thumbnails or the order of things, the above mentioned method names aren't all that unlikely. Getting rejected for this and having to rename a method and resubmit delays everything by at least a week while you wait for a new review. So is there a way, using nm , class dumps of the iOS frameworks, etc to find out for yourself if your method names conflicts with anything in there? If s

Get launch orientation of iPad app

In my iPad app, I need to run some layout code to set the proper layout depending on the orientation. By default, the layout is configured for the landscape orientation, so in the case that the app starts in portrait mode, I need to take extra action to configure the views properly for display in portrait. In my -application:didFinishLaunchingWithOptions: method, I check the orientation using [[UIDevice currentDevice] orientation] . The problem here is that it always returns portrait even if the app is starting in landscape. Is there any way around this?

Deleting an app in iTunes Connect

Apple has introduced the possibility of deleting an app. Quoting the iTunes Connect guide: If you have created an app in iTunes Connect that you no longer need to see or manage, you can delete it from your iTunes Connect view. Deleting your app will not allow you to re-use your SKU or App Name and you will not be able to restore your app once deleted. So far so good. Then it gets slightly confusing: If you are selling your app to another developer for their own distribution and need to remove it from your iTunes Connect account, we recommend that you use App Delete so the App Name will be freed up for their use. Does this mean that I won't be able to reuse the name in my account, but other accounts will? Has anybody tried this?

Looking for a graph layout framework for iOS

For an iOS application I'm making I need to show groups of elements grouped together according to their type, and different groups of types separated from each other in a nicely done layout. I thought of using an undirected graph, with the grouped nodes all pointing to each other in a sort of circular reference, and then each group as another "meta-graph" with their nodes point at each other in a circular reference as well, hoping that together with a good graph layout framework this could be displayed nicely. Unfortunately, the only framework I keep hearing of is graphviz , but that doesn't seem to have an available port for iOS. So my question is either: Other ideas for how to implement what I need? A good implementation of graph layout for the iOS? An available port of graphviz for the iOS? Update : Please note, I am not looking for graph plotting frameworks, which are the frameworks used to draw graphs and charts (such as pie charts etc)

Try-catch exception handling practice for iPhone/Objective-C

Apologies if this question has already been answered somewhere else, but I could not find any decisive answer when searching on it: I'm wondering when try-catch blocks are to be used in objective-c iPhone applications. Apple's "Introduction to the Objective-C Programming Language" state that exceptions are resource intensive and that one should "not use exceptions for general flow-control, or simply to signify errors." From reading a few related questions here I also gather that people are not often using this method in practice. So I guess the question is: what are the situations when it's appropriate to use try-catch blocks when developing for iPhone/Objective-C and when should they absolutely NOT be used? For example, I could use them to catch beyond bounds and other exceptions when working with objects in arrays. I have a method which performs are few tasks with objects that are passed on in a number of arrays. The method returns nil if an er