Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Doc Block
Apr 15, 2003
Fun Shoe
Cocos2D 2.0 is still alpha. Stick to 1.x for now (1.1 should go into Release Candidate status within a few weeks).

Adbot
ADBOT LOVES YOU

chutwig
May 28, 2001

BURLAP SATCHEL OF CRACKERJACKS

Has anyone mucked around much with storyboards yet? I've been working on something that uses performSegueWithIdentifier:sender: to programmatically trigger a segue based on a variable value (value is hardcoded at the moment but will eventually be coming out of Core Data). Doing so programmatically is simply not working; the log statements around performSegueWithIdentifier:sender: fire, but the log statement in viewDidLoad in the destination view controller does not fire. If I hook the segue up to a button and click the button, the log statement in the destination view controller appears as expected.

Does performSegueWithIdentifier:sender: just not work? The documentation on storyboards is really vague or I'm looking in completely the wrong place. I can't even find what delegate to access the object provided in sender: through. In my mind that delegate would be listed in UIViewController's docs somewhere but it's not there or I'm overlooking it.

duck monster
Dec 15, 2004

Echo Video posted:

Out of curiosity, what sort of techniques were you using before?

[[self view] addSubView:blah] mostly.

duck monster
Dec 15, 2004

Doc Block posted:

Cocos2D 2.0 is still alpha. Stick to 1.x for now (1.1 should go into Release Candidate status within a few weeks).

If theres one community generated API I'd love to see Apple cannonise as offical, Cocos2D is it. If your not using Cocos for 2D games, your doing it all wrong.

Although apples convention of ReallyFuckingLongApiNameCallsThatAreImpossibleToRemember is something I can live without.

Evil Trout
Nov 16, 2004

The evilest trout of them all

Doc Block posted:

Cocos2D 2.0 is still alpha. Stick to 1.x for now (1.1 should go into Release Candidate status within a few weeks).

Definitely do not go with 2.0 yet. It's got quite a few issues at the moment. The worst of which is the simulator framerate randomly being locked in lower (say, 20fps or 30). If you close it and restart the simulator a few times, you'll get back to 60.

Shaders are nice to have, but the API is pretty awful in C2.0 so far. Also shader performance is pretty awful with only 2 shader cores.

Cylon Dinner Party
Dec 2, 2003

bored now.
I got Quiz.zip from the BNR forums right before JoeConway deleted it. It works well with Xcode 4.2. So if anyone else needs a copy, just holler.

Heisenberg1276
Apr 13, 2007
Is there a way of forcing a Framework to load? Right now I'm writing an app using VLCKit and the first time the video playing window shows there is a noticeable delay as the framework is loaded. Is there a reasonable way of forcing the framework to load at an earlier point (while the user is busy doing other things and so won't notice)?

bumnuts
Dec 10, 2004
mmm...crunchy

Cylon Dinner Party posted:

I got Quiz.zip from the BNR forums right before JoeConway deleted it. It works well with Xcode 4.2. So if anyone else needs a copy, just holler.

What is Quiz.zip?

LP0 ON FIRE
Jan 25, 2006

beep boop
I've been trying to add a new enterprise build to an iPad from Xcode for testing, and I'm getting a CodSign error that's driving me crazy from wasting hours on this: "code signing is required for product type 'Application' in SDK 'iOS 5.0'"

I've set all my code signing identities to the name of the certificate downloaded from the portal. The provision is associated with it. I deleted the provision on the device and resynced and build but I'm still getting the error. On the portal it says under certificates "We are performing maintenance on the WWDR Certification Authority. All certificate requests will remain in pending status until maintenance is complete, at which time all pending requests will be automatically processed." which I'm not sure if that's causing the problem.

In my info.plist i changed the bundle identifier to what is shown in the portal in App ID's under the description column with the * symbol.

stray
Jun 28, 2005

"It's a jet pack, Michael. What could possibly go wrong?"
I think I'm actually getting dumber.

OK, I have a big plist. Here's what it looks like:



I've expanded the first record so that you can see what's inside each one. The others are structured the same and there are about 80 records in the plist in total.

