|
Provisioning question! I develop on my work machine, user name <originalname>. I had my provisioning cert all set up, keychain working, etc. There was a work migration to a new domain, and IT changed my user name (same account) to <newname>. I created a new app post migration and created an app id in the developer portal, added the provisioning profile to my keychain, but the organizer is giving me an error, "Xcode cannot find a valid private-key/certificate pair for this profile in your keychain" How do I fix this? revoke my previous provisioning profile and redo the process? EDIT: ALSO! in the simulator, if I run my app, tap the home button, double tap it, and close my app from the fast app switcher, the simulator crashes. Is this a simulator thing, or did I not implement something I should have? Fate Accomplice fucked around with this message at 22:53 on Dec 17, 2011 |
# ? Dec 17, 2011 22:47 |
|
|
# ? May 16, 2024 19:10 |
|
Xcode can't find the certificate you used to create the provisioning profile, so you can either retrieve that key or cut a new provisioning profile. As for the simulator thing, can you tell if it's crashing in your app? Make sure you've enabled breakpoints on exceptions, maybe check the console for messages. I haven't encountered that issue with the simulator that wasn't caused by my app.
|
# ? Dec 18, 2011 00:14 |
|
There are some issues with the simulator in Lion that weren't there before. For example the thing just straight up crashes if you don't disable all typing tools (auto-punctuation, spell check, etc) when typing into text fields. Hopefully they get that sorted out quick because gently caress the two hours I spent thinking there was something wrong with my app before finding out the simulator is just busted.
|
# ? Dec 18, 2011 01:13 |
|
Say, is anybody out there familiar with any computational geometry libs that play nicely with Xcode? Thought I'd try to use CGAL but getting it set up is currently beyond my capabilities :/
|
# ? Dec 18, 2011 07:27 |
|
edit: My original question doesn't make a terrible amount of sense, because I'm still missing something. Here's what I know
edit again: Circular references ahoy. I still have no idea where they're coming from, but I'm pretty sure I found a CALayer that is not getting fully released. final edit: I found a layer very high up in my layer hierarchy that did not call [super dealloc] in its dealloc. ManicJason fucked around with this message at 00:56 on Dec 21, 2011 |
# ? Dec 20, 2011 04:08 |
|
I'm really new to Objective C, and I'm having an issue with a piece of code I'm trying to write. I'm trying to read a file into a string, and then parse it as a CSV file. If I use this code: code:
code:
|
# ? Dec 22, 2011 16:36 |
|
Khelmar posted:I'm really new to Objective C, and I'm having an issue with a piece of code I'm trying to write. I'm trying to read a file into a string, and then parse it as a CSV file. Why are you using the & operator on err? I didn't think this was typically used in obj C. What happens if you remove it?
|
# ? Dec 22, 2011 16:43 |
|
You need to specify an NSStringEncoding like 'NSUTF8StringEncoding'. Here's a list at the bottom.
|
# ? Dec 22, 2011 16:45 |
|
Kekekela posted:Why are you using the & operator on err? I didn't think this was typically used in obj C. What happens if you remove it? I get: error: Automatic Reference Counting Issue: Implicit conversion of an Objective-C pointer to 'NSError *__autoreleasing *' is disallowed with ARC Strangely, if I put "&" in front of BOTH enc and err, it works fine, although I get a warning: warning: Semantic Issue: Incompatible pointer types sending 'NSStringEncoding **' (aka 'unsigned int **') to parameter of type 'NSStringEncoding *' (aka 'unsigned int *') And I thought usedEncoding meant ObjC would figure out the encoding and then return it to the enc variable (per the NSString reference).
|
# ? Dec 22, 2011 16:58 |
|
quote:NSStringEncoding *enc; I think you don't need * there since its an integer. (which would seem to my novice eye to make sense with the error you're getting)
|
# ? Dec 22, 2011 17:11 |
|
Kekekela posted:I think you don't need * there since its an integer. (which would seem to my novice eye to make sense with the error you're getting) Bingo (and then you do need to use the & with both parameters). The parameter there is asking for the address of an NSStringEncoding variable that it can modify. You're giving it an uninitialized pointer, so rather than pointing at an NSStringEncoding it can modify, you're just giving it a random memory address. You get the EXC_BAD_ACCESS because that random memory address doesn't happen to point to allocated memory.
|
# ? Dec 22, 2011 17:19 |
|
Khelmar posted:And I thought usedEncoding meant ObjC would figure out the encoding and then return it to the enc variable (per the NSString reference). Wow you're right, I'm dumb, sorry.
|
# ? Dec 22, 2011 17:30 |
|
Thanks - that sort of makes sense. I thought the declaration also initialized it, and that all the ObjC types (NS*) needed to be pointer types, which is wrong. Steep learning curve continues! Thanks for all the help!
|
# ? Dec 22, 2011 18:42 |
|
Khelmar posted:Thanks - that sort of makes sense. I thought the declaration also initialized it, This is only true of static and global variables (and I think instance variables in Objective-C objects). Otherwise, uninitialized variables have undefined values, as in, whatever the compiler and runtime feel like putting there, and the compiler makes no guarantees about the value so you should never rely on it. For pointer variables especially, it's a good idea to initialize variables to at least nil just so that you don't attempt to dereference a garbage pointer later on. quote:and that all the ObjC types (NS*) needed to be pointer types, which is wrong. This is true of all objects, but not every type prefixed by NS is an object--it just means it's a symbol vended by Foundation and since ObjC lacks namespaces, they put that prefix there to avoid collisions with symbols defined by other system frameworks or the client's own code.
|
# ? Dec 22, 2011 18:53 |
|
Has anyone worked through assignment two of the current CS193p class? I'm kind of confused conceptually on several things relating to the RPN calculator in general and the entry of variables as well.
|
# ? Dec 22, 2011 22:10 |
|
Kekekela posted:Has anyone worked through assignment two of the current CS193p class? Where do you get the assignments? I am on lecture 13, but I'd love to do the homework. I assume it's somewhere obvious and I am am blind.
|
# ? Dec 22, 2011 23:50 |
|
Lumpy posted:Where do you get the assignments? I am on lecture 13, but I'd love to do the homework. I assume it's somewhere obvious and I am am blind. http://www.stanford.edu/class/cs193p/cgi-bin/drupal/
|
# ? Dec 23, 2011 00:11 |
|
Are there any published ARC performance comparisons? I'm doing some investigation to convince my team to switch our project over to ARC, and it would be helpful if I had some measurements to address any concerns in that area. Edit: has anyone else found the version of the static analyzer shipped with XCode 4.2 to give really poor results? Telling people "the compiler is smart enough to know when retain and release are needed!" would probably be a lot easier if the analyzer weren't giving us a hundred or so obviously incorrect memory management warnings Zhentar fucked around with this message at 21:24 on Dec 23, 2011 |
# ? Dec 23, 2011 20:15 |
|
Both ARC and the static analyzer rely heavily on Foundation naming conventions to reason about ownership of objects returned from or passed into methods. Do you maybe have methods that have "new" or "create" in their names and don't return an owning reference to something, or maybe methods that *do* return a +1 reference and don't have those keywords in their name? You can also give the analyzer some hints using macros like NS_RETURNS_RETAINED or NS_CONSUMED on methods or parameters (http://clang-analyzer.llvm.org/annotations.html).
|
# ? Dec 24, 2011 02:22 |
|
I realized that all of the apparent "false" positives were calling [self.ivar release] rather than [ivar release]. They happen to be equivalent in these cases, but they aren't necessarily, so the analyzer is technically right, it's just confusing as to what the problem actually is. stealth edit: and actually, the analyzer is at least a little clever about the naming conventions. I thoughtlessly added a couple properties that start with copy, and I just get a compiler warning about not respecting naming conventions, without any analyzer errors. Zhentar fucked around with this message at 03:56 on Dec 24, 2011 |
# ? Dec 24, 2011 03:04 |
|
Zhentar posted:I realized that all of the apparent "false" positives were calling [self.ivar release] rather than [ivar release]. They happen to be equivalent in these cases, but they aren't necessarily, so the analyzer is technically right, it's just confusing as to what the problem actually is. It's expecting you to do either code:
code:
|
# ? Dec 25, 2011 01:40 |
|
I want to put a simple little video tutorial window into my Cocoa app, so I'm using QTMovieView from the QTKit framework. It works pretty well, except that the playback controls are the poo poo ones you used to see on QuickTime movies inside browsers a few OS revisions ago. I'd like to instead have the nice floating controls that you see in QuickTime Player and iTunes, but I can't figure out if there's a way to get them without completely reconstructing them myself. I found one forum post saying that you need to recreate them, but I use an app that has built-in video tutorials and has the nice controls. They're identical to the QuickTime Player controls as far as I can tell, down to the glow you get when holding down the mouse on the buttons. I doubt they painstakingly recreated every detail of those controls just for some tutorial videos, but I guess it's possible. Anyone have any experience with this? Edit: Contacted the developer of that app and it turns out they did recreate it from scratch. Pretty lame, Apple should really be better about making standard UI elements available to everyone. I've already meticulously recreated the Safari tab bar, and I don't look forward to having to recreate this too for such a minor feature. dizzywhip fucked around with this message at 06:39 on Dec 26, 2011 |
# ? Dec 25, 2011 07:50 |
|
Cross-posting from the Game Dev Megathread since you guys are prolly the best at this:quote:I'm wondering if it'd be possible to do a Win/OsX/Linux/iOS cross-platform game engine using C++ / OpenGL? Bisse fucked around with this message at 22:35 on Dec 25, 2011 |
# ? Dec 25, 2011 22:32 |
|
Bisse posted:Cross-posting from the Game Dev Megathread since you guys are prolly the best at this: OpenGL ES, which is the only thing available on iOS, lacks some features of standard OpenGL. I'm no expert, but I think you should be able to do more or less what you're planning to do if you stick to OpenGL ES in the rendering code, which I'm fairly sure is a strict subset of OpenGL.
|
# ? Dec 25, 2011 23:28 |
|
PT6A posted:OpenGL ES, which is the only thing available on iOS, lacks some features of standard OpenGL. I'm no expert, but I think you should be able to do more or less what you're planning to do if you stick to OpenGL ES in the rendering code, which I'm fairly sure is a strict subset of OpenGL. Or stick with OpenGL and write some shims for OpenGL ES when you need them, similar to how OpenGL ES 2 implements OpenGL ES 1 on newer iOS devices.
|
# ? Dec 26, 2011 01:32 |
|
ManicJason: See, there are good reasons why ARC just does that for you automatically. Zhentar posted:Are there any published ARC performance comparisons? I'm doing some investigation to convince my team to switch our project over to ARC, and it would be helpful if I had some measurements to address any concerns in that area. We have some internal data that I can't share, unfortunately. I can tell you that some people have seen respectable speedups, which honestly always surprises us, because we were really aiming for "not a significant performance regression". Apparently, insane amounts of stuff end up in the autorelease pool in a typical MRC program. Zhentar posted:Edit: has anyone else found the version of the static analyzer shipped with XCode 4.2 to give really poor results? Telling people "the compiler is smart enough to know when retain and release are needed!" would probably be a lot easier if the analyzer weren't giving us a hundred or so obviously incorrect memory management warnings Just to be clear, ARC and the static analyzer use totally different approaches. The static analyzer tries to track the flow of data through your code and flag things that it feels confident would be bugs if you were following the Cocoa conventions. It's kindof nice and fluffy to think of ARC as simply enforcing that analysis, i.e. inserting retains and releases where otherwise the static analyzer would warn. That could never actually work, though; the static analyzer is heuristic and intraprocedural, and all of its limitations (many of them inherent) would potentially turn into memory bugs. Instead, ARC emits code to enforce local rules like "this variable has an invariant of owning a +1 on the object it points to" and "we got a +1 value back, so we'd better release that at some point soon." Releasing an ivar is a good example of a place where the static analyzer has no idea and just has to assume you know what you're doing.
|
# ? Dec 26, 2011 06:35 |
|
Bisse posted:Cross-posting from the Game Dev Megathread since you guys are prolly the best at this: In addition to what others have said, don't use GLUT. I don't think it's even available for iOS.
|
# ? Dec 26, 2011 09:38 |
|
So, rjmccall, when can we expect C1X support in Clang?
|
# ? Dec 27, 2011 08:38 |
|
I have to admit that I'm disappointed that the language in the documentation makes it sound as if garbage collection won't see further development. In spite of its drawbacks, I enjoyed the simplified accessors and lack of bridging casts between Objective-C and plain C code.
|
# ? Dec 27, 2011 20:16 |
|
Does anyone know any tips / tricks for speeding up tableview scrolling? One of my views has a few UITableView subviews, and it is unholy how slowly they scroll on an iPad 1. (In other news: got an iPad 1 for development!) I've tried setting the backgrounds to solid colors, that didn't do anything. Is there anything about the data source that I can tweak? Right now they're just immutable arrays of strings.
|
# ? Dec 27, 2011 22:42 |
|
Hot optimization tip: try profiling your code instead of blindly guessing what might be slow.
|
# ? Dec 27, 2011 22:54 |
|
Are you sure you're not recreating your cells every time? That's a huge performance hit. Aka use "dequeueReusableCellWithIdentifier:"
|
# ? Dec 27, 2011 23:02 |
|
Thanks.Zhentar posted:Hot optimization tip: try profiling your code instead of blindly guessing what might be slow. Yeah. Turns out I left an animation loop running when it should have been paused.
|
# ? Dec 27, 2011 23:09 |
|
Small White Dragon posted:So, rjmccall, when can we expect C1X support in Clang? Anything you're looking at in specific? Some things, e.g. _Atomic, are at least partially implemented in ToT and will therefore someday appear in a release near you. I haven't been following that standard very closely, I'll admit. Toady posted:I have to admit that I'm disappointed that the language in the documentation makes it sound as if garbage collection won't see further development. In spite of its drawbacks, I enjoyed the simplified accessors and lack of bridging casts between Objective-C and plain C code. I can say that the need for pervasive bridging casts in ARC is a known problem that we want to work on.
|
# ? Dec 28, 2011 05:01 |
|
rjmccall posted:I can say that the need for pervasive bridging casts in ARC is a known problem that we want to work on. I had a feeling that's the case. ARC is amazing technology for a first release, perhaps more polished than garbage collection was in 10.5.
|
# ? Dec 29, 2011 10:39 |
|
I've been having trouble with custom TableViewCells, or specifically, I'm not sure what I'm doing wrong: What I've done: = Storyboard/XIB - "Style" set to Custom - Set up the prototype cell in the Storyboard (Additionally, later in another XIB file with a different CellIdentifier name) - Set the cell's Identifier - Set the cell's class to the custom class created = Code - Create a class that extends TableViewCell - Set up the "cellForRowAtIndexPath" delegate function to look like: code:
Any ideas on what I've messed up, or what isn't being set properly? (Also, the code segment above obviously isn't loading the NIB; I apparently deleted the code I had originally because it didn't work...)
|
# ? Dec 30, 2011 08:59 |
|
Is anyone else developing in flash CS5.1 for the iPhone?
|
# ? Dec 30, 2011 10:37 |
|
thegasman2000 posted:Is anyone else developing in flash CS5.1 for the iPhone? Hiss! boo! Also, did apple relent on this?
|
# ? Dec 30, 2011 14:06 |
|
Pretty sure Flash is ok as of a few months ago.
|
# ? Dec 30, 2011 15:56 |
|
|
# ? May 16, 2024 19:10 |
|
dereekb posted:I've looked through all the examples that I can find, but I still haven't been able to get a custom cell to load... Did you set the table view's data source? Is your code even being called? Set a breakpoint and fire it up.
|
# ? Dec 30, 2011 15:58 |