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
ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer
It seems like our iOS5 devices aren't getting push notifications. Anyone have problems with this?

We've been doing push tests to five devices that we have at our desk, all of which have registered with our server. The three that are iOS4.X seem to get the notification, but the iOS5 devices get nothing. We've tried a number of combinations of alert styles in the Settings pannel for notifications and it didn't change anything.

Is there a good process for diagnosing remote notifications issues? Is there any sort of known issue around iOS5 and notifications? I found a lot of complaints on the developer center forums about local notifications, but nothing about our issue.

Adbot
ADBOT LOVES YOU

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

lord funk posted:

Is it typical for the beta iOS releases to drain the battery like mad? My phone has been sucked dry over the last few days.

I've been wondering if it's just the network overload around WWDC and the terrible reception in Sausalido, or iOS6 is just hogging right now. Definitely experiencing quick battery drain.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Doc Block posted:

And yeah, it seems like a waste of time supporting 4.2. Maybe support 4.3.

I'm dropping pre-5.0 support in my apps. Over 80% of device owners are on iOS 5, according to Apple. The number of iOS 4 users is dwindling by the day, and trying to keep feature parity across OS versions meant (for me) implementing a lot of stuff myself that iOS 5 has built-in (like UIAlertViews with text entry fields in them).



If you're going to support 4.x, you'd want to be targeting 4.2. 4.3 was when the iPhone 3G stopped getting supported. If you deploy for 4.3 you're just catering to stragglers who haven't upgraded to iOS5 and 3G users are still left out.

If you're fine leaving 3G users out in the cold, just upgrade to iOS5. Better ARC support, storyboards, tons of nice little UI improvements...just go for it and thank yourself later.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Star War Sex Parrot posted:

In what way? Apple doesn't put release notes for their Command Line Tools, which annoys me to no end. I have no idea what LLVM/Clang versions they're using without digging.

The new XCode 4.4 LLVM is Apple LLVM 4.0. The sessions this year (Which just got posted) on the command line tools, etc were pretty good. The LLVM session was very C++ oriented, so skip that if it's not relevant to you. Objective-C now has new compile time/reverse compatible literals and subscripts that are more exciting than they should be. You have no idea how much I want to write things like @[@1, @2, @3] and array[0].

Edit: Note I'm not disagreeing with you that Apple is irritating on this stuff. Apple at least keeps developing these tools, but they only document their work in the course of one talk a year.

ultramiraculous fucked around with this message at 03:07 on Jun 20, 2012

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

rjmccall posted:

Heh. Two-thirds of that talk was about ARC, general warnings, and static analysis. We can't even squeeze in fifteen minutes of announcing the most complete C++11 implementation on the planet without getting ragged on incessantly. :)

Haha, I just skimmed through it and it really was only 15 mins. I think at the time the C++ stuff might have been the only "new information" that had no overlap with other sessions, so maybe I noticed it more.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

NoDamage posted:

Yeah, it's a massive pain in the rear end. We just recently localized our app into 15 different languages, across Mac/iPhone/iPad. Took forever to take all of the screenshots for each platform and get them all uploaded into iTunes Connect.

