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
xgalaxy
Jan 27, 2004
i write code

shodanjr_gr posted:

Hm...Maybe that's the case for the core spec but last time I checked, it didn't support extensions like tessellation shaders or Shader language 1.5... I'm wondering if that changed in ML...

Here you go:
https://developer.apple.com/graphicsimaging/opengl/capabilities/

Adbot
ADBOT LOVES YOU

shodanjr_gr
Nov 20, 2007

Yeah but that chart doesn't go up to 10.8...

transient
Apr 7, 2005
Sorry if this is a dumb question, but I can't figure it out.

We've placed an ad on an html page within an app that links to a third party site's promotional page. Is there a way to open that page in safari rather than in the app itself?

Kallikrates
Jul 7, 2002
Pro Lurker
something like
code:
-(BOOL) webView:(UIWebView *)inWeb shouldStartLoadWithRequest:(NSURLRequest *)inRequest navigationType:(UIWebViewNavigationType)inType {
    if ( inType == UIWebViewNavigationTypeLinkClicked ) {
        [[UIApplication sharedApplication] openURL:[inRequest URL]];
        return NO;
    }

    return YES;
}

lord funk
Feb 16, 2004

drat imageNamed: to hell. 1000 builds on all three devices, and no problems. I push an update, and suddenly it can't find the background image for one of my views, and a giant yellow background appears. :sigh:

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

lord funk posted:

drat imageNamed: to hell. 1000 builds on all three devices, and no problems. I push an update, and suddenly it can't find the background image for one of my views, and a giant yellow background appears. :sigh:

Make sure you do a full clean before release by deleting your DerivedData folder (~/Library/Developer/Xcode/DerivedData). Deleting the folder is totally harmless.

Basically the DD folder has header indexes and pre-compiled versions of your project for each of your build profiles. The issue I've run into is the Archive profile has a copy of an old/corrupted image file that it doesn't want to get rid of. Everything looks fine for your simulator/device debug builds, but then you do an Archive and *bam* weird artifacts.

I'm also pretty sure doing a Clean in XCode only cleans the deleted build mode, making things more irritating. I generally stick to having the ~/Library/Developer/Xcode/ folder bookmarked in Finder and the DD folder gets periodically nuked.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
alias fuxcode='rm -rf ~/Library/Developers/Xcode/DerivedData'

lord funk
Feb 16, 2004

ultramiraculous posted:

Make sure you do a full clean before release by deleting your DerivedData folder (~/Library/Developer/Xcode/DerivedData). Deleting the folder is totally harmless.

Thank you. Will be adding this to my update pre-flight checklist.

ultramiraculous posted:

I'm also pretty sure doing a Clean in XCode only cleans the deleted build mode...

I see. I was under the impression that Clean Build Folder (cmd-opt-shift-k) was deleting the DerivedData. But that's not the case.

pokeyman posted:

alias fuxcode

:lol:

lord funk
Feb 16, 2004

For posterity, the exact issue was switching an image to JPG from PNG. With PNGs, you do not have to supply the file name with extension when using imageNamed:. With JPGs, you do. So the old PNG was still floating around in my data, and not having the extension prevented it from loading the JPG.

Doc Block
Apr 15, 2003
Fun Shoe
Is their any reason not to specify the extension?

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

lord funk posted:

drat imageNamed: to hell. 1000 builds on all three devices, and no problems. I push an update, and suddenly it can't find the background image for one of my views, and a giant yellow background appears. :sigh:

Having an update go live, downloading it on your separate non-dev test device, running it, then watching something crash and burn is the worst feeling in the world. You know all you can do is pray that the App Review gods smile upon your puny pleadings and approve the new-new update quickly.

BTW: anyone making any money at all on iOS, you must buy an iPod Touch, keep it stock (and possibly on an old iOS version), and use that to purchase your app retail and install it. Then after your update is approved, install it on that device to confirm that the update process works with no issues. I learned my lesson the hard way that even deleting the app and reinstalling or installing ad-hoc is not enough because it is not an exact replica of how App Store updates work in the field.

lord funk
Feb 16, 2004

Doc Block posted:

Is their any reason not to specify the extension?

By mistake I found out about the ability for PNGs to not need the extension. I assumed that this was meant to prevent exactly what happened to me, i.e., imageNamed: would just find whatever file had that name and not care about the extension. What irks me is, why bother with extensionless PNG at all?

Ender.uNF posted:

Then after your update is approved, install it on that device to confirm that the update process works with no issues.

