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
stray
Jun 28, 2005

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

Kekekela posted:

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)
I found a Stack Overflow thread from a couple of years ago on this. Seems your best bets are GNUstep and Cocotron.

stray fucked around with this message at 16:29 on Oct 28, 2011

Adbot
ADBOT LOVES YOU

AlwaysWetID34
Mar 8, 2003
*shrug*
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

AlwaysWetID34 fucked around with this message at 17:58 on Jan 18, 2019

newreply.php
Dec 24, 2009

Pillbug

Ender.uNF posted:

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.

Eh, I'm not sure. I just have one tiny simple app in the Store under my own name, all my other iOS jobs have been consultancy.

They did specifically mention that devs with active apps on the store would be picked first, but for the rest it really was a first come first served affair. My guess is that there were enough active devs to fill the venues, so they applied the first principle to those as well. I reserved my place like five minutes after I got the invite.

e: I can understand how lots of people are pretty mad at getting rejected and I would have been too, because HOLY poo poo is it ever a treasure trove of knowledge. Really the sort of stuff you can't get from checking out poo poo on the web or reading Apple's doc, this looks like getting schooled at a WWDC-level.

newreply.php fucked around with this message at 17:06 on Oct 28, 2011

Kekekela
Oct 28, 2004

stray posted:

I found a Stack Overflow thread from a couple of years ago on this. Seems your best bets are GNUstep and Cocotron.

Yeah, this seems more like something for someone that actually wants to write iOS or OS X stuff from a PC. I've got an MBA at home for that, I just want something to code-doodle in when I'm at work.

BigRedDot
Mar 6, 2008

Ender.uNF posted:

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.

Yup, I got rejected for Austin and worked on an app in the app store as well. Lame.

Doc Block
Apr 15, 2003
Fun Shoe

McFunkerson posted:

I have a project set up in Xcode 4.1. The project builds and functions correctly on my development machine (MacBook Pro running Lion). But when I transfer my app to the machine we need to run it on, it bounces in the dock once and then nothing else.

The target machine is running OS X 10.4.11 server. It has 2 quad core 3 ghz intel xeon processors (Mac Pro 2,1). I'm not sure if it's the age of the OS, that it's server, or the processors that I'm not built for correctly.

In Xcode I'm building for both 32 bit and 64 bit architectures. My Base SDK is 10.6 (the lowest I can go). Valid Architectures are i386 x86_64. The compiler is Apple LLVM compiler 2.1 The Deployment target is set to 10.4.

Can anyone see something that is set up wrong?

If memory serves, in 10.4 GUI apps could only be 32-bit. In OS X 10.4, Cocoa and Carbon were 32-bit only. Only build for 32-bit and see what happens. Also, make your app log its startup progress to a file so you can see exactly where it's having trouble (if it's getting launched at all).

Make really really really sure you aren't trying to use something not present in 10.4.

It used to be that you were given the option to install the 10.4 SDK when you installed Xcode, but not anymore evidently.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Kekekela posted:

Yeah, this seems more like something for someone that actually wants to write iOS or OS X stuff from a PC. I've got an MBA at home for that, I just want something to code-doodle in when I'm at work.

Well, Clang builds on Windows if you just want a compiler. I don't know off-hand if anyone's made an ObjC IDE that builds there.

Kekekela
Oct 28, 2004

rjmccall posted:

Well, Clang builds on Windows if you just want a compiler. I don't know off-hand if anyone's made an ObjC IDE that builds there.

Clang Static Analyzer is perfect, thanks!

AlwaysWetID34
Mar 8, 2003
*shrug*
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

AlwaysWetID34 fucked around with this message at 17:57 on Jan 18, 2019

Doc Block
Apr 15, 2003
Fun Shoe
Sounds like you're going to have to go back to a non-Mac App Store version of Xcode. They've got the option during install to install the OS X 10.4 SDK if I'm not mistaken.

Supporting legacy systems like that is a major PITA. Especially if you're also trying to support more modern systems and features.

OHIO
Aug 15, 2005

touchin' algebra

BigRedDot posted:

Yup, I got rejected for Austin and worked on an app in the app store as well. Lame.