What I want to do is to create a designated initializer that take an NSString as an argument. It will then look in the plist for the record that matches the NSString and create a Branch object (subclassed from NSObject) from that record. (Branch's ivars correspond to each of the fields in the record.)

I've tried some of the code people have suggested, but I just can't seem to get the object to actually work! All I get is (null). Can anyone show me how to do this?

stray fucked around with this message at 02:46 on Oct 26, 2011

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

DBFT posted:

Is there a way of forcing a Framework to load? Right now I'm writing an app using VLCKit and the first time the video playing window shows there is a noticeable delay as the framework is loaded. Is there a reasonable way of forcing the framework to load at an earlier point (while the user is busy doing other things and so won't notice)?

Run some code from it; even something like [SomeVLCClass class] should be fine.

frogbs
May 5, 2004
Well well well
In the opinion of this thread, what would be the best way for someone who has very little programming experience (mostly PHP and visual basic from back in the day) to get into iPhone development? Should I start with C or C++ and then go to Objective C, or should I just find a good beginning book on objective C and start from there?

Or, alternatively, is there an iPhone development book out there for the TOTAL beginner?

dereekb
Nov 7, 2010

What do you mean "error"?
I've got the same question as frogbs, except I've programmed quite a bit C#/Java, (and a "decent" amount of C++), and am wondering if there are a few easy resources that outline the differences.

I remember when starting with C#/XNA, I went through a lot of sample code and applications; is that a good way to get used to Objective-C/Cocoa too? Any recommendations on where to start in that regard, specifically some simple 2D games and/or simple apps that help show the syntax of it all? (I've already started poking at google, but maybe you guy's have a go-to website or something :shobon:)

Zhentar
Sep 28, 2003

Brilliant Master Genius
Last thread I saw From C++ to Objective-C posted a few times. Coming from a similar background, with "decent" familiarity with C++, I found it very useful for understanding Objective, and highlighting important differences between my expectations and what I could/couldn't do.

double sulk
Jul 2, 2010

I think you can learn Objective-C without knowing any C or C++. I started picking up Obj-C not too long ago, as I've posted in this thread recently, and I'm still hammering some of its basic concepts into my head as I've always had some issues with object-oriented programming. I have had the benefit of taking a very rudimentary/pathetic course in C++, as well has having screwed around with basic stuff in other languages.

I think the best combination is probably Programming in Objective-C/iOS Programming (The Big Nerd Ranch Guide), as they're the two top books on the market right now that people seem to universally like. Obj-C still strikes me as a language that, while "hot" in the sense that there are obviously tons and tons of apps out there, that the job market for Obj-C programmers hasn't really opened up yet, and as a result there aren't that many texts out there on the language. I've found that both, while having their confusing bits at times, are pretty good at teaching you the ins and outs of the language. The latter, as I posted about a few days ago, has some issues in its recently published second edition due to Xcode 4.2, but apparently only affects the first few chapters. I've been sluggish in getting myself working away with that book, but I like it so far.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

stray posted:

OK, I have a big plist.

[...]

I've tried some of the code people have suggested, but I just can't seem to get the object to actually work! All I get is (null). Can anyone show me how to do this?

Show us the code you're trying to use, and throw a smaller version of the plist up too.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

frogbs posted:

In the opinion of this thread, what would be the best way for someone who has very little programming experience (mostly PHP and visual basic from back in the day) to get into iPhone development? Should I start with C or C++ and then go to Objective C, or should I just find a good beginning book on objective C and start from there?

Or, alternatively, is there an iPhone development book out there for the TOTAL beginner?

Under no circumstances should you start with C++, that will do nothing to help you. I'd skip C and jump right into Objective-C.

You should keep in mind that these are difficult languages to learn with no previous experience, and that's before you engage the huge world of Apple code in iOS. You're facing a long road here, and I'm talking months.

If you want to make a useful app by January, I'd recommend you follow a non-iOS learn-to-program-first path and then come back in a month. If you just want to show your friends that you can make your iPhone's screen turn orange by the end of next week, I guess you can plunk down the $100 and check out some sample code.