I think I'm going to do this in the future. Promo codes work once the app has been approved, right? So you can download from the App Store before it's actually released?

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
Because the entire stack is optimized for PNGs. Xcode even does some processing on them so they are crushed and ready to stream straight into graphics memory on the device. Using JPGs has a performance penalty. Apple wants you to use PNG for everything. In my experience so far, PNG has worked well for any image I've thrown at it as long as the correct encoding settings are selected... It was designed explicitly to work well with vector art like GIFs and photos like JPGs so we could have a common format.


As for promo codes, yes the codes should be tied to the new version and allow you to download it after it is approved but before it is marked ready for sale. YMMV though, I haven't used it this way.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Ender.uNF posted:

Having an update go live, downloading it on your separate non-dev test device, running it, then watching something crash and burn is the worst feeling in the world. You know all you can do is pray that the App Review gods smile upon your puny pleadings and approve the new-new update quickly.

BTW: anyone making any money at all on iOS, you must buy an iPod Touch, keep it stock (and possibly on an old iOS version), and use that to purchase your app retail and install it. Then after your update is approved, install it on that device to confirm that the update process works with no issues. I learned my lesson the hard way that even deleting the app and reinstalling or installing ad-hoc is not enough because it is not an exact replica of how App Store updates work in the field.

Oooh! I have a helpful tip on this too! You can actually re-sign your distribution archive and test it on a device before you do your final submit.

I submitted to outside pressure and started a blahg with this as the first post:

http://blog.ultramiraculous.com/2012/07/13/final-countdown/

It's really roughly converted from some notes I have for my co-workers for now, but you can bookmark it and I'll have it tidied up by the time you get back to it.


Ender.uNF posted:

As for promo codes, yes the codes should be tied to the new version and allow you to download it after it is approved but before it is marked ready for sale. YMMV though, I haven't used it this way.

I can attest that this works. We're doing it right now for a limited release/beta. I think there's another piece of paper work for the promo codes, but you can have a version with an availability date in the future and then hand out promo codes based on that.

ultramiraculous fucked around with this message at 19:09 on Jul 13, 2012

Doc Block
Apr 15, 2003
Fun Shoe

Ender.uNF posted:

Because the entire stack is optimized for PNGs. Xcode even does some processing on them so they are crushed and ready to stream straight into graphics memory on the device. Using JPGs has a performance penalty. Apple wants you to use PNG for everything. In my experience so far, PNG has worked well for any image I've thrown at it as long as the correct encoding settings are selected... It was designed explicitly to work well with vector art like GIFs and photos like JPGs so we could have a common format.


As for promo codes, yes the codes should be tied to the new version and allow you to download it after it is approved but before it is marked ready for sale. YMMV though, I haven't used it this way.

As far as I know, all Xcode's crushing does is remove some information from the header. The actual image data is still standard PNG, which must be decompressed before use.

lord funk
Feb 16, 2004

Thanks for the info.