I got into Seattle! I don't know what their criteria is though. I also went to the one in November 2009 if that matters?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

McFunkerson posted:

Thanks for the push in the right direction. With a 32 bit only build I get a crash log.

code:
Symbol not found: __NSConcreteGlobalBlock
Expected in: /usr/lib/libSystem.B.dylib
Some googling tells me it's a problem with the LLVM compiler, and that the fix is to use the gcc compiler. If I use the GCC Compiler it won't build because GCC 4.2 requires build target of 10.5 or later. I guess I'd need GCC 4.0 but that isn't available. So apparently I'm screwed.

Keep searching on __NSConcreteGlobalBlock, there's a bunch of stuff about it that's more varied than "change the compiler" but I don't know what's relevant for you.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
10.4 doesn't support blocks; the runtime support just isn't there. I mean, technically there are a couple things you can do with them, like pass them around (but not to any system functions, which do not exist) and never copy them ever, but if you're doing anything interesting at all, you will see failures. If you need to deploy back to 10.4, you must not use blocks.

There are workarounds if you really want to pretend that blocks exist there, but the better answer is that 10.4 is a really old OS at this point, and OS upgrades are not that expensive.

double sulk
Jul 2, 2010

Can someone explain why linking windows is so unbelievably loving difficult? I'm trying to create a main window for this map application the book wants me to make because I'd rather just learn how to make the window than use their hacked file. I keep getting errors saying that the nib was loaded but no view was set.

http://www.iphonedevsdk.com/forum/iphone-sdk-development/2180-loaded-nib-but-no-view-set-error.html

http://www.makebetterthings.com/iphone/where-is-mainwindow-xib-in-xcode-4-2/

I tried all of the solutions here. I linked the app delegate to the window as its delegate, set the window as the view controller/changed the class as it mentions, and I tried modifying various lines in the actual code. Nothing works. It's late and I'm just going to go to bed, but I'm really loving frustrated with how illogical this poo poo can be sometimes. Maybe MVC is just a really confusing thing that I'm simply not getting, or I'm (once again) doing something horribly stupid, but I'm following the instructions that people said helped resolve their issues and it's just not working.

I don't want to quit on this poo poo, but it's becoming absolutely infuriating at how some of Objective-C/the Framework's design works, and Xcode doesn't seem to do much to help you. It's not helping my case for not trying to work with C# instead. Perhaps I should just try their hack or simply skim over the rest of the map app chapter I'm on and move on until I follow the book's later guides to creating windows and the like. Who knows. (Sorry in advance for the rant. I'm just really frustrated.)

OHIO
Aug 15, 2005

touchin' algebra

Sulk posted:

Can someone explain why linking windows is so unbelievably loving difficult? I'm trying to create a main window for this map application the book wants me to make because I'd rather just learn how to make the window than use their hacked file. I keep getting errors saying that the nib was loaded but no view was set.

http://www.iphonedevsdk.com/forum/iphone-sdk-development/2180-loaded-nib-but-no-view-set-error.html

http://www.makebetterthings.com/iphone/where-is-mainwindow-xib-in-xcode-4-2/

I tried all of the solutions here. I linked the app delegate to the window as its delegate, set the window as the view controller/changed the class as it mentions, and I tried modifying various lines in the actual code. Nothing works. It's late and I'm just going to go to bed, but I'm really loving frustrated with how illogical this poo poo can be sometimes. Maybe MVC is just a really confusing thing that I'm simply not getting, or I'm (once again) doing something horribly stupid, but I'm following the instructions that people said helped resolve their issues and it's just not working.

I don't want to quit on this poo poo, but it's becoming absolutely infuriating at how some of Objective-C/the Framework's design works, and Xcode doesn't seem to do much to help you. It's not helping my case for not trying to work with C# instead. Perhaps I should just try their hack or simply skim over the rest of the map app chapter I'm on and move on until I follow the book's later guides to creating windows and the like. Who knows. (Sorry in advance for the rant. I'm just really frustrated.)

Will you post your "applicationDidFinishLoading" method?

