|
rjmccall posted:If you make a macro around ivar_getOffset, it'll work for an arbitrary type. The more I thought about it, the more I realized it's just my really prissy sense of "pretty code" that's getting in there. As long as they're documented I guess double-casts aren't bad. Cause that was like my main issue, that I had to cast to void and then to brigded id. But each cast makes sense cause I'm pulling this strange YES constant in from outside so yeah. ffs a pagebreak really?
|
# ? Aug 17, 2014 05:27 |
|
|
# ? Jun 8, 2024 07:15 |
|
Snapchat A Titty posted:The more I thought about it, the more I realized it's just my really prissy sense of "pretty code" that's getting in there. As long as they're documented I guess double-casts aren't bad. Cause that was like my main issue, that I had to cast to void and then to brigded id. But each cast makes sense cause I'm pulling this strange YES constant in from outside so yeah. That call is one of those unique snowflakes where a bunch of void casting BS is perfectly reasonable.
|
# ? Aug 17, 2014 14:41 |
|
Besides, isn't it a little late to worry about how pretty the code is? I mean, you're setting the value of an ivar of some object using the runtime, and it's casting through void * that seems gross to you? It's kind of like NSInvocation: passing the index of an argument to -[NSInvocation getArgument:atIndex:], and remembering that indices 0 and 1 are self and _cmd respectively is pretty fragile and makes me uneasy, but hey, if you're using NSInvocation, you probably gave up on "pretty code" a long time ago.
|
# ? Aug 17, 2014 19:59 |
|
I was thinking that I would develop an iOS app that would be a really simple point-of-interest app. It would be somewhat similar to Yelp's layout in that it would have a map with POIs shown in the area along with descriptions (if clicked), basic ratings / comments etc. It seems like this is an extremely common type of interface and before I try to reinvent the wheel on this, is there a framework that can provide a lot of this basic functionality to where I really just need to plugin my own custom locations and descriptions?
|
# ? Aug 17, 2014 20:49 |
|
I've never used it, but I imagine MapKit or whatever it's called is what you're looking for, and best of all it's built into iOS.
|
# ? Aug 17, 2014 21:43 |
|
Malloreon posted:I would read Kochan's book on objective-c, then Big Nerd Ranch + CS193P from stanford. Awesome. Thank you.
|
# ? Aug 18, 2014 01:23 |
|
Nonstop objc_object::release() EXC_BAD_ACCESS all this week. Just a train of them. edit: let cArrayManagement = "suck" lord funk fucked around with this message at 01:29 on Aug 19, 2014 |
# ? Aug 19, 2014 01:19 |
|
lord funk posted:Nonstop objc_object::release() EXC_BAD_ACCESS all this week. Just a train of them. Have you tried turning on NSObject zombies?
|
# ? Aug 19, 2014 01:28 |
|
Doctor w-rw-rw- posted:Have you tried turning on NSObject zombies? It's always C arrays with me. This time it was a range check typo.
|
# ? Aug 19, 2014 01:30 |
|
lord funk posted:It's always C arrays with me. This time it was a range check typo. Please don't tell me you're using C arrays with NSObjects. You're not, right?
|
# ? Aug 19, 2014 02:06 |
|
Doctor w-rw-rw- posted:Please don't tell me you're using C arrays with NSObjects. You're not, right? No. I keep track of values that change constantly to help with data thinning, so it was just an array of doubles. I was writing to index -1, which is why objects were getting garbled.
|
# ? Aug 19, 2014 14:41 |
|
Oh hooray new rotation implementation for iOS 8! Let's keep this party going!
|
# ? Aug 19, 2014 18:06 |
|
Something weird happened - I got a crash report for an app that hasn't been released yet, on a device type that I don't own. But my app's status in iTunes Connect says Waiting For Review. And I only submitted it on Sunday.
|
# ? Aug 19, 2014 18:13 |
|
Doc Block posted:Something weird happened - I got a crash report for an app that hasn't been released yet, on a device type that I don't own. What crash reporting tool are you using? I'm in the market for a new one.
|
# ? Aug 19, 2014 18:18 |
|
Crashlytics. edit: the worst part is, the crash isn't in my code, it's in Cocos2D, in the glSwapBuffers code. Looks like it might be an OS bug.
|
# ? Aug 19, 2014 18:19 |
|
Doc Block posted:Something weird happened - I got a crash report for an app that hasn't been released yet, on a device type that I don't own. Crashes during Apple's testing?
|
# ? Aug 19, 2014 18:27 |
|
Yeah, but it doesn't say that it's In Review. Anyway, it looks like the crash is from Cocos2D trying to draw while the app is in the background It's happened 4 times according to Crashlytics, twice on iPad Mini and twice on iPad Air. edit: it's probably an issue where Cocos2D doesn't stop drawing soon enough when the app gets backgrounded on certain devices. Doc Block fucked around with this message at 18:35 on Aug 19, 2014 |
# ? Aug 19, 2014 18:32 |
|
lord funk posted:Oh hooray new rotation implementation for iOS 8! Let's keep this party going! What subtle issues will be present in this iteration?!? Stay tuned!
|
# ? Aug 19, 2014 18:33 |
|
ultramiraculous posted:What subtle issues will be present in this iteration?!? Stay tuned! viewWillTransitionToSize:withTransitionCoordinator: NS_DEPRECATED_IOS(9_0) viewWillMoveToCoordinator:completionMagician: NS_DEPRECATED_IOS(10_0) willRotateTowardsMecca:timeOfDay: NS_DEPRECATED_IOS(11_0)
|
# ? Aug 19, 2014 19:09 |
|
viewWillTranslateToX:Y:Z:Kata:
|
# ? Aug 19, 2014 19:17 |
|
These are almost more OpenGL thread questions but it's only occuring on iOS, so I figured I'd ask here too. Firstly, I have some skeletal vertex shader code that is flickering the triangles whenever something moves. It looks as if the culling is suddenly backwards, but I have culling turned off and it's still occurring. The vertex data is contained in static VBOs that are specified once and never change, so I really doubt it's a matter of the vertex data itself getting overwritten, either. The triangles attached to bones that don't move in a given frame don't have this problem, and I'm reasonably sure the only thing changing frame to frame is the bone matrices and the overall clip matrix (and sometimes not even that, if I just leave a given object sitting in one spot, unmoving but animating). I doubt it's the shader, either, because I got identical (so far as I could tell, anyway) results when I switched the shader off and used CPU-side bone calculations instead. The part that has me most confused is that this is ONLY occurring so far on iOS 7.x devices (tested an iPad 2, iPad 3, and iPod Touch 5). The same code displays correctly on Android, OSX, Windows, iOS 5.x (I don't have any iOS 6 or 8 devices to test so I don't know on that either way), and the iOS simulator. Secondly, the same overall code base, on iOS 5, is stalling out pretty badly. According to the Instruments tool it's losing a lot of time in glInvalidateFramebuffer (about 6ms per frame), which is a function I'm not even calling directly, so I figure it must be part of the frame blit, and maybe it just thinks the function is stalling because that's where it's actually doing all of the command flushes. No other per-frame operations are taking any significant length of time, everything else in the top 10 in terms of "average time consumed" is one-off things like texture loads. This is happening on an iPad 3 with 5.5.1, and NOT an iPad 3 with 7.x, so I almost want to think it's an OS/Driver problem. But that doesn't really help me fix the issue since I don't really want to require people to update past 5 just to fix a weird performance problem that shouldn't even be occurring. Anybody have any ideas on how to solve/investigate either one of these problems? UraniumAnchor fucked around with this message at 06:23 on Aug 20, 2014 |
# ? Aug 20, 2014 06:19 |
|
Abandon support for the iPad 3. I had one. It has, by far, the worst fill rate of all iOS devices, because it was the first retina iPad, before the GPUs caught up. It's so bad that of the four levels of iOS fill rate performance that Facebook tracks, they name the iPad 3's fill rate "abysmal". It's not worth supporting,on any iOS version. I'm not too knowledgeable about OpenGL, but I'd check to make sure you're not copying a ton of pixels out to the rest of your application on every frame, as taking pixels from OpenGL contexts can be expensive. Maybe check https://developer.apple.com/library...0008793-CH6-SW3 Doctor w-rw-rw- fucked around with this message at 18:00 on Aug 20, 2014 |
# ? Aug 20, 2014 17:57 |
|
Maybe check for glDiscardFramebuffer support (or whatever it's called) and see if using it helps with the long frame buffer switch? Also, is iOS 5 support really worth it? iOS 5 users are less than 1% of users, so IMHO if it takes more than 1% of your time it's not worth it. Especially if you have to mess with old versions of Xcode.
|
# ? Aug 20, 2014 18:01 |
|
Call glGetError() after every gl* call and see if it's failing anywhere on your working and your non-working devices. I use this macro:code:
Once I got my 5S, my applications were acting funny so I had to check GL errors to see what was happening, I can't for the life of me remember what my fix was though. It might have been about unbinding array buffers at the end of each frame or something - something to do with resetting a binding back to 0.
|
# ? Aug 20, 2014 19:41 |
|
Just to make sure my hopes are appropriately suppressed, Xcode extensibility is nil, right?
|
# ? Aug 21, 2014 00:54 |
|
It can be done, but I'm not aware of any thriving Xcode plugin market.
|
# ? Aug 21, 2014 01:29 |
|
I mean there's some pretty good stuff on Alcatraz. I recommend the button to nuke your DerivedData.
|
# ? Aug 21, 2014 01:55 |
|
I'm thinking about things like editor extensions and support for DSLs, but I'll check that stuff out.
|
# ? Aug 21, 2014 01:57 |
|
Since Xcode is written in obj-c and plugins run in-process you can in theory swizzle anything you want. Have fun reverse-engineering things definitely not intended to be a public API, though (and repeating that every year).
|
# ? Aug 21, 2014 02:43 |
|
ultramiraculous posted:I mean there's some pretty good stuff on Alcatraz. I recommend the button to nuke your DerivedData.
|
# ? Aug 21, 2014 03:28 |
|
Subjunctive posted:I'm thinking about things like editor extensions and support for DSLs, but I'll check that stuff out. http://chen.do/blog/2013/10/22/reverse-engineering-xcode-with-dtrace/ Enjoy.
|
# ? Aug 21, 2014 03:42 |
|
ManicJason posted:That's not as satisfying as opening terminal and typing "fuxcode". Everyone needs an fuxcode script. seriously.
|
# ? Aug 21, 2014 03:46 |
|
I'm boring and just type derivedata, up, enter. This very occasionally causes problems.
|
# ? Aug 21, 2014 04:58 |
|
Plorkyeran posted:I'm boring and just type derivedata, up, enter. Even easier: <Ctrl-R>der<enter>
|
# ? Aug 21, 2014 05:03 |
|
Doctor w-rw-rw- posted:http://chen.do/blog/2013/10/22/reverse-engineering-xcode-with-dtrace/ Thanks...I think.
|
# ? Aug 21, 2014 05:28 |
|
I found the cause of the crash that Apple was seeing in my game. Turns out that Cocos2D doesn't stop rendering when you switch away from the app if there's a modal viewcontroller displayed, such as the GameCenter login screen. And your app's OpenGL context is invalid while the app is backgrounded, so trying to do any OpenGL stuff results in a crash. Instead of just stopping the renderer when the app gets backgrounded, Cocos2D specifically checks to see if it's the top view controller when the app goes to the background and only stops rendering if the answer is YES. Objective-C code:
Doc Block fucked around with this message at 06:17 on Aug 21, 2014 |
# ? Aug 21, 2014 06:13 |
|
Doc Block posted:I found the cause of the crash that Apple was seeing in my game. Turns out that Cocos2D doesn't stop rendering when you switch away from the app if there's a modal viewcontroller displayed, such as the GameCenter login screen. And your app's OpenGL context is invalid while the app is backgrounded, so trying to do any OpenGL stuff results in a crash. I'd check the commit/blame logs in the off chance it was a fix for something specific and there's a reasonable comment about it...but I can't think of a reason this would be a good idea. It seems like engine should be paused on backgrounding, especially if it's not even the primary view.
|
# ? Aug 21, 2014 20:18 |
|
ultramiraculous posted:I'd check the commit/blame logs in the off chance it was a fix for something specific and there's a reasonable comment about it...but I can't think of a reason this would be a good idea. It seems like engine should be paused on backgrounding, especially if it's not even the primary view. I checked and the file is exactly how it was when it was first committed last year. The commit message was just "Adds initial version of CCAppDelegate for easier setup". So I think I'm gonna do a pull request that fixes it.
|
# ? Aug 21, 2014 21:13 |
|
I'm new to CoreData and I've run into a problem creating my model that I'm not sure how to configure. I have two objects in my graph: File Server I get a list of all available servers, and create a server object for each one. Later I get a list of files, and each file has multiple servers it can exist on. So assume I have Server 1, Server 2, Server 3, Server 4. File 1 can exist on Servers 1, 3, 4. I don't really care about an inverse relationship (I.E. being able to pick a server and tell what files are on it). I only care about the File having a property that links to the appropriate server list that it exists on. How do I set this up in my object graph in CoreData? I looked at a unidirectional relationship, but Apple seemed to encourage you to never use them. Is that the right way to go?
|
# ? Aug 22, 2014 00:30 |
|
|
# ? Jun 8, 2024 07:15 |
|
mrbass21 posted:I'm new to CoreData and I've run into a problem creating my model that I'm not sure how to configure. I use them and turn off the idiotic warnings Xcode likes to spit out about a missing inverse relationship. Don't worry about it.
|
# ? Aug 22, 2014 02:22 |