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
Toady
Jan 12, 2009

pokeyman posted:

When you said the omission isEqualToManagedObject: wasn't an oversight. I took that to mean you wouldn't implement the method yourself.

My assumption is that such a method doesn't exist because managed objects can't logically be equal to other managed objects, so the default pointer comparison is sufficient. I didn't mean to imply that specialized methods are required for every class no matter what. I take advantage of them when they're available and if I know both objects are instances of that class.

quote:

What's a value class? And what about classes that simply use pointer equality, should those have specialized equality methods? Why not?

Apple defines a value object as "an object-oriented wrapper for a simple data element such as a string, number, or date." So things like NSString and other primitive data classes of the Cocoa framework. And, of course, your app might have its own value objects.

quote:

I imagine you also override isEqual: for those classes. Does isEqual: in turn immediately call your specialized equality methods? Do your specialized equality methods claim increased performance?

If I need something more than pointer equality, I follow the convention of implementing a class-specific method and calling that method from -isEqual: if the argument is an instance of that class. If I know two objects are of that class, I skip the check by calling the class-specific method directly. I don't claim increased performance for my particular methods and haven't bothered benchmarking them for that.

quote:

I feel like we're talking by each other at this point. Thanks very much for the discussion, I've learned a lot.

It was fun! Here's a Mike Ash article on implementing equality and hashing.

Toady fucked around with this message at 03:03 on Sep 30, 2011

Adbot
ADBOT LOVES YOU

Small White Dragon
Nov 23, 2007

No relation.
How do I symbolicate a crash file in Xcode 4?

false image
Nov 24, 2004

filthy Americans... praise Allah

Small White Dragon posted:

How do I symbolicate a crash file in Xcode 4?

If its not doing it automatically, try using this https://github.com/chrispix/symbolicatecrash-fix

lord funk
Feb 16, 2004

Small White Dragon posted:

How do I symbolicate a crash file in Xcode 4?

Ha! I just taught myself how to do this yesterday. Here are my notes:

1. Make sure you archive the Build Products of the exact version that generated the crash log.
2. Move the crash log, the app bundle, and the .dSYM file into the same directory.
3. Run the symbolicate script. You can make an alias:

code:
alias symbolicate="/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash -v"
...then run it on the crash log:

code:
symbolicate AppNamel_2011-09-30-151456_iPad.crash

lord funk
Feb 16, 2004

Can someone explain this graphic result to me? I'm making a simple rect background with OpenGL, with different color corners to make a gradient. On my iPad 2, it looks like this:



In the simulator, AND the first generation iPad 1, it looks like this:



Why the difference?

lord funk fucked around with this message at 20:22 on Oct 1, 2011

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

pokeyman posted:

If the .m file gets compiled and linked (i.e. has a target in Xcode), the class gains the methods. The .h file simply tells the compiler about the methods defined therein. If you want to keep the category methods out, remove the .m from the target.

Correct, the binary is scanned for categories when it gets loaded and the categories are patched in at that time. In fact all of the code included in the target can potentially be compiled into the binary and loaded into memory, even if you never call it or reference it anywhere else.

Doc Block
Apr 15, 2003
Fun Shoe

lord funk posted:

Can someone explain this graphic result to me? I'm making a simple rect background with OpenGL, with different color corners to make a gradient. On my iPad 2, it looks like this:



In the simulator, AND the first generation iPad 1, it looks like this:



Why the difference?

Insufficient color precision would be my guess. Are you using a 16-bit or 32-bit framebuffer?

lord funk
Feb 16, 2004

Doc Block posted:

Insufficient color precision would be my guess. Are you using a 16-bit or 32-bit framebuffer?

I'm not actually sure how to find out. I'm assuming it's somewhere where I create the framebuffer? Here's the code:

code:
        [EAGLContext setCurrentContext:context];
        
        // Create default framebuffer object. The backing will be allocated for the current layer in -resizeFromLayer
        glGenFramebuffers(1, &defaultFramebuffer);
	glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);
		
        glGenRenderbuffers(1, &colorRenderbuffer);
        glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
        glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderbuffer);
        
	glGenFramebuffers(1, &msaaFramebuffer);         // msaa fb
	glGenRenderbuffers(1, &msaaRenderbuffer);		// msaa color buffer
	glGenRenderbuffers(1, &msaaDepthbuffer);		// msaa depth buffer
        
        // allocate color buffer backing based on the current layer size
        glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
        [context renderbufferStorage:GL_RENDERBUFFER fromDrawable:(CAEAGLLayer *)self.layer];
        glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &framebufferWidth);
        glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &framebufferHeight);
        
        GLint maxSamplesAllowed;
        glGetIntegerv(GL_MAX_SAMPLES_APPLE, &maxSamplesAllowed);
        
        // operation on msaa fb
        glBindFramebuffer(GL_FRAMEBUFFER, msaaFramebuffer);
        
        glBindRenderbuffer(GL_RENDERBUFFER, msaaRenderbuffer);
        glRenderbufferStorageMultisampleAPPLE(GL_RENDERBUFFER, maxSamplesAllowed, GL_RGBA4, framebufferWidth, framebufferHeight);
        glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, msaaRenderbuffer);
        
        glBindRenderbuffer(GL_RENDERBUFFER, msaaDepthbuffer);
        glRenderbufferStorageMultisampleAPPLE(GL_RENDERBUFFER, maxSamplesAllowed, GL_DEPTH_COMPONENT16, framebufferWidth, framebufferHeight);
        glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, msaaDepthbuffer);

Doc Block
Apr 15, 2003
Fun Shoe
From what I can remember it's where you make the OpenGL layer or EAGL layer or something. There's an option to have the actual framebuffer (not just a framebuffer object, which is what you're creating in that code snippet) be 16- or 32-bits.

Sorry I can't be more specific, I'm not at my dev machine right now.

edit: nm, you found it yourself.

Doc Block fucked around with this message at 00:10 on Oct 2, 2011

lord funk
Feb 16, 2004

I think I found it:

code:
        eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
                                        [NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking,
                                        kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat,
                                        nil];
It looks like the options are kEAGLColorFormatRGBA8 or kEAGLColorFormatRGB565, where the former is 32 bit and the latter is 16. Unfortunately, neither solves the problem.

zorm
Jan 4, 2008
Woot!!
Who was the llvm guru on here? I think I have a bug where it generates code that fails to select the appropriate branch for some reason (if or switch) but I'm not good enough with ARM assembly to verify. It seems like it might be related to code length too?

Compiling with pure GCC seems to produce desired results though.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



You're probably thinking of rjmccall

http://forums.somethingawful.com/showthread.php?threadid=3400187&userid=123851

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
That would be me. Please note that, while it's always possible that this is a compiler bug, it's much more likely that your code is broken in some way that just happens to not explode on GCC.

lord funk
Feb 16, 2004

iOS 5 dev chat:

Interesting to see that Apple is using the volume button as a camera snapshot button in iOS 5. I seem to remember devs complaining that their apps were rejected if they used the volume buttons for anything other than volume.

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane
Speaking of rejected apps, I just had an app rejected (by an automated process) for non-public API use in almost every class (including, apparently, UIKit classes). I'm pretty sure I didn't do anything crazy enough to gently caress everything up, and a cursory google search indicates other people are having the same problem since earlier today, so I imagine it's just something to do with their updates today.

Has anyone else had this problem, or even more interestingly, has anyone successfully submitted a binary today?

Small White Dragon
Nov 23, 2007

No relation.

PT6A posted:

Speaking of rejected apps, I just had an app rejected (by an automated process) for non-public API use in almost every class (including, apparently, UIKit classes). I'm pretty sure I didn't do anything crazy enough to gently caress everything up, and a cursory google search indicates other people are having the same problem since earlier today, so I imagine it's just something to do with their updates today.

Has anyone else had this problem, or even more interestingly, has anyone successfully submitted a binary today?
It wasn't my app, but I saw another app rejected for that same reason a couple hours ago.

Small White Dragon
Nov 23, 2007

No relation.
Are there any iOS devices that support texture sizes greater than 2048x2048?

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane
Issue resolved -- there was a bug in iTunes Connect that didn't allow me (and presumably other people having the same problem) to accept the new contract amendments. That's been fixed, I accepted it, and my binary uploaded fine without any changes.

kitten smoothie
Dec 29, 2001

lord funk posted:

iOS 5 dev chat:

Interesting to see that Apple is using the volume button as a camera snapshot button in iOS 5. I seem to remember devs complaining that their apps were rejected if they used the volume buttons for anything other than volume.

Yeah, this was one of the sticking points in the "Apple is undercutting developers" discussions around the WWDC announcement, along with the builtin apps borrowing features from popular third party tools.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

kitten smoothie posted:

Yeah, this was one of the sticking points in the "Apple is undercutting developers" discussions around the WWDC announcement, along with the builtin apps borrowing features from popular third party tools.

I've never understood those complaints. When has Apple been anything but gleeful to implement features it likes regardless of the source? Anyone who isn't aware of this possibility simply isn't paying attention (which is fair enough if you're new to the platform). If anything, the complainers should take it as confirmation that their and Apple's tastes are well-aligned and that their apps will fit in well. And I don't mean that in the trite "imitation is the sincerest form of flattery" sense, but in the "the sole controller of the platform has blessed your work" sense.