AlwaysWetID34
Mar 8, 2003
*shrug*
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

AlwaysWetID34 fucked around with this message at 17:57 on Jan 18, 2019

Doc Block
Apr 15, 2003
Fun Shoe
edit: whoops

Doc Block fucked around with this message at 18:43 on Oct 29, 2011

Doc Block
Apr 15, 2003
Fun Shoe

McFunkerson posted:

Thanks for the additional info. I didn't use blocks in my code, but I did use GCDAsyncSocket for networking so I expect that's where it's coming from.

Upgrading 10.4 isn't really an option right now. One of the main apps we use is still ppc only, when Lion killed Rosetta it killed our ability to upgrade. We'd have to track down a used copy of snow leopard server. It's actually put us in quite a bad position, because we also can't buy new computers and these are heavily used production servers.

This all has to do with automated page pagination for a printing press. We have 1 server that feeds 7 plants and if you ask me it's retarded that we've put ourselves in this position. In fact we make fun of our customers who still use quark 4 and then have their 12 year old computer die because they put themselves in the same position we're in now.

I might have to suggest running my app on a different box, it's not ideal, but it would work.

Yeah, 10.4 doesn't have Grand Central Dispatch.

It would be worth it to upgrade to 10.6, which has most of the niceties of 10.7 but still has Rosetta. You could use blocks, GCD, etc.

A better solution would be to find a replacement for that PPC app, though I'm sure you're well aware of this ;)

Sulk posted:

Can someone explain why linking windows is so unbelievably loving difficult? I'm trying to create a main window for this map application the book wants me to make because I'd rather just learn how to make the window than use their hacked file. I keep getting errors saying that the nib was loaded but no view was set.

http://www.iphonedevsdk.com/forum/iphone-sdk-development/2180-loaded-nib-but-no-view-set-error.html

http://www.makebetterthings.com/iphone/where-is-mainwindow-xib-in-xcode-4-2/

I tried all of the solutions here. I linked the app delegate to the window as its delegate, set the window as the view controller/changed the class as it mentions, and I tried modifying various lines in the actual code. Nothing works. It's late and I'm just going to go to bed, but I'm really loving frustrated with how illogical this poo poo can be sometimes. Maybe MVC is just a really confusing thing that I'm simply not getting, or I'm (once again) doing something horribly stupid, but I'm following the instructions that people said helped resolve their issues and it's just not working.

I don't want to quit on this poo poo, but it's becoming absolutely infuriating at how some of Objective-C/the Framework's design works, and Xcode doesn't seem to do much to help you. It's not helping my case for not trying to work with C# instead. Perhaps I should just try their hack or simply skim over the rest of the map app chapter I'm on and move on until I follow the book's later guides to creating windows and the like. Who knows. (Sorry in advance for the rant. I'm just really frustrated.)

Follow the second tutorial you linked. Worked for me, does it work when you try? Remember, when you change the class names in Interface Builder you have to press enter after you type in the class name, or it won't take.

So when you change the class of File's Owner to UIApplication you have to press ENTER afterwards.

Here is a working test app, made by following your second link.

Doc Block fucked around with this message at 18:43 on Oct 29, 2011

KarmaticStylee
Apr 21, 2007

Aaaaaughibbrgubugbugrguburgle!
I'm pretty sure I know the answer already but is there no way to program for iOS on a Windows machine?

double sulk
Jul 2, 2010

Doc Block posted:

Follow the second tutorial you linked. Worked for me, does it work when you try? Remember, when you change the class names in Interface Builder you have to press enter after you type in the class name, or it won't take.

So when you change the class of File's Owner to UIApplication you have to press ENTER afterwards.

Here is a working test app, made by following your second link.

Relevant to the other post before yours, there were three lines of code in the AppDelegate.m which were screwing with the window. I'm still not so great with self understanding, but it appears Xcode 4.2 was having the delegate allocate a window for itself. I don't know if that's a nuance of 4.2, but the code was automatically placed there. At least it works now, I guess.

Doc Block
Apr 15, 2003
Fun Shoe
I didn't remove any code and it still worked.