Of course, if your heart is set on iOS apps and you can't bear another minute without working on one, follow that feeling. Anything that you will put effort into is better than something you won't.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

dereekb posted:

I remember when starting with C#/XNA, I went through a lot of sample code and applications; is that a good way to get used to Objective-C/Cocoa too? Any recommendations on where to start in that regard, specifically some simple 2D games and/or simple apps that help show the syntax of it all? (I've already started poking at google, but maybe you guy's have a go-to website or something :shobon:)

Reading others' code is always good. Apple has a pile of sample code that should be helpful to you, with an utterly free license so use whatever you find useful.

stray
Jun 28, 2005

"It's a jet pack, Michael. What could possibly go wrong?"

pokeyman posted:

Show us the code you're trying to use, and throw a smaller version of the plist up too.

OK, here it all is, complete with a shortened plist. The only things I've left out are the CPLAppDelegate and CPLMasterViewController files. Let me know if you really need them.

Short version: For the moment, CPLAppDelegate and CPLMasterViewController will load a table view of a list of branches; tap one and it'll load the CPLBranchView for it. The idea, though, is that the default "find a location" screen will use Core Location and MapKit to find the nearest branches, with an "all branches" button that will take you to the list.

I'm trying to figure out how to do this with some reusability, so that you can call up a BranchView from anywhere in the app and all you'll need to know is the shortName of the branch to set up and display the view with that branch's details.

Oh, since you might need this, here's the only part of CPLMasterViewController I think you'll need:
code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    if (!self.branchView) {
        self.branchView = [[[CPLBranchView alloc] initWithNibName:@"CPLBranchView" bundle:nil] autorelease];
	self.branchView.passedShortName = @"Woodson Regional";
    }
    [self.navigationController pushViewController:self.branchView animated:YES];
}

stray fucked around with this message at 17:30 on Oct 26, 2011

Heisenberg1276
Apr 13, 2007

rjmccall posted:

Run some code from it; even something like [SomeVLCClass class] should be fine.

[SomeVLCClass class] didn't do it. I need to figure out the least I can do while still getting it to import I guess...

dereekb
Nov 7, 2010

What do you mean "error"?

Zhentar posted:

Last thread I saw From C++ to Objective-C posted a few times. Coming from a similar background, with "decent" familiarity with C++, I found it very useful for understanding Objective, and highlighting important differences between my expectations and what I could/couldn't do.

pokeyman posted:

Reading others' code is always good. Apple has a pile of sample code that should be helpful to you, with an utterly free license so use whatever you find useful.

Great, just what I was looking for! Thanks for the help.

Just as an misc. question: Are MacBook Airs decent to program on, or would a Mini/MBPro be a better choice?

wolffenstein
Aug 2, 2002
 
Pork Pro
Many developers love their Airs for development. The only complaint is screen resolution, but that's why you can hook it up to an external monitor.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

DBFT posted:

[SomeVLCClass class] didn't do it. I need to figure out the least I can do while still getting it to import I guess...

Then it's more than just loading the framework; there's probably some heavyweight initialization it has to do the first time it needs to load a video.

Small White Dragon
Nov 23, 2007

No relation.

pokeyman posted:

Under no circumstances should you start with C++, that will do nothing to help you. I'd skip C and jump right into Objective-C.
While I agree that C++ is of no use, I disagree with skipping C. Objective C is a superset of C, so knowing C is a useful.

Toady
Jan 12, 2009

I highly recommend knowing C first, especially pointers.

Sewer Adventure
Aug 25, 2004
Here's something I learnt today:
code:
[super class] != [self superclass]
So super is just self that calls methods in the superclass instead? Makes sense I guess.

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

DBFT posted:

[SomeVLCClass class] didn't do it. I need to figure out the least I can do while still getting it to import I guess...

If you are using the AV framework stuff, new up a player with a blank video and send it the prepareToPlay message - that will force the framework to initialize A/V stuff. You don't actually have to play anything or show the player (IIRC).

I do this for Storm Sim on a background thread to get audio initialized quicker.

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

Sewer Adventure posted:

Here's something I learnt today:
code:
[super class] != [self superclass]
So super is just self that calls methods in the superclass instead? Makes sense I guess.


