|
rjmccall posted:Again, I am not disputing and never did dispute that the Objective-C containers are perfectly fine for the vast majority of code. Their performance is sub-optimal but not indecently so, and even if they were unspeakably terrible, most code in the world has no serious performance constraints and only runs into problems due to poor choices at levels far above the choice of container implementation. This is still rather misleading, I'd wager that the container classes are optimized to be reasonably close to optimal given the restrictions and design choices they're under (e.g. dynamic dispatch, switching internal representations for NSMutableArray, etc.). They just do so much extra stuff that you may or may not need / want, that something else might be more appropriate for your usage. But as you say, if you're not doing anything pathological and your N is "reasonable", anything will work. While this post on NSArray may be outdated by now, I still find it very interesting.
|
# ? Nov 18, 2011 14:41 |
|
|
# ? May 15, 2024 14:15 |
|
rjmccall posted:Everyone I know that works on WebKit, including a lot of its technical leadership, would laugh you out of the room for suggesting that their use of C++ is simply a legacy holdover and that they'd be happier if it were written exclusively in Objective-C. The only reason it is in C++ is because it started in C++. If Apple started a web renderer from scratch it would be in Objective C. quote:Defining WebKit out of your sample is silly, because WebKit is one of only a few standard apps that both (1) actually has to work with large amounts of data and (2) cares about the speed of access to them. Stocks could hold its monitored ticker symbols in a linked list and do O(n^3) work on every UI refresh and it would be hardly one user in a million who ever even noticed a slowdown. The size of a typical address book is dwarfed by the number of DOM nodes on google.com. Mail is the only real competitor here, and Mail has serious performance problems with large mailboxes, although I doubt that has anything to do with NSArray. Google Maps is very performant and is not C++
|
# ? Nov 18, 2011 20:23 |
|
If C++ is "like running a chain saw with all the safety guards removed", Objective-C++ must be like trying to juggle that chain saw.
|
# ? Nov 18, 2011 20:38 |
|
Sewer Adventure posted:The only reason it is in C++ is because it started in C++. If Apple started a web renderer from scratch it would be in Objective C. Do you know what rjmccall does?
|
# ? Nov 18, 2011 20:58 |
|
Sewer Adventure posted:The only reason it is in C++ is because it started in C++. If Apple started a web renderer from scratch it would be in Objective C. I find that highly unlikely unless they weren't planning on open-sourcing it. The fact that Webkit is C++ is one of the reasons it's been ported to practically everything.
|
# ? Nov 18, 2011 21:13 |
|
y_y posted:This is still rather misleading, I'd wager that the container classes are optimized to be reasonably close to optimal given the restrictions and design choices they're under (e.g. dynamic dispatch, switching internal representations for NSMutableArray, etc.). They just do so much extra stuff that you may or may not need / want, that something else might be more appropriate for your usage. That's a fair assessment. I didn't mean to suggest that the container classes were particularly poorly implemented given their constraints. Incidentally, looking over the implementations some more, I would caution people (again, I mean people who care about this level of performance) against trying to access NSArrays with CF function calls; the CF functions will just turn around and do a message send when they detect an Objective-C object anyway. I think that article is quite a bit out of date; NSMutableArray seems to be a pretty standard deque now. Sewer Adventure posted:The only reason it is in C++ is because it started in C++. If Apple started a web renderer from scratch it would be in Objective C. Okay, look, I appreciate that you have a lot of loyalty to Objective-C and want to defend it against what you perceive as my unfair slights, but you are not actually contributing anything here besides unsubstantiated claims.
|
# ? Nov 19, 2011 01:21 |
|
rjmccall posted:Okay, look, I appreciate that you have a lot of loyalty to Objective-C and want to defend it against what you perceive as my unfair slights, but you are not actually contributing anything here besides unsubstantiated claims. My point is that Objective C++ is bad.
|
# ? Nov 19, 2011 02:08 |
|
Sewer Adventure posted:My point is that Objective C++ is bad. What does that cite have to do with Objective-C++? And while you're here, care to appeal to any other authorities?
|
# ? Nov 19, 2011 02:52 |
|
If I'm going to start a simple new app, should I use storyboard/arc? I know ARC is available for IOS4, but I'm pretty sure storyboard is not.
|
# ? Nov 19, 2011 04:24 |
|
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.
|
# ? Nov 19, 2011 04:31 |
|
Martytoof posted:I'm actually kind of curious to hear everyone's thoughts on whether a new programmer should learn on ARC or not. Let's just say for the sake of arguing that backwards compatibility isn't an issue.
|
# ? Nov 19, 2011 04:32 |
|
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. Holy poo poo yes. There is no value in typing retainreleaseautorelease ten septillion times. Literally none.
|
# ? Nov 19, 2011 05:13 |
|
Well I wasn't sure if there was any value in understanding memory management in (as) depth anymore. I've only gone through the first lecture so far and haven't seen whether he's going to bring up the concepts. For that matter, I'm not really sure how important it is to understand what happens behind the scenes anymore aside from "hang onto this" and "if nobody cares about X, we don't care either", so it's cool to hear from people who might have made the change to ARC and know their way around the language more than I do. It's kind of sad how "use it or lose it" programming is for me. I was fairly comfortable with ObjC and Cocoa Touch two years ago, now I'm back at the "drooling babby" stage Also I'm glad to hear Paul teaches with ARC enabled. I wasn't sure if that made the cutoff for this semester. e: Oh my god, this setting in Organizer that lets me use my iPad for development remotely -- does this mean I can debug wirelessly as well? some kinda jackal fucked around with this message at 07:27 on Nov 19, 2011 |
# ? Nov 19, 2011 05:20 |
|
I understand your trepidation, and I'm sure you can find differing opinions, and sometimes it is important to understand what's going on under the hood, but gently caress memory management.
|
# ? Nov 19, 2011 08:44 |
|
Is there any way to tell Xcode to insert opening braces on their own line? So -(blah)blah:(id)arg { } instead of -(blah)blah:(id)arg { } Don't know how much of a travesty that is, but it's how I've been accustomed to writing code and I think it's much more readable.
|
# ? Nov 19, 2011 23:22 |
|
Martytoof posted:Is there any way to tell Xcode to insert opening braces on their own line? http://stackoverflow.com/questions/392749/xcode-adjusting-indentation-of-auto-generated-braces
|
# ? Nov 19, 2011 23:33 |
|
Thanks. Looks like it might be a pain when it would be easy to adjust to the new method so I might just try to live with it one of the simple solutions doesn't pan out. I came across a bunch of other stackoverflow solutions that were complex but somehow missed this one. e: Followup: Does Xcode not honour sender class definition when dragging an action from storyboard to an implementation? I just dragged one of my UIButtons to my implementation file, told it to use UIButton instead of id as the sender but when it generated code it still declared the sender as id.
|
# ? Nov 19, 2011 23:43 |
|
Just got a (2 GB) X-Code update, I guess they just send down the whole app for every update?
|
# ? Nov 19, 2011 23:45 |
|
Yeah I thought they were doing delta updates. I was pissed when I saw the two-point changelog and a 1.8gb download edit: Weren't some of the previous 4.x updates pushed out as deltas? I know I didn't download 2 gigs a pop every time.
|
# ? Nov 19, 2011 23:51 |
|
Welcome to Apple development enjoy your stay.
|
# ? Nov 19, 2011 23:51 |
|
And don't forget to archive your old SDKs (assuming you still want to compile to them).
|
# ? Nov 20, 2011 00:13 |
|
Its kind of doubly annoying that it doesn't actually update the app, but instead you have to go into apps and run the install.
|
# ? Nov 20, 2011 00:16 |
|
Eh, I don't mind that. I was dicking around in Xcode when I started the update download. I don't want App Store to decide when I should run the update, especially if it's a 2gb download that could take some time. I mean if it was a delta update that was like 100mb then maybe I'd feel better about letting App Store automatically update the devtools right there and then.
|
# ? Nov 20, 2011 00:21 |
|
Martytoof posted:Eh, I don't mind that. I was dicking around in Xcode when I started the update download. I don't want App Store to decide when I should run the update, especially if it's a 2gb download that could take some time. Yeah, I mean I don't mind now that I'm aware of it...I guess I should just say its counter-intuitive the first time you go through it given how the updates for other apps work. When I downloaded the first version after ios5 came out I spent a week trying to figure out why I wasn't seeing the ARC option.
|
# ? Nov 20, 2011 00:42 |
|
What's the best way to do non-Tab View tabs? Those would even be fine. I was thinking of making a row of gradient buttons, then altering their properties (mainly width and if the border is visible) based on which one is 'active'. Like this: Then when I click on a 'tab', I just make the TextView that it's linked to visible (one tab and one text view for each IRC channel).
|
# ? Nov 20, 2011 04:05 |
|
Okay, so I want to make a free version of one or two of my apps to get people to download it and try it, because my sales numbers have gone up for the one app I made a free version of. The problem is that Apple rejected this app because, despite the huge number of Lite/Free versions of things on the app store, it's forbidden. What I want to do is transition the current (paid) version to a $0 price, and allow people to unlock the full feature set through an In-App purchase worth the original price of the app. I don't want to make people pay twice, because that's obviously not fair. Will Apple moan if I figure out a way to have the features unlocked for users who have already paid for the app once? Are there any best practices I should follow for this situation?
|
# ? Nov 20, 2011 18:38 |
|
I just signed up for the paid developer program last night so I can test on the device / release etc. I prefer to plug my phone in as rarely as possible, so I figured I'd set up testflight so I can test my own builds over the air. If I'm doing that, do I still need to go through the provisioning process in the developer portal? I'm trying to follow testflight's setup doc here, http://support.testflightapp.com/kb/tutorials/how-to-create-an-ipa-xcode-4 , but I'm unable to get the archive to build - I get a "Code signing error, profiles don't match a valid key/value pair in default keychain" error. I actually do have a certificate in my keychain that I downloaded and added last night. Any ideas?
|
# ? Nov 20, 2011 20:19 |
|
You need a distribution cert (Provisioning Portal -> Certificates -> Distribution), and then you'll need to add your phone (Provisioning Portal -> Devices -> Upload Devices, pop in the txt file you export from TestFlight), and then you'll need to make an App ID (Provisioning Portal -> App IDs -> New App ID -> enter 'com.yourcompany.*' as the suffix, replace with your actual info), and finally you'll need to make a provisioning profile that combines all this poo poo (Provisioning Portal -> Provisioning -> Distribution -> New Profile, 'Ad Hoc', pick your app ID, pick your device). If/when you push to the app store, you'll usually want unique app IDs for each app you have in the store, but for TestFlight etc. just use the wildcard one above. Also, if you decide to add more devices in the future, just add the devices' UDIDs, edit your existing ad hoc distribution provisioning profile, and download the updated profile. e: forgot the 'add device' step. pokeyman fucked around with this message at 21:21 on Nov 20, 2011 |
# ? Nov 20, 2011 21:17 |
|
PT6A posted:Okay, so I want to make a free version of one or two of my apps to get people to download it and try it, because my sales numbers have gone up for the one app I made a free version of. The problem is that Apple rejected this app because, despite the huge number of Lite/Free versions of things on the app store, it's forbidden. Maybe you could push out one more update before you go freemium, and all that one update does is put a file named paidfor.dat in the app's Documents folder (or adds it to the app's settings, or whatever). Then when you do your freemium update you change it so it instead looks for paidfor.dat and if it's there then you know it's an existing user. Or something along those lines. Doing it exactly like this will be trivially easy for pirates to circumvent, but they're gonna try to get at the paid parts of your app any way you do it.
|
# ? Nov 20, 2011 21:45 |
|
Then if anyone ever reinstalls the app, they're screwed.
|
# ? Nov 20, 2011 22:18 |
|
PT6A posted:Okay, so I want to make a free version of one or two of my apps to get people to download it and try it, because my sales numbers have gone up for the one app I made a free version of. The problem is that Apple rejected this app because, despite the huge number of Lite/Free versions of things on the app store, it's forbidden. I'd probably just send a note to the app store review team and ask. Probably won't get a quick response though. Might be faster to appeal the rejection with an explicit request for a way to do what you're trying to do. And in the meantime, see if you can find any other apps that have done the same thing (if any) and ask their developers what they did.
|
# ? Nov 20, 2011 22:23 |
|
Martytoof posted:e: Oh my god, this setting in Organizer that lets me use my iPad for development remotely -- does this mean I can debug wirelessly as well? Apparently, though I'm having some trouble getting it to work. Someone on StackOverflow has some useful info. e: Success! After following the instructions at the above link, I unchecked then checked the setting in Preferences > General. pokeyman fucked around with this message at 22:52 on Nov 20, 2011 |
# ? Nov 20, 2011 22:49 |
|
Doc Block posted:Maybe you could push out one more update before you go freemium, and all that one update does is put a file named paidfor.dat in the app's Documents folder (or adds it to the app's settings, or whatever). This was the idea I already had, but as you and others bring up, it's reasonably problematic due to reinstallation problems, ease of circumvention, etc. I haven't used the In-App API before, but would this be possible? 1) Create an update to the curent app at the current price which automatically purchases a 0-cost in-app purchase. 2) Create a second update with the desired upgrade interface, which is downloadable for free, which checks for the free in-app purchase created by the version in step 1 OR the paid in-app purchase.
|
# ? Nov 20, 2011 23:09 |
|
No, I don't think so. For obvious reasons, in-app purchases require user approval. In fact, if memory serves, once the app tries to initiate an in-app purchase iOS itself takes over and asks the user if this is what they actually want to do. edit: and even if the API allowed it, it's doubtful that Apple would be OK with a secret in-app purchase even if it was free. Apple has to approve your in-app purchase items too.
|
# ? Nov 21, 2011 00:10 |
|
PT6A posted:This was the idea I already had, but as you and others bring up, it's reasonably problematic due to reinstallation problems, ease of circumvention, etc. Doc Block's right about requiring interaction, but couldn't you add the in-app purchase for $0 and push an update that says "buy this $0 thing if you don't want to pay for the update that comes out in a month", then change the price of the in-app purchase at the same time you change the app price.
|
# ? Nov 21, 2011 01:17 |
|
Or maybe make the app free for a couple weeks, and after that activate the in-app purchase, and hope that everyone upgrades during the grace period.
|
# ? Nov 21, 2011 01:23 |
|
Has anyone had any permissions issues with Xcode since updating to whatever was just released? I'm having a weird issue: But: Please ignore the fact that it's on dropbox in the screenshot. I tested and get the same problem if I start a new project and save it to local disk. This project isn't under source control or anything, not sure where to go with this. e: Disregard, a reboot solved this. GHOST OF STEVE some kinda jackal fucked around with this message at 18:16 on Nov 22, 2011 |
# ? Nov 22, 2011 17:48 |
|
I'm trying to wrap my head around ARC for a new project. I understand reference counting, but I can't find anywhere that states when increments/decrements are performed and whether you can change a strong reference to a weak reference or vice versa. If I have an object with a strong pointer to some other object, and I want to later assign a different object to that pointer, do I need to do anything other than assign the new object via the setter? Will that decrement the old objects count and increment the new objects count? What if I want to assign a new object but change the reference from strong to weak? Is that even possible? Is there a better resource than this?
|
# ? Nov 23, 2011 00:11 |
|
the talent deficit posted:If I have an object with a strong pointer to some other object, and I want to later assign a different object to that pointer, do I need to do anything other than assign the new object via the setter? No. quote:Will that decrement the old objects count and increment the new objects count? Yes. quote:What if I want to assign a new object but change the reference from strong to weak? Is that even possible? No. quote:Is there a better resource than this? Your questions actually have nothing to do with ARC, so I'd start with declared properties as a language construct and then look over memory management and accessor methods.
|
# ? Nov 23, 2011 03:03 |
|
|
# ? May 15, 2024 14:15 |
|
Sewer Adventure posted:The only reason it is in C++ is because it started in C++. If Apple started a web renderer from scratch it would be in Objective C. 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.
|
# ? Nov 23, 2011 09:13 |