As for self it's pretty much the equivalent of C++'s this. It points to the current instance of whatever class the object is. So if you make an object foo that has method bar, and in the code for foo you need to call bar, you'd do
code:
[self bar];
// and can access properties like
self.someProperty = 5;
// or like this if you're like the guy that wrote the BNR book and hate dot-notation
[self setSomeProperty:5];

wolffenstein
Aug 2, 2002
 
Pork Pro

KarmaticStylee posted:

I'm pretty sure I know the answer already but is there no way to program for iOS on a Windows machine?
I saw this on Hacker News earlier this week: http://www.macincloud.com/ I haven't ever used them. Good luck with on-device testing.

But if you do make a decent profit from your iOS apps, you really should buy a Mac Mini or a MacBook Air.

wolffenstein fucked around with this message at 21:47 on Oct 29, 2011

double sulk
Jul 2, 2010

Doc Block posted:

I didn't remove any code and it still worked.

As for self it's pretty much the equivalent of C++'s this. It points to the current instance of whatever class the object is. So if you make an object foo that has method bar, and in the code for foo you need to call bar, you'd do
code:
[self bar];
// and can access properties like
self.someProperty = 5;
// or like this if you're like the guy that wrote the BNR book and hate dot-notation
[self setSomeProperty:5];

I was trying to add the window for delegates from a previous chapter. Xcode had made a window for the project but there's been some odd issues with linking which I mentioned before; someone had linked to a temporary fix which the book's authors posted on their forums. I tried making a new window and it might have been referring to the old one which was being created from within the delegate file using self.

Kekekela
Oct 28, 2004
I'm going through the Stanford online class and there's a point where he adds a ViewController, and has a checkbox option during its creation to make it a TableViewController. It appears that this option is gone from the latest Xcode, so to follow along is it just as simple as creating a regular ViewController and implementing UITableViewController or is this indicative of some deeper chance with the way these things work?

Never mind, I just need to select the super class from the drop down :hurr:

Kekekela fucked around with this message at 15:42 on Oct 30, 2011

Small White Dragon
Nov 23, 2007

No relation.

KarmaticStylee posted:

I'm pretty sure I know the answer already but is there no way to program for iOS on a Windows machine?
Flash CS5 will build iOS apps on Windows, I think.

Kekekela
Oct 28, 2004
My current version of xCode according to its "about" window is 4.1, but when I go to the xCode 4.2 page it says that I've already got it installed and there are no updates showing up in the app store. Any ideas what's going on here?


e: Should I just uninstall/reinstall? Goddamn this is frustrating.

Kekekela fucked around with this message at 17:19 on Oct 31, 2011

Warder
Nov 2, 2004

Kekekela posted:

My current version of xCode according to its "about" window is 4.1, but when I go to the xCode 4.2 page it says that I've already got it installed and there are no updates showing up in the app store. Any ideas what's going on here?


e: Should I just uninstall/reinstall? Goddamn this is frustrating.

If you installed it through the app store, then downloaded the update through the app store, you'll need to run "Install Xcode" again. It will say update rather than install on the button. I did the exact same thing. They don't really make it clear on the app store.

Kekekela
Oct 28, 2004

Warder posted:

If you installed it through the app store, then downloaded the update through the app store, you'll need to run "Install Xcode" again. It will say update rather than install on the button. I did the exact same thing. They don't really make it clear on the app store.

Not really following you. If I go to the developers site it eventually redirects me back to the appstore. The only button there just says "Installed" and does nothing if I click on it.

I don't have any local program that says "Install Xcode" unless its just hidden somewhere that I'm not seeing it.

Cylon Dinner Party
Dec 2, 2003

bored now.

Kekekela posted:

Not really following you. If I go to the developers site it eventually redirects me back to the appstore. The only button there just says "Installed" and does nothing if I click on it.

I don't have any local program that says "Install Xcode" unless its just hidden somewhere that I'm not seeing it.

Install Xcode should be in Applications now iirc.

Kekekela
Oct 28, 2004

Cylon Dinner Party posted:

Install Xcode should be in Applications now iirc.

Oh hell yes, there it is...naming my first born after you.