Well super will walk the chain, it doesn't actually have to reference the direct parent of the current class. Could that be what you are seeing?

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Sewer Adventure posted:

Here's something I learnt today:
code:
[super class] != [self superclass]
So super is just self that calls methods in the superclass instead?

Yes. And [self superclass] will return the superclass of the dynamic type of self, so neither technically does what you're probably trying to do, which is to get the class object for the superclass of the class you're currently implementing, although -superclass will probably work just fine in typical application code that's never subclassed.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

rjmccall posted:

to get the class object for the superclass of the class you're currently implementing

How does one do this then? I have no earthly reason to do it, but now I'm curious.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Small White Dragon posted:

While I agree that C++ is of no use, I disagree with skipping C. Objective C is a superset of C, so knowing C is a useful.

I agree it's useful to know, but it's an unnecessary detour when learning. If you're in a rush, you won't bother, and if you're willing to take a time-intensive detour, you might as well go whole hog.

Also, maybe I'm alone, but I find I spend much more time using the 'objective' part than the 'C' part when using Objective-C. Maybe they should learn Smalltalk first?

lord funk
Feb 16, 2004

pokeyman posted:

I agree it's useful to know, but it's an unnecessary detour when learning. If you're in a rush, you won't bother, and if you're willing to take a time-intensive detour, you might as well go whole hog.

Also, maybe I'm alone, but I find I spend much more time using the 'objective' part than the 'C' part when using Objective-C. Maybe they should learn Smalltalk first?

This isn't a bad idea. I went from Processing to OpenFrameworks to iOS. The object part is still what hangs me up the most.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

dereekb posted:

Great, just what I was looking for! Thanks for the help.

Just as an misc. question: Are MacBook Airs decent to program on, or would a Mini/MBPro be a better choice?

Do you need a portable? Hard to beat the combination of an i5, cheap RAM upgrades, SSD+HD, and built in high-res screen you get with an iMac.

Yakattak
Dec 17, 2009

I am Grumpypuss
>:3

Has anyone had any luck copying files from an AFP server on Mac OS X? I've gotten as far as mounting the volume with FSMountServerVolumeSync() however I am stumped as to how to copy files from the AFP volume. Any ideas?

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

pokeyman posted:

How does one do this then? I have no earthly reason to do it, but now I'm curious.

There's no direct way; you'd have to do something like [NSMySuperClass class].

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer
It seems like our iOS5 devices aren't getting push notifications. Anyone have problems with this?

We've been doing push tests to five devices that we have at our desk, all of which have registered with our server. The three that are iOS4.X seem to get the notification, but the iOS5 devices get nothing. We've tried a number of combinations of alert styles in the Settings pannel for notifications and it didn't change anything.

Is there a good process for diagnosing remote notifications issues? Is there any sort of known issue around iOS5 and notifications? I found a lot of complaints on the developer center forums about local notifications, but nothing about our issue.

Heisenberg1276
Apr 13, 2007

Ender.uNF posted:

If you are using the AV framework stuff, new up a player with a blank video and send it the prepareToPlay message - that will force the framework to initialize A/V stuff. You don't actually have to play anything or show the player (IIRC).

I do this for Storm Sim on a background thread to get audio initialized quicker.

That did it, cheers!

newreply.php
Dec 24, 2009

Pillbug
Hey, anyone else attending the iOS5 tech talk in Berlin on tuesday here?

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

newreply.php posted:

Hey, anyone else attending the iOS5 tech talk in Berlin on tuesday here?

I signed up for Austin right when it was available and I have an app in the store but I got rejected. I think Apple is hand-picking people to attend, I don't think it is first come first served or a lottery... So I would guess a lot of people that wanted to go did not get picked.

I know several other people in the same boat and there's been a lot of grumbling about how it was handled.

Adbot
ADBOT LOVES YOU

Kekekela
Oct 28, 2004
Is there any online resource that I can use to hone my Obj-C chops when I'm on a pc? (the closest thing I can think of would be something akin to what jsFiddle is for dicking around with javascript/html although I realize that's a pretty strained analog)

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply