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
Doctor w-rw-rw-
Jun 24, 2008
We just open-sourced some cool poo poo. Check 'em out:

https://github.com/facebook/FBRetainCycleDetector
https://github.com/facebook/FBAllocationTracker
https://github.com/facebook/FBMemoryProfiler

Adbot
ADBOT LOVES YOU

TheReverend
Jun 21, 2005

:siren: WWDC email is out ! :siren:

lord funk
Feb 16, 2004

TheReverend posted:

:siren: WWDC email is out ! :siren:

Who else tried typing into the prompt...

lord funk
Feb 16, 2004

Mac dev question: is there a way to implement multi-monitor fullscreen for an app? Like the way a flight simulator could span multiple screens?

Doctor w-rw-rw-
Jun 24, 2008
Docs for CGLSetFullScreenOnDisplay says

quote:

If your application creates a window that completely covers the screen, the system implicitly creates a full-screen instance, for the same potential performance benefit.

CGDirectDisplay might be useful:
http://cocoadevcentral.com/articles/000028.php

Check docs for
CGCaptureAllDisplays
-[NSView enterFullScreenMode:withOptions:]

NoDamage
Dec 2, 2000
If I write a file to Library/Blah/ on iOS, is this backed up by iCloud? The File System Guide says everything in Library/ except Caches is backed up to iTunes, but it's not clear whether it's also backed up to iCloud.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
I'm not 100% sure of this answer I'm giving, but: yes, it's included.

orenronen
Nov 7, 2008

A question I'm having a surprisingly difficult time finding an answer to online:

We have an online multiplayer game in development (though this question applies just as much to any kind of online service). Our producer is worried about app updates and app reviews: Apple requires applications under review to connect to production servers, but most updates to the game also require significant server-side changes that are incompatible with the current "live" version.

So, is it okay if our server detects an "under review" app and redirects to a server instance running a newer server version, which is fully functional but empty of actual users? Then, once the new version is released, we update the actual live game server and upgrade its user database to use the new features. Is this something that can potentially get an app rejected?

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

It is not unprecedented to have server behaviour for in-review apps that differs from that of the live version. It would be quite surprising to me if they noticed, likewise if they cared.

Doctor w-rw-rw-
Jun 24, 2008

orenronen posted:

Is this something that can potentially get an app rejected?

As with many things involving the app store, yes, but that doesn't stop tons of people from doing it and getting away with it anyways. As long as it's not egregious and you're pragmatic about it (instead of deceptive or seen as gaming the system), you should be fine.

Doc Block
Apr 15, 2003
Fun Shoe
Just one question: what happens when not all your users upgrade immediately?

Probably better to version the API instead.

stuffed crust punk
Oct 8, 2004

by LITERALLY AN ADMIN
Probably like puzzle and dragons where you're completely blocked until you're current

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Doc Block posted:

Just one question: what happens when not all your users upgrade immediately?

Probably better to version the API instead.

Or they get directed to the new or old server, since it was keyed on version if I understand OP correctly.

It's implicit API versioning really.

brap
Aug 23, 2004

Grimey Drawer
Speaking of, what are people's solutions for versioning APIs? Do you have some URL path component to indicate the version of the API you're trying to use? Do you deploy separate application instances at different roots? Do you wind up changing the old API method in maintenance and produce its output with different means when your backend has changed?

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

fleshweasel posted:

Speaking of, what are people's solutions for versioning APIs? Do you have some URL path component to indicate the version of the API you're trying to use?

This is usually what you do. /api/v1, /api/v2, etc.

orenronen
Nov 7, 2008

Regular Nintendo posted:

Probably like puzzle and dragons where you're completely blocked until you're current

Yes - this is a Japanese mobile game, and every other one that I've ever tried blocks you from playing until you upgrade once a new version is out.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
That's pretty standard for games, mobile or otherwise. It's generally considered much less acceptable for anything else.

The proper REST way to do API versioning is with a HTTP header because the path should just identify the resource and things like what format you want the resource in go in headers, but in practice that works horribly so no one does it.

Doh004
Apr 22, 2007

Mmmmm Donuts...

Plorkyeran posted:

The proper REST way to do API versioning is with a HTTP header because the path should just identify the resource and things like what format you want the resource in go in headers, but in practice that works horribly so no one does it.

People tried to argue with me to change our existing routes to this way a while back and they couldn't provide a single reason why it would actually be better. I'm all for best practices, but it just seemed like work for the sake of work.

stuffed crust punk
Oct 8, 2004

by LITERALLY AN ADMIN
Reminder that any software out of Japan not written for a game console (and much of that which is) is objectively terrible and would be unacceptable as an undergrad homework assignment

dc3k
Feb 18, 2003

what.
The vast majority of my apps have started crashing on launch. I just counted 57 of them. Clearly this is not due to the apps themselves, unless everyone happened to release apps with the same exact bug in them. Neat.

Console logs show me AppleFairplayTextCrypterSession::fairplayOpen() failed, error -42028 followed by a SIGKILL. Googling gives me news articles from 2012 about App Store sending out corrupt binaries, but nothing more recent than that. What the gently caress?

These aren't no-name shithouse apps either. Here's some of the apps I'm getting this error on:

code:
Goolge Calendar
Google
Google Maps
Google Drive
Google Authenticator
Google Translate
YouTube

Instagram
Boomerang
Layout
Hyperlapse

Bank of America
Tangerine
Capital One
Capital One Wallet
Mint
Level
Venmo
Splitwise

Kayak
Lyft
Uber
Tripit
United
Fly Delta
FlightAware
Zipcar
Waze
TripAdvisor

Swarm
Foursquare

Yelp
Eat24

LinkedIn
Netflix
Overcast
Periscope
Prime Now
Apple Store
Instacart
Not really asking for help here, but this is clearly a hosed up thing that is happening. Has anyone ever run into anything similar to this? It's been happening for quite a while now, but it's never been this many apps at once. A reboot usually fixes it.

edit: Full console log in case anyone is interested. Fairplay shits itself and sends a SIGKILL. The rest is just the OS bitching it can't attach to the PID or something?

code:
Apr 27 12:39:21 robot6 kernel[0] <Notice>: AppleFairplayTextCrypterSession::fairplayOpen() failed, error -42028
Apr 27 12:39:21 robot6 com.apple.xpc.launchd[1] (UIKitApplication:com.burbn.hyperlapse[0xa65c][7445]) <Notice>: Service exited due to signal: Killed: 9
Apr 27 12:39:21 robot6 assertiond[67] <Warning>: Unable to obtain a task name port right for pid 7445: (os/kern) failure (5)
Apr 27 12:39:21 robot6 SpringBoard[6291] <Warning>: Unable to register for exec notifications: No such process
Apr 27 12:39:21 robot6 SpringBoard[6291] <Warning>: Unable to obtain a task name port right for pid 7445: (os/kern) failure (5)
Apr 27 12:39:21 robot6 SpringBoard[6291] <Warning>: Unable to obtain a task name port right for <FBApplicationProcess: 0x12e69cb70; com.burbn.hyperlapse; pid: 7445>
Apr 27 12:39:21 robot6 SpringBoard[6291] <Warning>: Application 'UIKitApplication:com.burbn.hyperlapse[0xa65c]' exited abnormally via signal.
Apr 27 12:39:21 robot6 iap2d[221] <Warning>: process com.burbn.hyperlapse is now terminated
Apr 27 12:39:21 robot6 SpringBoard[6291] <Warning>: Application '(null)' exited for an unknown reason.

dc3k fucked around with this message at 20:51 on Apr 27, 2016

stuffed crust punk
Oct 8, 2004

by LITERALLY AN ADMIN
I worked on one of those

dc3k
Feb 18, 2003

what.

Regular Nintendo posted:

I worked on one of those

Me too!

Also every new app I download crashes on launch in the same fashion. This is stupid.

Axel Rhodes Scholar
May 12, 2001

Courage Reactor

Anyone else going to WWDC? I'm going to be a first-timer.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Plorkyeran posted:

That's pretty standard for games, mobile or otherwise. It's generally considered much less acceptable for anything else.

The proper REST way to do API versioning is with a HTTP header because the path should just identify the resource and things like what format you want the resource in go in headers, but in practice that works horribly so no one does it.

I prefer to use Host as the HTTP header for this.

chimz
Jul 27, 2005

Science isn't about why, it's about why not.

status posted:

The vast majority of my apps have started crashing on launch.

Some steps to try fixing it:

a) reboot your phone (hold power, slide to shutdown, or just hold power+home)
b) sign out and in to the iTunes store, and download a free app or something, to kick Fairplay into redownloading the app decryption key database.

dc3k
Feb 18, 2003

what.

chimz posted:

Some steps to try fixing it:

a) reboot your phone (hold power, slide to shutdown, or just hold power+home)
b) sign out and in to the iTunes store, and download a free app or something, to kick Fairplay into redownloading the app decryption key database.

Yeah, rebooting always fixes it (It's happened multiple times before, but not at this level) I'll try signing out and in again next time to see if that does anything.

Hughlander
May 11, 2005

dazjw posted:

Anyone else going to WWDC? I'm going to be a first-timer.

There's usually a group that goes. I missed last year but will be forced back this one. Unfortunately my direct manager is out of San Francisco so there's no chance I get to miss it.

stuffed crust punk
Oct 8, 2004

by LITERALLY AN ADMIN
Re: apps crashing I've been seeing some weird poo poo today too. Cancelled some app store updates after I saw how big they were, my phone blacked out, then showed the no battery screen (it was at 45%), came back to life at 30%. Lots of apps freezing for 5-10sec at a time too.

I did a reset/restore last night. Wtf?

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
I live here but no luck in the lottery this year. Also put my resume in at Apple a week or two ago and havent gotten a call or thanks for trying. I don't think they like me very much.

Doctor w-rw-rw-
Jun 24, 2008

Ender.uNF posted:

I live here but no luck in the lottery this year. Also put my resume in at Apple a week or two ago and havent gotten a call or thanks for trying. I don't think they like me very much.

The most interesting iOS work is being done at Facebook, not just Apple, in my (highly biased) opinion, so you could try applying here as well?

TheReverend
Jun 21, 2005

Ender.uNF posted:

Also put my resume in at Apple a week or two ago and havent gotten a call or thanks for trying. I don't think they like me very much.

Well I heard there's a recent position that needs to be filled :rimshot:

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

Doctor w-rw-rw- posted:

The most interesting iOS work is being done at Facebook, not just Apple, in my (highly biased) opinion, so you could try applying here as well?

I'm looking into it as well. Last time I talked to FB it was "go do code golf and practice writing red-black trees from scratch because we're going to spring a lot of CS101 trivia on you". I may just be projecting though, I never actually did the interview last time because another opportunity came along.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Ender.uNF posted:

I'm looking into it as well. Last time I talked to FB it was "go do code golf and practice writing red-black trees from scratch because we're going to spring a lot of CS101 trivia on you". I may just be projecting though, I never actually did the interview last time because another opportunity came along.

The iOS interview track is/was very different and more iOS-heavy.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Ran into this today:
Objective-C code:
// given:
@property UIImage *image;

// then:
- (void)doIt {
    CGSize size = self.image.size;
    self.Image = nil;
}

Compiles and runs fine! It's not super tricky or anything, but it baffled me for a moment.

Flobbster
Feb 17, 2005

"Cadet Kirk, after the way you cheated on the Kobayashi Maru test I oughta punch you in tha face!"

pokeyman posted:

Ran into this today:
Objective-C code:
// given:
@property UIImage *image;

// then:
- (void)doIt {
    CGSize size = self.image.size;
    self.Image = nil;
}
Compiles and runs fine! It's not super tricky or anything, but it baffled me for a moment.

I accidentally did the same thing once and scratched my head for a few seconds before I realized what was going on. self.image works by capitalizing the "i" and prepending "set", so it calls [self setImage:nil]. So self.Image does the same thing, just that the "I" was already capitalized.

That being said, you'd think the compiler would at least issue a warning if the name used at the call-site doesn't exactly match the name in the @property declaration.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Flobbster posted:

I accidentally did the same thing once and scratched my head for a few seconds before I realized what was going on. self.image works by capitalizing the "i" and prepending "set", so it calls [self setImage:nil]. So self.Image does the same thing, just that the "I" was already capitalized.

That being said, you'd think the compiler would at least issue a warning if the name used at the call-site doesn't exactly match the name in the @property declaration.

This code wouldn't work if Obj-C had been designed in Turkey.

Flobbster
Feb 17, 2005

"Cadet Kirk, after the way you cheated on the Kobayashi Maru test I oughta punch you in tha face!"

Subjunctive posted:

This code wouldn't work if Obj-C had been designed in Turkey.

Or it would work in a disastrous way: http://gizmodo.com/382026/a-cellphones-missing-dot-kills-two-people-puts-three-more-in-jail

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Flobbster posted:

That being said, you'd think the compiler would at least issue a warning if the name used at the call-site doesn't exactly match the name in the @property declaration.

It does indeed emit a warning (and a fix-it), which is great. It was the lack of a crash at runtime that got me.

e:

Holy poo poo!

pokeyman fucked around with this message at 03:07 on Apr 29, 2016

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Subjunctive posted:

This code wouldn't work if Obj-C had been designed in Turkey.

:lol:


:stonk:

Adbot
ADBOT LOVES YOU

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

dazjw posted:

Anyone else going to WWDC? I'm going to be a first-timer.

As you might expect, I'll be there.

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