It doesn't help that iTunes Connect's interface is pretty awful for this kind of stuff (e.g. it doesn't actually thumbnail your uploaded screenshots so they take forever to load).

If I ever have to do it again I would be tempted to write some code that automatically took screenshots of the screens I cared about (using UIGetScreenImage() if that's still available, or https://developer.apple.com/library/ios/#qa/qa2010/qa1703.html), and then paying someone on eLance/oDesk a few bucks an hour to do the actual uploading on iTunes Connect.

I've used UIAutomation to do screen captures in the past. It's a Javascript-y language you can use to automate an app in Instruments. Basically you can record the steps to get into a state, and have the UIATarget take a screenshot. It's a little irritating to get going, but it'll probably save you enough time to be worth it. You'll free up a bunch of time to deal with iTunes Connect :ohdear:

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

xgalaxy posted:

IMO just use the Amazon services for this.
It's free for a year or something like that, it's cheap, you can grow the service as you need, and if you use multiple services you get discounts which make it even more cheap.

http://aws.amazon.com/

And I'll go ahead and recommend Heroku: http://www.heroku.com/pricing

It starts at free forever, and it's built on Amazon's EC2. It's a little more straightforward to get started and doesn't require you to know quite as much about sysadmin stuff if that's not your deal.

I don't know if GC has gotten any better in terms of exploits, unfortunately. It would be nice if they at least let you set a "maximum reasonable" score or something like that, because it would help in some cases.

I would recommend you do some achievements in your game though. They're easy to set up and fun to make up names for.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

shodanjr_gr posted:

So has apple decided to update their OpenGL support in Mountain Lion or is it still stuck at < 3.0?

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.

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.

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

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

pokeyman posted:

I look forward to @==, @>, @>=, @<, @<=, @~, @>>, @<<, @|, @&, @||, @&&

But yeah you're right, pointer equality's pretty unhelpful.

Wait, is that an actual thing or are you just anticipating what will probably end up coming? I don't remember @==, etc coming up in the "Modern Objective-C" sessions.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer
FYI: This took me way too long to figure out, but apparently the the way to get an existing app to start doing 4" layouts is to define a 4"-sized default image in the project file. Did I miss some documentation on this?

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

McFunkerson posted:

If so I missed it too, I looked all over the iOS/Xcode 4.5 release notes before jumping on the Developer Forums and finding the answer.

This is why I liked WWDC hardware releases. I feel like features that needed developer intervention, like @2x-stuff, got explained a lot more efficiently when a critical mass of developers/bloggers had the chance to pick an Apple engineer's brain about it. It's especially weird, given that there's probably going to be a lot of leterboxed apps out there when the iPhone 5 comes out.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

pokeyman posted:

I seem to remember -viewDidUnload becoming or essentially already being a no-op, partly because nobody used it properly and partly because it didn't solve any of the problems it was meant to.

Yeah, as of iOS6 it's not going to get called anymore.

Apparently the strategy of throwing away the *entire* view when a memory warning sweep came through wasn't really necessary. Basically as of iOS6, the OS will only throw away the backing layer bitmap for the view, rather than trashing the entire view hierarchy. That realization + realizing so many crashes happened after viewWillUnload got called prompted the change.


To answer lord funk's question, you could add a button to do something like this:

http://stackoverflow.com/questions/2784892/simulate-memory-warnings-from-the-code-possible

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

tarepanda posted:

And how do I access files on the iPad? This is my burning question, here. If I write stuff to files and don't know how to access those files (without coding some kind of view to display everything in the file), it's pretty useless...

In XCode, you can go into Organizer when the device plugged and get all the files your app created off. Basically just go to Applications on the device, then choose the app you want, when choose download, and you'll end up with a bundle of everything in that app's sandbox.

Caveat is that it doesn't work with App Store-downloaded apps, even if you're the dev.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Doh004 posted:

Any suggestions in particular? Or whatever google first returns?

I can vouch for DDPageControl working as advertised. I think that's probably one of the more common ones.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Yodzilla posted:

Well goddamn that works just fine. I'm going to have to really dig around and see what the hell is going on with mine because as far as I can tell I'm doing pretty much the same thing you are.

Like people are saying, make sure you have the IBAction bound to "Touch Up Inside". I had similar weird behavior at one point and it turned out I was binding to "Drag Up Inside" or somesuch :doh:

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Doh004 posted:

Is there really no other way to have an animated gif in your iOS app than this:

http://www.alterplay.com/ios-dev-tips/2010/12/making-gif-animating-on-ios.html

(Break the gif's frames out, loop over them all with a for-loop)

Yeah, oddly. I was hoping that there would be some gif support in UIImageView in iOS5, when iMessage added gif support.

If you're especially lazy, you could always just throw the gif into a web view...

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Plorkyeran posted:

Exceptions combine pretty terribly with manual memory management, so pre-ARC you'd have to be crazy to use them for non-fatal errors. With ARC I guess you could make it work, but fighting against the established style of a language is rarely a good idea.

Exceptions in ARC are basically the same as manual memory counting. Objective-C exceptions are meant to signal that something went unrecoverable wrong, so, again, not for control-flow. The general rule in Cocoa is that if you capture an exception and keep running, you've probably ended up leaking something (At least by virtue of the fact that "you're doing it wrong" in the first place).

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Bonefish posted:

Is there a way to get a message when an HTML5 audio file is played in a UIWebview?

The only way you can really have a web view push information out into the app is with URL callbacks. Basically you set up a delegate with a "-(BOOL)webView:shouldStartLoadWithRequest:navigationType:" defined, then you check the url on the request. What'd you'd do is stick something like a javascript "window.location = 'app://soundplayed'" every time there's a sound, and capture it in the app by matching request.url with "app://soundplayed", doing what you want, and returning NO (shouldStartLoadWithRequest returning NO means that the webview won't perform a navigation).

Obviously you'd have to have control over the page content.



DreadCthulhu posted:

How does it compare to Flurry? I'm using that per Doc Block's recommendation since it was already in the app for analytics, but if I can get significantly better quality reports then I'm down to switching.

I'd throw in Crashlytics, too. Both are better than what Flurry has, really. Crashlytics has a Mac App component that captures the symbol tables for each build, which means you don't have to do any extra work to symbolicate a crash. It's a nice feature that becomes a clincher if you're working on a team with multiple devs, because it does away with the easily-skippable step of having to put the DSYMs in a certain place.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

DreadCthulhu posted:

Can one test one's app with the AppStore provisioning profile? I'd like to get as close as possible to the final thing in testing before submitting it.

You do an archive using a distribution profile, then do Distribute...->Save for Enterprise... and make an IPA using an Ad Hoc distribution profile. You can then install that IPA on your device from the Device panel of the Organizer.

After you test that IPA you can submit the same build without changing anything.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

DreadCthulhu posted:

So you're saying I can submit to the app store with an IPA using the AdHoc profile? Is an AdHoc profile completely interchangeable with an AppStore profile?

Basically any archive build that has an "iPhone Distribution" code signing identity, as opposed to "iPhone Developer" identity, can be submitted to the App Store or distributed with a distribution Ad Hoc cert.

So, yes, I think?

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

DreadCthulhu posted:

Have you discovered a better crash reporting service out there than Flurry? I'd be very nice to have a stack trace.

I'd really recommend Crashlytics.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Doh004 posted:

"When the user taps on the Person icon, the screen slides left but no content is displayed." They also provided a screenshot and we see where they are and what they might have done.

I think they mean our top right menu icon which slides in a menu from right. We just can't replicate it either on our iPad or in the iPad simulator.

Are you doing this test using an AdHoc ipa based on the *exact* build archive you submitted, or are you using XCode's Build and Run? There's a good chance that your submitted build is different from a debug build (for whatever reason).

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

klem_johansen posted:

I've got a client who wants ios6 features but refuses to leave out the iPad 1 market segment by leaving ios5. For now I'm keeping them at ios5.1 but at some point soon they won't have a choice, right? We'll all be forced to leave the original iPad behind. Is that the long and short of it?

What features are we talking? If it's something that the app can still function without, you can always do respondsToSelector: checks or check the version of iOS that's running. With that, you can not use certain features by just not running bits of code that would crash in iOS 5. If your entire interface is going to be a fancy collection view, you're out of luck, though.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Doc Block posted:

AFAIK Xcode just converts it into a PNG format that's more quickly loaded, not necessarily going for minimum file size. Using ImageOptim will get the file size down, but with possibly slower load times since the resulting image will most likely have to be converted to a pixel format usable by the GPU after being loaded and uncompressed.

Yeah, the big thing it does is convert from RGBA to ARGB, which is the byte order the device prefers.

Additionally:

pokeyman posted:

I get much smaller pngs from something like ImageOptim than I do from Xcode. Xcode does give it a try though.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

LP0 ON FIRE posted:

Since my other two iOS apps were enterprise, today is the first time I'm submitting an app to the App Store, and I'm kind of freaking out figuring out some last minute very important things.

One is that I'm trying to figure out how to have this app only show up in the App Store for iPad 2 and up. Is it possible? The results I found on Google about that haven't looked so optimistic.

edit: UIRequiredDeviceCapabilities to use font-facing-camera will make it be iPad 2 and up?

Second, the developer account my work has been invited to another developer account. We need have it so when we add the app it will show up on their store. I hope we don't need a new bundle identifier and such. I went to their provision portal and I can't choose to create anything.

Requiring iOS6 is one way to do it. I've seen murmurs about people getting rejected for using UIRequiredDeviceCapabilities without actually needing the camera at all.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Star War Sex Parrot posted:

Final release of Xcode 4.6 and iOS 6.1 are out.

Woop woop. I was wondering if this was coming after last night's awkward "oh, we forgot to increment the beta and now your 6.1 devices are bricked" deal. ( My poor iPad mini :( )

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

gooby on rails posted:

execute than chains of ifs.

FYI: if else blocks will tend to compile into switch statements in LLVM, though I wish I could find the documentation on that (I swear it was on this list.

Doing a switch on an enum also has the added benefit of LLVM yelling at you if you miss a case.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

pokeyman posted:

AFNetworking is the poo poo. Read the code and you'll learn something.

So has AFNetworking essentially become the new ASIHTTPRequest?

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Doctor w-rw-rw- posted:

Yes. Stop using ASI; it's outdated.

It lives on in one of the projects I'm working on. I just wanted to make sure I wasn't going to back the wrong horse with AFClient.

Doctor w-rw-rw- posted:

So I'm getting back into iOS dev a bit in my free time, and am contributing to an app which uses a storyboard. Why do people use storyboards? What's the advantage?

It seems like a mega-nib, so it has merge issues, just opening it will change it, it's dog-slow, and it crashes Xcode much of the time. Made worse by the fact that it's a single gargantuan file rather than a number of smaller files.

Can someone enlighten me on what makes a storyboard worth it?

It does some fun resource management, for one thing. Unlike Xibs, where the whole tree gets built at init time, storyboards will load individual parts lazily. You can basically assemble large sections of views and their transitions in one file, with the downside being they're all in one file and XCode will try and show you all of them.

I'm also pretty sure the "changes when you open it" thing is just a symptom of an XCode upgrade. As of sometime recently they started automagically upgrading your interface files to the schema of the last version, which means your whole team doesn't have to upgrade at once but you also don't end up with XIBs from 2009 in your source tree as easily.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Doc Block posted:

I sure hope Twitter doesn't screw up Crashlytics.

Yeah, I was about to post the same thing. If they're giving away the paid option now, I'm anxious about what their business direction is going to be.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

NoDamage posted:

Yeah, I'm starting to lean in that direction too.
Wait, really? I did not think calling start would block until the operation completed. Doesn't it just spawn another thread to perform the operation and then return immediately?

Concurrent operations have a "start" method, which is what gets called by the queue, which is basically what pokeyman is saying. When you throw an NSOperation onto a queue, it basically calls "start" on a separate thread. If you call start yourself, you're generally running the operation on whatever thread you're running on. You can also start an operation on another thread and call "waitUntilFinished", which will block the current thread until the concurrent operation ends. This is possibly useful if you have something you can you can do between the start of the HTTP operation and before the HTTP IO comes back.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

pokeyman posted:

I was trying to avoid the word "concurrent". All operations are concurrent when you have a queue.

Yeah, true.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Gordon Cole posted:

Aaand it's finally out! It's a relief to finally see it up on the app store after waiting for so long.

Man, that really confused me for a second. I thought Chromatik had some dark horse spinoff product, but then I remembered they had a 'k' at the end of their name.

Also that app looks pretty slick. Nice work!

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer
Oh God, they redid the Provisioning Center. THIS IS THE END HOW DO I DO THINGS.

Edit: Oh, cool. You can finally delete App IDs you made by mistake.

ultramiraculous fucked around with this message at 23:46 on Apr 8, 2013

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer
Word of warning: You currently cannot add new devices to provisioning profiles via the web interface. If you hit "Generate" on an Ad-Hoc/Development certificate's page, it'll save it with no devices attached and no way to attach them again. The only recourse is to delete the profile and make a new one.



So, don't:

Yodzilla posted:

Just start mashing buttons until it works.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Doh004 posted:

:woop: Me too. I'm going to fight you, literally, for my ticket.

Goon fistycuffs at dawn Friday.

...assuming any of us get tickets.


Carthag posted:

Sweet, I just thought up a kinda clever way to do lazy properties using dispatch_once and method swizzling.


What. and why?

Why do you need to swizzle to get a lazy property? Are you implementing a general solution that looks for certain types of properties and auto-lazies them at startup?

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer
Two minutes. Two minutes and the tickets are already sold out.

Adbot
ADBOT LOVES YOU

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Doctor w-rw-rw- posted:

I got to the final "place order" button and then it errored and removed the ticket from my cart. What the crap. Reserve the drat thing. This poo poo is so arbitrary that it seems like nobody who wants to go can.

They really need to re-think next year, this is nuts. It's at least not as bad as Google I/O, where there's documented cases of people signing up just to get the hardware handouts and not going to sessions. Still, though.

John Gruber posted:





:smug:

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