I will definitely be doing this from now on! I never want to get surprised like this again. It takes all the fun out of releasing an update. :(

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Doc Block posted:

As far as I know, all Xcode's crushing does is remove some information from the header. The actual image data is still standard PNG, which must be decompressed before use.

It premultiplies the alpha and swaps some bytes around. Definitely more than excising part of the header.

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

pokeyman posted:

It premultiplies the alpha and swaps some bytes around. Definitely more than excising part of the header.

Yup, it makes the bytes match what the OpenGL backing store expects which presumably made a much larger difference on the original iPhone. Still, I've converted to PNG for all my workflows.


edit: The localized release of Storm Sim is finally here. Enjoy the new humorous banner ad:



Total cost ended up being around $1500 because once we got the main part of the app done it just looked too stupid for words to have all the effect names be in English. In for 1c, in for 1lb, so I had them localize all the in-app metadata too. I also had them do the screenshot work. It was about 100 bux per language but I don't care - they delivered all of them exactly as needed and updated them for bug fixes at no charge.

On the plus side I have real-world experience localizing iOS applications now :o:

Simulated fucked around with this message at 03:59 on Jul 14, 2012

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
Crap, hoised on my own petard... Storm Sim 3.30 crashes on upgrade for existing users. I am such an idiot.

edit: Well less of an idiot than I thought... it crashes on iOS 4.x only, iOS 5.x+ is fine. Turns out the initWithEntityNamed on NSFetchRequest is not valid on previous iOS; you have to get the entity first and call setEntity. I can't believe I missed that.

edit2: Apparently initWithEntityNamed is a private API in 4.x because it does exist but doesn't work. However neither Xcode nor the App Store flagged it as using a private API. I am confused.

Simulated fucked around with this message at 20:58 on Jul 14, 2012

lord funk
Feb 16, 2004

Ender.uNF posted:

edit2: Apparently initWithEntityNamed is a private API in 4.x because it does exist but doesn't work. However neither Xcode nor the App Store flagged it as using a private API. I am confused.

Xcode not being straightforward? I'm astonished! :v:

Let me be the first to say: I feel your pain.

ManicJason
Oct 27, 2003

He doesn't really stop the puck, but he scares the hell out of the other team.
I have a question about crashes, signals, and threads. I noticed awhile back that crashes don't always report the responsible thread for the crash, instead reporting a background thread with nothing but signal handler calls. I read that signals are handled by any available thread, so that makes sense, though it's still a bit farther beyond my knowledge than I'd like.

I ask because I've been seeing a couple of crashes in a background thread related to hashing. Today I finally saw the same crash with this at the top of my main thread call stack and the top of the background thread call stack:

code:
Thread 0:
0 libsystem_kernel.dylib 0x35bfe004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x35c00a57 thread_suspend + 47
2 My Application 0x000f0487 plcrash_log_writer_write + 387
3 My Application 0x000f15ab signal_handler_callback + 63
4 My Application 0x000efb1d fatal_signal_handler + 93
5 libsystem_c.dylib 0x30e427ed _sigtramp + 49
6 libsystem_c.dylib 0x30dee44b szone_malloc_should_clear + 1275
7 libsystem_c.dylib 0x30dee44b szone_malloc_should_clear + 1275
8 libsystem_c.dylib 0x30dedf1f malloc_zone_malloc + 67
9 CoreFoundation 0x324a6269 CFAllocatorAllocate + 129
10 CoreFoundation 0x325409e5 __CFStringChangeSizeMultiple + 857
11 CoreFoundation 0x324befbb CFStringReplaceAll + 335
12 Foundation 0x37e33331 -[NSString uppercaseString] + 37
...many more lines...

Thread 7:
0 libsystem_kernel.dylib 0x35bfe004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x35c00a57 thread_suspend + 47
2 My Application 0x000f0487 plcrash_log_writer_write + 387
3 My Application 0x000f15ab signal_handler_callback + 63
4 My Application 0x000efb1d fatal_signal_handler + 93
5 libsystem_c.dylib 0x30e427ed _sigtramp + 49
6 CoreFoundation 0x32532249 __CFRunLoopDeallocateTimers + 157
7 CoreFoundation 0x32532249 __CFRunLoopDeallocateTimers + 157
8 CoreFoundation 0x325333a5 __CFSetApplyFunction_block_invoke_0 + 13
9 CoreFoundation 0x324a8e70 CFBasicHashApply + 140
10 CoreFoundation 0x324a8ddd CFSetApplyFunction + 173 
...many more lines...
I'm stopping for a moment to clarify what is going on here. Of course it looks like this call to uppercaseString is responsible for all of the crashes, but then I got to thinking about how little I understand signals. Is my main thread being interrupted to handle an unrelated signal, sending me off on a red herring chasing an issue in the above call stack that does not exist?

I certainly don't think so, but I figured it can't hurt to post and ask.

samiamwork
Dec 23, 2006

ultramiraculous posted:

Isn't Lion at OpenGL 3.2? I tried running glGetString(GL_VERSION) in Mountain Lion and 2.1 came back, which doesn't seem right...not really the savviest in OpenGL. I remember reading theories that the hardware incompatibilities in Mountain Lion were supposed to be for machines that didn't have 3.x support on their GPUSs.

Lion does have 3.2 but because GL 3 breaks legacy GL apps you need to specifically request OpenGL 3 when you create your context. Otherwise you get a legacy context.

haveblue
Aug 15, 2005



Toilet Rascal
Possibly dumb storyboard question: I created a project template, a few extra view controllers, and buttons that navigate between them (with default segues). My app is set to only allow landscape orientation, and it correctly launches and displays the first screen like that, but clicking the navigation buttons causes the simulator to flip into portrait as the next screen comes up. Why's it doing this, and how do I stop it?

Kallikrates
Jul 7, 2002
Pro Lurker
Double check your project settings, then double check your settings for your view controllers' orientation in the Storyboard, if you subclassed double-check
code:
shouldAutorotateToInterfaceOrientation

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
Well I requested expedited review and Apple approved it, reviewed it, and approved it today. That's some mighty fast turn around.

lord funk
Feb 16, 2004

Speaking of expedited reviews, I put a request in for TC-11 1.5.1. I thought I could wait it out, but my other app that was submitted way earlier still hasn't been touched by the reviewers.

Hideous yellow backgrounds aren't as bad as a load crash, but there's a German magazine that's reviewing it now. lovely timing. :/

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
I've been slowly progressing with Cocoa, about to be finished with a little app that I think the (smallish) business I work for will get a lot out of. I know a little bit about programming but this is the most serious thing I've ever made.

There's one thing I absolutely cant figure out. How is this useful to people?

https://developer.apple.com/library/mac/navigation/#section=Resource%20Types&topic=Guides

Kallikrates
Jul 7, 2002
Pro Lurker
The guides in general ? (useful) or the developer portal? (not useful, when compared to in xcode browsing or better yet Dash)

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
Mostly the 3000 barely categorized guides. It's impossible to find anything unless you already know what you're looking for.

Although I just realized that "331 out of 3000 documents" might mean there are only 331 guides with 3000 subpages. Which is stupid in and of itself.

Kallikrates
Jul 7, 2002
Pro Lurker
So usually the guides are linked to in class docs, So say you are looking at something related to Core Data bam theres probably a link to the core data programming guide, etc. Yeah browsing via the home page is not so good, but one level deeper is much better.

duck monster
Dec 15, 2004

chumpchous posted:

Mostly the 3000 barely categorized guides. It's impossible to find anything unless you already know what you're looking for.

Although I just realized that "331 out of 3000 documents" might mean there are only 331 guides with 3000 subpages. Which is stupid in and of itself.

Apples documentation has always been horribly organized when your getting started, to be honest. I got a *lot* more from third party books than from apples documentation when I first started coding with IOS. Once I had gotten the hang of it, there was no drama, but good lord is there some serious schizophrenically organized word salad in those docs.

For what its worth, Microsofts documentation isn't much better. I suspect its the result of a huge corporation putting out documentation organized from the perspective of their internal structure, rather than the perspective of an end user.

Google is your friend.

duck monster fucked around with this message at 04:40 on Jul 21, 2012

lord funk
Feb 16, 2004

duck monster posted:

Apples documentation has always been horribly organized when your getting started, to be honest.

Google is your friend.

I'm going to be teaching a beginning iOS course in the Spring (feel free to laugh / cry at the notion), and I want to get the students into good habits re: using the documentation. So now when I hit a roadblock I head into the docs and spend 10 minutes reading and sifting.

Sometimes it works, sometimes I give up and Google it and figure it out in a second or two.

Doc Block
Apr 15, 2003
Fun Shoe
Just Google "NSThingImTryingToDo" and pick the link that takes you to the Apple documentation.

Huragok
Sep 14, 2011
I heard review times are blowing out, is that true?

I had one app a few months ago go through review in about 3 days, but I submitted one 6 days ago and it's still pending review.

Filburt Shellbach
Nov 6, 2007

Apni tackat say tujay aaj mitta juu gaa!
iOS 6.

I had an update a couple weeks ago, took eight or nine days.

Look Around You
Jan 19, 2009

Ok, so I have a bit of an issue relating to XCode. I'm trying to update it, but every time I try to hit the update button in the App Store it just pops up a thing saying this:

quote:

You have updates available for other accounts

To update this application, sign in to the account you used to purchase it.

It only has an "OK" button and I'm pretty sure that it's the account I used to purchase it; it's showing up under my purchases list. I did change the "name" of it from one email to another, but I don't know if that'd cause this or not.

Do any of you guys have an idea of what to do?

e: by "name" I mean the actual email login (someemail @ example.com -> differentemail @ example.com)

lord funk
Feb 16, 2004

Anyone have experience with AirPlay? I want to route my audio out of my app to AirServer. I put an MPVolumeView to get the AirPlay button. So far so good, but...



It won't see the server in the app. The system AirPlay mirroring sees it just fine. And the documentation seems pretty thin for AirPlay (unless I missing something).

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
I use AirPlay and you may need to reboot the device before it will show up and/or restart the app. It was finicky for me at first, including the exact behavior you describe but it seemed to eventually sort itself out.

lord funk
Feb 16, 2004

Ender.uNF posted:

I use AirPlay and you may need to reboot the device before it will show up and/or restart the app. It was finicky for me at first, including the exact behavior you describe but it seemed to eventually sort itself out.

I've tried for a few days now, restarting, reloading, and it still won't recognize the server. It's odd, because the button only appears if the server is active on the network, so it clearly sees that it's there. I wonder if my app doesn't meet a requirement for AirPlay (audio session type, for example).

Adbot
ADBOT LOVES YOU

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
Hmmm... I'm not sure if that is a requirement. I set my category to playback but override to allow mixing with others IIRC, I will check this evening to be sure. There are also some permissions that can allow or disallow AirPlay which vary depending on what API you are using.

I just tried with the current version of your app and I was able to bring up the task bar and enable AirPlay while the app was active, but it did not show up as the "playing" app like Music or Downcast does so I suspect it is something to do with the audio session.

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