|
Martytoof posted:I'm actually kind of curious to hear everyone's thoughts on whether a "new" iOS programmer should learn with ARC enabled or not. Let's just say for the sake of arguing that backwards compatibility isn't an issue. To my recollection, ARC is enabled by default for new projects. A new iOS programmer will just be learning the pure ownership semantics of strong and weak references rather than the error-prone manual management of ownership through retain/release. If the concern is that someone should be learning the concept of memory management, keep in mind that you didn't free() objects with -release anyway--all you were doing was relinquishing ownership, and the framework decided when it was time to free(). As a bonus, nobody can confuse themselves by calling -retainCount anymore. Toady fucked around with this message at 09:45 on Nov 23, 2011 |
# ? Nov 23, 2011 09:29 |
|
|
# ? May 15, 2024 03:09 |
|
This is so frustrating! Basically, I'm getting this error on my work computer, but not my home computer. Both computers are running XCode 4.2.1 using the exact same files (synched via Dropbox).code:
What gives? I posted more details over at Stack Overflow
|
# ? Nov 23, 2011 15:11 |
|
Anyone have their paydate on Connect yet? Seems a little late. It's my first big payment, so I am a little nervous. It says how much I can expect, like always. Just no date on there yet. I figure it was a 5 week month last month, perhaps that's why. Can't help but think it's normally just a few thousand dollars, though, and this time it's a lot more, and maybe they're trying to find a way not to pay me so much. Paranoia, I am sure.
|
# ? Nov 23, 2011 16:17 |
|
Strict 9 posted:This is so frustrating! Basically, I'm getting this error on my work computer, but not my home computer. Both computers are running XCode 4.2.1 using the exact same files (synched via Dropbox). Try looking in your xib files in a text editor (they're basically XML) and search for "navBar". Maybe you can find something in there. Actually, try looking through all files in your project: grep -R "navBar" /path/to/project
|
# ? Nov 23, 2011 17:00 |
|
Funso Banjo posted:Anyone have their paydate on Connect yet? I don't have a date yet either but I'm not worried. Did you get featured? Congrats!
|
# ? Nov 23, 2011 17:00 |
|
Strict 9 posted:This is so frustrating! Basically, I'm getting this error on my work computer, but not my home computer. Both computers are running XCode 4.2.1 using the exact same files (synched via Dropbox). Clear out your derived data folder. ~/Library/Developer/Xcode/DerivedData. I'm guessing you have an old compiled xib file that isn't getting recompiled and it still has a navBar reference.
|
# ? Nov 23, 2011 17:26 |
|
This is going to be a really dumb question, but what's the deal with having to declare methods in order? Like if I create method one, and in method one I make a call to method two, but method two is physically located below method one in the source, Xcode will throw an error saying that method two isn't declared. I thought the compiler would be smart enough to parse the entire source for a declaration. This is something I'd expect from BASIC. Like I said, I'm sure this is babby's first question, but it seems weird for a compiler that smart to be tripped up by something like that, especially since it bulletproofs every other little thing I do.
|
# ? Nov 23, 2011 17:41 |
|
Martytoof posted:This is going to be a really dumb question, but what's the deal with having to declare methods in order? Like if I create method one, and in method one I make a call to method two, but method two is physically located below method one in the source, Xcode will throw an error saying that method two isn't declared. That's C for you. Declare the methods in a header or class extension, and you can place the method definitions in any order you like.
|
# ? Nov 23, 2011 17:46 |
|
Yeah, I when I used to "know" this stuff I remember placing most of my methods into the header file whether they were intended to be public or private, which I guess was probably a poor design decision. That's probably why I don't remember running into this problem. By class extension you mean the private interface declaration that I can add to the beginning of my .m?
|
# ? Nov 23, 2011 17:56 |
|
Martytoof posted:By class extension you mean the private interface declaration that I can add to the beginning of my .m?
|
# ? Nov 23, 2011 17:58 |
|
Martytoof posted:Yeah, I when I used to "know" this stuff I remember placing most of my methods into the header file whether they were intended to be public or private, which I guess was probably a poor design decision. That's probably why I don't remember running into this problem. By class extension you mean the private interface declaration that I can add to the beginning of my .m? Yes, declared like a category without a name: Class extensions explained
|
# ? Nov 23, 2011 18:02 |
|
Carthag posted:Try looking in your xib files in a text editor (they're basically XML) and search for "navBar". Maybe you can find something in there. Actually, try looking through all files in your project: No luck there unfortunately. This project was created from a new Window based project template, and I definitely never added a navBar, which is part of why this is so confusing. pokeyman posted:Clear out your derived data folder. ~/Library/Developer/Xcode/DerivedData. I'm guessing you have an old compiled xib file that isn't getting recompiled and it still has a navBar reference. Ugh, that sounded like the perfect explanation - still no go though.
|
# ? Nov 23, 2011 18:08 |
|
Thanks for that link. I feel stupid asking such a dumb question but now I'm smarter for it so everyone wins e: Also what's tripping me up is that dragging a target from storyboard to code doesn't declare it in the interface anymore. How does that work? I would have thought that would NEED to be a public method Looks like I have a LOT of reading to do. The more I find out the more I realize how little I understand. some kinda jackal fucked around with this message at 18:14 on Nov 23, 2011 |
# ? Nov 23, 2011 18:08 |
|
Toady posted:FYI: Before you speak so authoritatively on Apple's thought process, you should be aware that you're arguing with someone who works on language implementation. Thanks I didn't realise that appeal to authority was a valid argument
|
# ? Nov 23, 2011 18:13 |
|
To follow up on my issue, if I create a brand new Window-based application, I can build and run it fine. If I create a brand new Window-based application and name it with the same name as the one I'm having trouble with (even in a completely different location), I get the same navBar error. Even after clearing out the DerivedData folder. AHA!. I got it. Had to go to iOS Simulator > Reset Content and Setting. Thanks for pointing me in the direction of reseting though. Strict 9 fucked around with this message at 18:25 on Nov 23, 2011 |
# ? Nov 23, 2011 18:19 |
|
Sewer Adventure posted:Thanks I didn't realise that appeal to authority was a valid argument It is, actually, when the authority is legitimate and has firsthand knowledge. Additionally, clang, libauto, and several other Apple initiated projects are in C++ or incorporate it in some way (iPhoto uses Objective-C++ according to class-dump). Objective-C is not the be-all, end-all of Apple platform development. Too often, people view an engineering data point as a judgement on something. It's nothing more than a stated fact that may or may not be relevant for your particular project. NSArray (and Objective-C in general) is objectively less efficient, but that doesn't mean you shouldn't use it, because productivity/flexibility may be a more important factor than performance, and it usually is. Martytoof posted:e: Also what's tripping me up is that dragging a target from storyboard to code doesn't declare it in the interface anymore. How does that work? I would have thought that would NEED to be a public method I've barely played with storyboards, but if you're referring to target-action, "IBAction" is a design-time feature to let Interface Builder know which methods are actions. It has access to all your source code and doesn't need to follow the visibility rules of a compiler. Toady fucked around with this message at 19:04 on Nov 23, 2011 |
# ? Nov 23, 2011 18:51 |
|
Toady posted:I've barely played with storyboards, but if you're referring to target-action, "IBAction" is a design-time feature to let Interface Builder know which methods are actions. It has access to all your source code and doesn't need to follow the visibility rules of a compiler. Well, sort of. I'm surprised that a method which isn't declared in the public interface can be used as a target for an IBAction because in my understanding it's all done through performSelector: in the end anyway, isn't it? If that's the case wouldn't the selector need to be public? Obviously not because that's not how it happens today, but just one of the many things I have backwards in my head for one reason or another. I'm starting to figure this out, and I have something like two Apple docs on my to-do list which will probably explain exactly why I'm wrong. Part of me wonders how much easier this would be if I never learned this back in the day. Now I'm coming into it with bits and pieces of old information and it's tripping me up a little. Though seeing an app pop from Xcode to my iPad is loving swell and makes the trouble completely worthwhile e: I should add that dragging a target action from my storyboard IB to my INTERFACE file actually does what I was expecting, creates the public method declaration AND the corresponding method implementation. I'm just surprised that dragging a target action directly into my implementation doesn't do the same. some kinda jackal fucked around with this message at 19:23 on Nov 23, 2011 |
# ? Nov 23, 2011 19:19 |
|
Martytoof posted:Well, sort of. I'm surprised that a method which isn't declared in the public interface can be used as a target for an IBAction because in my understanding it's all done through performSelector: in the end anyway, isn't it? If that's the case wouldn't the selector need to be public? No, because Objective-C uses runtime lookup, so it can call any selector on an object regardless of whether or not a method for it was publicly declared at compile-time. Method calls are translated by the compiler into function calls to the Objective-C runtime, with the selector passed as an argument. That the compiler warns you about calling undeclared methods at compile-time is a sanity feature.
|
# ? Nov 23, 2011 19:35 |
|
Martytoof posted:Well, sort of. I'm surprised that a method which isn't declared in the public interface can be used as a target for an IBAction because in my understanding it's all done through performSelector: in the end anyway, isn't it? If that's the case wouldn't the selector need to be public?
|
# ? Nov 23, 2011 19:36 |
|
Martytoof posted:
My guess would be that since the actions are first declared in the .h and then the method implements it, the assumption would be to always drag it into the .h first ( one way only of doing it ) to get all the fun framework stuff. That or they only thought of doing it one way and in testing it will change later as they see people using it.
|
# ? Nov 23, 2011 21:33 |
|
Strict 9 posted:AHA!. I got it. Had to go to iOS Simulator > Reset Content and Setting. Thanks for pointing me in the direction of reseting though. poo poo, sorry, I should've mentioned that part too. I've had exactly what you describe happen to me before with Mac apps, but not with an iOS app, and I didn't map that in my head.
|
# ? Nov 24, 2011 00:25 |
|
This is quite likely a dumb question, so sorry in advance if it is: If an iPhone or iPad game uses on-screen controls in a d-pad configuration (up down left right) and some action buttons, do the devs have to pay royalties to Nintendo/Sega/Whoever has that patent? Or is that somehow handled in the iOS dev agreement with Apple?
|
# ? Nov 24, 2011 16:42 |
|
I took a look through the OP and I didn't see this so I'll ask. I was looking at the 2 kinds of pay dev accounts where one is a personal and one is signing up as a business. At the moment I don't want to make a company with the state and fed just to play with what I am building until I am ready to start rolling in that direction. Is it difficult to transfer ownership of apps in the app store between two accounts if I need to change from personal to corp later? I know I'll have to make a new account when I want to be a business but what can I do with the apps I already have under the personal account? Also this thread is a awesome and I'm learning a lot. Thanks everyone for your explanations to other people's questions.
|
# ? Nov 24, 2011 17:21 |
|
Nope, it's not hard, I don't think it's automated though so you'll have to get in touch with someone at Apple when you want to make the switch. Happens all the time.
|
# ? Nov 24, 2011 18:52 |
|
Martytoof posted:e: I should add that dragging a target action from my storyboard IB to my INTERFACE file actually does what I was expecting, creates the public method declaration AND the corresponding method implementation. I'm just surprised that dragging a target action directly into my implementation doesn't do the same. Presumably, Xcode is just assuming the developer's intention is to not declare the method publicly in the interface. I don't declare IBActions in my headers either, though I do in a class extension. Toady fucked around with this message at 23:44 on Nov 24, 2011 |
# ? Nov 24, 2011 23:42 |
|
Really the only reason to make IBActions public would be for other objects to call your "IBAction" programmatically. Which is arguably in poor taste, but there's nothing stopping you. Interface Builder used to only parse header files right? That's why everyone puts IBActions in headers?
|
# ? Nov 25, 2011 00:29 |
|
pokeyman posted:Really the only reason to make IBActions public would be for other objects to call your "IBAction" programmatically. Which is arguably in poor taste, but there's nothing stopping you. I can't speak for others, but that's why I do it. Is it considered bad practice to not declare private methods anywhere? I do it from time to time, but it obviously results in warnings. Likewise with not casting my app delegate. It works, but I have the nagging feeling that I should stop being a lazy rear end in a top hat about it.
|
# ? Nov 25, 2011 01:40 |
|
Nobody got an answer for my d-pad question?
|
# ? Nov 25, 2011 03:26 |
|
e: actually it seems to just go to a blank storyboard window semi-randomally at various points (like if I run then quit the simulator, drag an action, etc) and I close and reopen the storyboard window to get my view displayed again. Never mind, I think I had an extra storyboard window that it kept flipping to or something...still getting the hang of Mac OS Kekekela fucked around with this message at 16:39 on Nov 25, 2011 |
# ? Nov 25, 2011 15:45 |
|
ptier posted:I took a look through the OP and I didn't see this so I'll ask. You don't need to make a new account, you just call up Apple and say "hey I want to change my personal account to a business account." Then they walk you through the process which takes about a week to ten days, and requires you to fax them your incorporation documents from the state. It costs nothing to go through the transition and the people who answer the phones there are super friendly and informative about what is going on. Your iTunes Connect and provisioning portal accounts will be locked out during the transition process. Any apps you have for sale will stay for sale during the lockout period, but stuff that's presently in review when you start the transition will get thrown out.
|
# ? Nov 25, 2011 18:24 |
|
PT6A posted:I can't speak for others, but that's why I do it. I'd say warnings are bad practice (I tend to toggle a couple from the defaults and then turn on -Werr), but as for pointlessly copying a method signature nobody else ever sees? By all means don't bother. Though if you tend to document your methods where they're declared, as opposed to implemented, that might be a reason to declare private methods in a class extension. As for your app delegate, here's a lazy person's handy trick: code:
|
# ? Nov 25, 2011 22:26 |
|
Switzerland posted:Nobody got an answer for my d-pad question? Your options as I see them are to ask a lawyer or do it anyway and throw in the towel if you get sued. I vote the latter.
|
# ? Nov 25, 2011 22:27 |
|
pokeyman posted:Interface Builder used to only parse header files right? That's why everyone puts IBActions in headers? I don't remember if it parsed .m files or not, perhaps by dragging them over from Xcode.
|
# ? Nov 26, 2011 00:39 |
|
pokeyman posted:As for your app delegate, here's a lazy person's handy trick: Holy poo poo, that's excellent! Thanks.
|
# ? Nov 26, 2011 18:50 |
|
Any suggestions on good ARC tutorials for those who've been at this for a while? Also - anybody have any QA firms they can recommend?
|
# ? Nov 27, 2011 04:32 |
|
Funso Banjo posted:Anyone have their paydate on Connect yet? Last month's payday was 27th of October. And I was informed of the date around the 18th of October. I am seriously a little worried that it's the 27th of November and I don't even have a designated pay date yet. Christmas is coming up, and I think my wife will kill me if I don't get paid fairly soon. You guys still don't have paydate information, too?
|
# ? Nov 27, 2011 13:21 |
|
No payment date here for the whopping $48.80 I am owed this cycle (on the upside it's 26 cents more than last month, I'm on the up and up here!).
|
# ? Nov 27, 2011 16:48 |
|
kitten smoothie posted:No payment date here for the whopping $48.80 I am owed this cycle (on the upside it's 26 cents more than last month, I'm on the up and up here!). Don't they hold payment until you're owed more than $250 in a territory or did they get rid of that?
|
# ? Nov 27, 2011 16:53 |
|
eeenmachine posted:Don't they hold payment until you're owed more than $250 in a territory or did they get rid of that? They got rid of that. Thank god, or my early months would have been even drier than they actually were It was a retarded way to do things.
|
# ? Nov 27, 2011 17:10 |
|
|
# ? May 15, 2024 03:09 |
|
Funso Banjo posted:They got rid of that. Thank god, or my early months would have been even drier than they actually were It made sense back when they sent a wire from every territory separately. You'd lose half your payment in bank fees.
|
# ? Nov 27, 2011 19:24 |