zorm
Jan 4, 2008
Woot!!

pokeyman posted:

I've never understood those complaints. When has Apple been anything but gleeful to implement features it likes regardless of the source? Anyone who isn't aware of this possibility simply isn't paying attention (which is fair enough if you're new to the platform). If anything, the complainers should take it as confirmation that their and Apple's tastes are well-aligned and that their apps will fit in well. And I don't mean that in the trite "imitation is the sincerest form of flattery" sense, but in the "the sole controller of the platform has blessed your work" sense.

Other than that fact that it is an intensely lame thing to do? Apple can only get away with it because they're the only paying game in town. If Android ever got its act together and made the hardware/software work well I suspect there would be a number of iOS developers that head for more friendly pastures.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

zorm posted:

Other than that fact that it is an intensely lame thing to do? Apple can only get away with it because they're the only paying game in town. If Android ever got its act together and made the hardware/software work well I suspect there would be a number of iOS developers that head for more friendly pastures.

Why do you consider it "intensely lame"? How likely do you think it is that the act of Android coming together ends with it looking a lot more like iOS, and Google like Apple, in terms of control of the platform?

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane
As much as it might suck having Apple poach your good ideas as a developer, consider the alternative: Apple would basically have to sit around, knowing there is an improvement which could easily be made to their platform, and ignore it, making the average user find (and possibly pay for) a 3rd-party app to do it. Speaking as a developer, I say it sucks. Speaking as an iPhone user (the ones who put money in Apple's pockets, and developer's pockets when you get right down to it) I think it's pretty great that Apple continues to improve the user experience on their devices.

stray
Jun 28, 2005