Ireland Sucks
May 16, 2004

I'm mixing C++ and Objective C because I'm a bad person and have had a nightmare of a time after upgrading some of the libraries I'm using as well as XCode, but after multiple reinstalls the problem I am left with is this:

C++ class declarations using NSObject as a base
code:
class myClass: NSObject{    
are giving the error 'Base specifier must name a class', yet in my Objective C files the
code:
@interface myClass:NSObject{
is working all hunky-dory, and yes I am importing foundation. I'd downgrade back to an earlier XCode (I think I was using the last 3.* before and it worked) but I'm hoping there is a solution that is less of a pain in the rear end than screwing around with the project to compile it. Or rewriting everything into ObjectiveC :cry: I kinda expected Google to come up with something obvious but apparently I've managed to screw up in a way nobody else has.

Is there a setting I need to enable somewhere to make this work?

Ireland Sucks fucked around with this message at 01:50 on Nov 1, 2011

lord funk
Feb 16, 2004

Slave posted:

Is there a setting I need to enable somewhere to make this work?

Just a minor check, but did you make your file .mm instead of .m?

Ireland Sucks
May 16, 2004

Yeah everything is .mm

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
Making C++ classes inherit from ObjC classes is something that technically GCC lets you do, but only accidentally, and it has never actually worked unless you basically do everything yourself. I mean, your objects won't even get a class pointer, and you certainly can't define ObjC methods on your class, so I am skeptical that this was ever useful for you.

Anyway, this is considered old badness, and Clang has never supported it. Your Xcode upgrade probably switched you to using Clang. Technically you can switch back to LLVM-GCC, but please just stop doing this. You really don't have to rewrite the entire world in Objective-C; you can have ivars of arbitrary C++ types (as long as they're default-constructible), you can write arbitrary C++ code in your method definitions, etc. You just can't naively mix the class hierarchies.

Ireland Sucks
May 16, 2004

I really can't explain how it worked before then but it has gone from working to uncompilable. But yeah I guess I'll just have to redo my classes since it looks awful as it is now anyway. Thanks!

shodanjr_gr
Nov 20, 2007
Is there a way to suppress the warning that the Xcode c++ compiler throws when it comes across an "override" keyword? I'm not seeing a warning number in the log to use a #pragma with.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
Is that the "you're using a C++11 feature without turning on C++11" warning? Why don't you just turn on C++11? Otherwise, the Xcode 4.2 compiler should accept -Wno-c++0x-extensions.

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!

I was going to use the 50% Barnes and Noble coupon from Facebook to buy a book tonight. Is the "Learning Cocos2D" book any good, or is it as out of date as the Amazon reviews saw? I'm hoping there's a newer version of the book in the stores.

http://www.amazon.com/Learning-Cocos2D-Hands-Building-Chipmunk/dp/0321735625/ref=pd_sim_b_2

I've been poking around with iOS for about a year but I've been doing everything 'the hard way', without a game library and just using OpenGL.

The other 2 books on cocos2D have even worse reviews so if there isn't a good one, I'll just buy something else.

Doc Block
Apr 15, 2003
Fun Shoe
There's one that seemed decent enough after a quick glance, and it covers Cocos2D 1.0, the latest stable version. I'll look up the name once I'm back at my computer.

edit: the one I was talking about is the one you linked to. Granted, I've only glanced at it, but the book claims to cover Cocos2D 1.0, which as I said is the latest stable version, so I don't know how it could be out of date.

Doc Block fucked around with this message at 01:58 on Nov 4, 2011

Adbot
ADBOT LOVES YOU

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!

Doc Block posted:

There's one that seemed decent enough after a quick glance, and it covers Cocos2D 1.0, the latest stable version. I'll look up the name once I'm back at my computer.

edit: the one I was talking about is the one you linked to. Granted, I've only glanced at it, but the book claims to cover Cocos2D 1.0, which as I said is the latest stable version, so I don't know how it could be out of date.

I was looking at it today and I didn't get it. The game they make in it is kind of silly and I don't really think the examples are that great. I'll give it another look on Saturday, I'm in no hurry to buy if I don't need to.

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