"It's a jet pack, Michael. What could possibly go wrong?"
Quick question: If I provision an iPhone for (generic) development testing, can I still use it as my everyday iPhone or is it now development-only (and if so, what's different about a dev-only iPhone)?

stray fucked around with this message at 17:07 on Oct 5, 2011

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

stray posted:

Quick question: If I provision an iPhone for (generic) development testing, can I still use it as my everyday iPhone or is it now development-only (and if so, what's different about a dev-only iPhone)?

Yeah, you can use it normally. I've never run a beta version of iOS, but I assume you can use that normally as well if you want (with some added instability, because it's beta).

double sulk
Jul 2, 2010

Holy cow. With automatic reference counting, how much of the memory management is automatically handled now? I'm still really early in learning Objective-C, but I don't need to do any releasing or NSAutoreleasePool stuff (at least in what I'm working on) if it's on when making a new exercise/project.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
If you need to use CoreFoundation objects, you'll still have to retain and release those yourself. You'll also have to watch out for reference cycles, which will cause leaks. Otherwise, it's pretty much taken care of for you.

zorm
Jan 4, 2008
Woot!!

PT6A posted:

As much as it might suck having Apple poach your good ideas as a developer, consider the alternative: Apple would basically have to sit around, knowing there is an improvement which could easily be made to their platform, and ignore it, making the average user find (and possibly pay for) a 3rd-party app to do it. Speaking as a developer, I say it sucks. Speaking as an iPhone user (the ones who put money in Apple's pockets, and developer's pockets when you get right down to it) I think it's pretty great that Apple continues to improve the user experience on their devices.

They should really be doing the same thing that they did with Siri though, and buy out the app/company that produced it so that the original developers get their fair share.

I also view it as "intensely lame" because Apple is essentially outsourcing all of the risk & development time to app developers without paying them. Then if said app developers make something that is successful or a good idea they poach the idea and leave the developers with nothing.

Look at Microsoft, the courts and developers have tied their hands over time. They have a hard time adding basic things to their core OS now without huge problems. I agree that this makes for a bad user experience but as a developer it is a huge win.

If you look at what Apple has been adding, the only things that are really safe for app developers to develop for iOS are games and apps in extremely vertical markets.

OHIO
Aug 15, 2005

touchin' algebra

zorm posted:

They should really be doing the same thing that they did with Siri though, and buy out the app/company that produced it so that the original developers get their fair share.

I also view it as "intensely lame" because Apple is essentially outsourcing all of the risk & development time to app developers without paying them. Then if said app developers make something that is successful or a good idea they poach the idea and leave the developers with nothing.

Look at Microsoft, the courts and developers have tied their hands over time. They have a hard time adding basic things to their core OS now without huge problems. I agree that this makes for a bad user experience but as a developer it is a huge win.

If you look at what Apple has been adding, the only things that are really safe for app developers to develop for iOS are games and apps in extremely vertical markets.

And education apps. They're not making their own, and are in fact heavily promoting 3rd party education apps to schools!

lord funk
Feb 16, 2004

What is configd, why is it taking so much memory on my iPad, and why does my app get jettisoned when it tries to launch but others don't?



Here is the "LowMemory-2011-10-05-140147.log" it makes:

quote:

Incident Identifier: 9EF6760E-D92B-48A2-B616-4A2B36F970A4
CrashReporter Key: f04a97e36e988f55d4fcd28fa6ebcbd8a6413409
Hardware Model: iPad2,1
OS Version: iPhone OS 4.3.1 (8G4)
Kernel Version: Darwin Kernel Version 11.0.0: Thu Feb 10 21:47:57 PST 2011; root:xnu-1735.46~2/RELEASE_ARM_S5L8940X
Date: 2011-10-05 14:01:47 -0500
Time since snapshot: 193 ms

Free pages: 923
Wired pages: 23131
Purgeable pages: 0
Largest process: configd

Processes
Name UUID Count resident pages
sandboxd <b36908f3fede35a792ab4c1a5458a0ba> 179
TouchControl <a0072c66a0da3a3a8c56cbaf62d08454> 10962 (jettisoned) (active)
DTMobileIS <48c048053a903511a264eeb98cdf28cc> 485
notification_pro <698dca6c4cba390a8017315bd25f18f8> 138
installd <bb3639d8ae403a4ea7bc4878c726b7ee> 454
lockbot <b44f11d2089238a6b6b4e6d4c48bc12c> 110
syslog_relay <344c7c41bec5360aae33f4fd412ea95f> 85
notification_pro <698dca6c4cba390a8017315bd25f18f8> 108
notification_pro <698dca6c4cba390a8017315bd25f18f8> 108
afcd <c3f31c6da39930acbad9a87c466c10bf> 117
ptpd <6072e173aed83310b9b7589a70a24b0b> 578
debugserver <919dbac91c0e3133a517d6c7a99e667e> 99
lsd <3fafa485b73836acb973d50feabd963a> 245
notifyd <9966082842de313a8e05a001c783faf4> 131
BTServer <d2eec19c86653b589db027999e5f222c> 162
CommCenter <90a33bee2da6357fa88c404fde13b49e> 248
SpringBoard <6e9a0987ea69363ba38f1539595874ca> 4120 (active)
accessoryd <d30e340e36df356bbde3347a6ed1ef87> 140
apsd <77b48c187e973193bfab88c749aa85d7> 271
configd <a6d457fca42732d9ba809d03a2b3e3ae> 73418
fairplayd.K93 <03202c4b3f15373baac4e203347a60c3> 96
imagent <2ca31f39adc9359f96818552bf60016b> 228
locationd <de6587ea245c3cd287837c25d3f55ca8> 700
mDNSResponder <2e9063a87abc3c889250101d69579319> 390
mediaremoted <21af791e80823c9f90f0be2b77a3d885> 244
mediaserverd <c731263114c33a07aef7bccdcf667271> 799
lockdownd <bf727b82d79930d78685810bdb4b11f2> 316
syslogd <d81669e7bdb93f9b9012020beac826f4> 103
usbethernetshari <36a2c261d4973e66b43830af64a38d84> 100
launchd <2d76192187733a77ac436d6a7ce806ab> 113

**End**

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

zorm posted:

I also view it as "intensely lame" because Apple is essentially outsourcing all of the risk & development time to app developers without paying them.

You mean aside from the $3 billion paid to developers since the App Store opened. Not to mention said developers would have no job without Apple expanding the mobile app market from pittance to $billions. iOS developers are well-compensated for their time and effort for any app they can sell. Apple boosts tons of third-party apps in commercials, websites, and iTunes all for free, and the flip side is if you do a really good job your feature might be immortalized in the OS itself. I can understand an initial negative reaction when your app suddenly becomes irrelevant, but that's always a risk on any platform. There's no guarantee that your app is forever safe to earn you your 'fair share', and I'm not sure why you think you're entitled to any such thing.

duck monster
Dec 15, 2004

Well I guess the old "nuclear option" of an email to steve jobs when poo poo goes haywire with the appstore that once saved my business isn't available anymore.

:(

some kinda jackal
Feb 25, 2003

 
 
edit: Wrong thread, not YOSPOS :ohdear:

Star War Sex Parrot
Oct 2, 2003

Martytoof posted:

edit: Wrong thread, not YOSPOS :ohdear:
or IS IT?!

Echo Video
Jan 17, 2004

zorm posted:


I also view it as "intensely lame" because Apple is essentially outsourcing all of the risk & development time to app developers without paying them. Then if said app developers make something that is successful or a good idea they poach the idea and leave the developers with nothing.


Sounds like there should be some sort of legal protection for the research and development of software...

some sort of software... patent...

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Software patents are bullshit, lets not talk about those.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Figured I'd round up some posts about Steve from developers. These are just the blogs I follow so post any others you have.

Steven Frank Neven Mrgan Peter Ammon Jeff LaMarche Marco Arment Gus Mueller

Heisenberg1276
Apr 13, 2007
EDIT: I'm really dumb. I have fixed this problem by myself.

Heisenberg1276 fucked around with this message at 19:50 on Oct 7, 2011

lord funk
Feb 16, 2004

I got tired of not having a good image of accelerometer / gyroscope motions for the iPad, so I made my own. Figured I'd share if anyone else wanted it for a manual or something:


Illustrator file and PDF:
https://rapidshare.com/files/2834131909/ipad-device-motion-vector.zip

Adbot
ADBOT LOVES YOU

OHIO
Aug 15, 2005

touchin' algebra

lord funk posted:

I got tired of not having a good image of accelerometer / gyroscope motions for the iPad, so I made my own. Figured I'd share if anyone else wanted it for a manual or something:


Illustrator file and PDF:
https://rapidshare.com/files/2834131909/ipad-device-motion-vector.zip

Awesome, thanks!

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