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
Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

fleshweasel posted:

Is there a reason you don't use the App Store to update Xcode?

What happens when I try to update Xcode from the App Store:

1. App Store tells me I have to exit Xcode before even downloading the new version
2. I exit Xcode
3. App Store continues to tell me I have to exit Xcode
4. I try restarting
5. Clicking on the update button now makes it claim to be updating, but then 30 seconds later the update apparently fails with no error message
6. Repeat #5 until I give up and download it from the developer portal

Adbot
ADBOT LOVES YOU

brap
Aug 23, 2004

Grimey Drawer
Oh, ok. I've had decent luck with using the App Store to get the latest version and downloading old versions as needed.

Axiem
Oct 19, 2005

I want to leave my mind blank, but I'm terrified of what will happen if I do
Because I want to manage what version of Xcode I'm using separate from when I update all the apps through the App Store by hitting one button (or have auto-update turned on).

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
On a related note, xcode-install is amazing.

lord funk
Feb 16, 2004

Plorkyeran posted:

On a related note, xcode-install is amazing.

This is cool. Also I can't believe anyone would use App Store to update Xcode.

I ended up installing El Cp / 7.3 / 9.3 on an older laptop where I don't care how it runs. A quick look at the developer forums and people are complaining about 7.3 issues.

Also, it did take 4 hours.

dc3k
Feb 18, 2003

what.

Plorkyeran posted:

On a related note, xcode-install is amazing.

Oh wow, this looks fantastic

dizzywhip
Dec 23, 2005

Plorkyeran posted:

On a related note, xcode-install is amazing.

This is pretty appealing after having Xcode 7.3 stuck at "Installing - 4 minutes" for over an hour in the mac app store. I'm mildly annoyed that all of these awesome tools that are coming out are Ruby-based though. I don't use Ruby for anything, so needing to maintain a Ruby environment just so I can conveniently update Xcode or push up a build kinda sucks.

xgalaxy
Jan 27, 2004
i write code
I've got an interface builder / storyboard problem I need help with.

I've got an NSToolbar in a WindowController. I also have a SplitViewController as the content for the WindowController and that SplitViewController has other ViewControllers showing whatever content. The problem is the NSToolbar content is overlapping the content of the SplitViewController. Eg. it is showing the vertical split through the toolbar and the other parts of the content of the split view are overlapping the toolbar buttons.

I can't seem to find a way to adjust the split views height to accommodate the height of the toolbar.
How do I fix that?

Thanks.


EDIT:
I think I figured it out. I had to uncheck 'full size content view' in the NSWindow properties display. Does this seem like the correct thing to do?

xgalaxy fucked around with this message at 22:20 on Mar 26, 2016

ManicJason
Oct 27, 2003

He doesn't really stop the puck, but he scares the hell out of the other team.
It's news to me that Xcode updates work for anyone. I've had to uninstall and reinstall Xcode to get any updates for almost a year now. App Store updates just sit at "waiting" forever. Maybe I should try that update tool.

edit: Right as I say that, the download started in the App Store after sitting for 15 minutes. It's a Christmas miracle!

TheReverend
Jun 21, 2005

So my app got rejected :(

For what I think is BS!

How common is it for them to be like "Your info.plist declares that you use X functionality. Please include X functionality or delete the key." when I do have that functionality. I don't know how to respond with other than "uhhh it does...".

Also when can I sign up for WWDC? I would like to go despite these shortcomings.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Just explain how to get to the thing in your app that uses that feature. Should be ok.

TheReverend
Jun 21, 2005

Yeah I explained it best I could. Here's hoping.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

TheReverend posted:

Also when can I sign up for WWDC? I would like to go despite these shortcomings.
You will get an email when they announce the dates.

lord funk
Feb 16, 2004

Plorkyeran posted:

You will get an email when they announce the dates.

Then you sign up for the lottery. Then the ghost of Steve visits you during the night and whispers "otomatically" in your ear and you'll find your ticket under your pillow in the morning.

lord funk
Feb 16, 2004

Seriously gently caress Apple for requiring Xcode 7.3 + El Cap to build for iOS 9.3. And gently caress me for updating my phone without checking first. :mad:

Doctor w-rw-rw-
Jun 24, 2008

lord funk posted:

Seriously gently caress Apple for requiring Xcode 7.3 + El Cap to build for iOS 9.3. And gently caress me for updating my phone without checking first. :mad:

On the other hand, Night Shift. :getin:

lord funk
Feb 16, 2004

Doctor w-rw-rw- posted:

On the other hand, Night Shift. :getin:

Aw I got excited that this was some kind of roll-back OS tool or something. Then I remembered it's the Sherlock'd 'get-yellow' thing. :/

stuffed crust punk
Oct 8, 2004

by LITERALLY AN ADMIN
Had to pack up some builds for qa automation the other day and that expired WWDR cert somehow found its way back onto my machine :tinfoil:

dc3k
Feb 18, 2003

what.
Why is my UISplitViewController pushing my detail VCs onto master's navigation stack instead of the detail one when an iPhone 6+ is in landscape? As far as I can see my project is set up exactly the same as the default Master/Detail one.

edit: I reset the master/detail connections and re-created the show detail segue and now it works fine. wtf.

dc3k fucked around with this message at 20:11 on Apr 4, 2016

Doh004
Apr 22, 2007

Mmmmm Donuts...
What do folks use to send push notifications? Any third party providers? Or just talk directly to APNS?

Doh004 fucked around with this message at 18:46 on Apr 4, 2016

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
Talking directly to APNS is surprisingly annoying, but it's not really all that much code so I wouldn't bother with a third-party push notification service unless that's literally the only thing you need a server for.

Kallikrates
Jul 7, 2002
Pro Lurker

Doh004 posted:

What do folks use to send push notifications? Any third party providers? Or just talk directly to APNS?

I've been on the client side of Urban Airship and Amazon APNS. UA was nice but was getting expensive at our volume, Amazon was cheap but their server library didn't support integrating against the sandbox cert with the same app id that had a production cert (so I was told.. our backend guy's weren't so hot) which seemed dumb as hell.

One nice thing about these services was handling channels and device registrations and keeping track of apple invaliding a device registration.

Doh004
Apr 22, 2007

Mmmmm Donuts...

Plorkyeran posted:

Talking directly to APNS is surprisingly annoying, but it's not really all that much code so I wouldn't bother with a third-party push notification service unless that's literally the only thing you need a server for.

I wrote our own little service to talk directly to APNS at my last job and things work pretty darn well. I still get my notifications regularly and I doubt anyone is maintaining that poo poo anymore.

Kallikrates posted:

I've been on the client side of Urban Airship and Amazon APNS. UA was nice but was getting expensive at our volume, Amazon was cheap but their server library didn't support integrating against the sandbox cert with the same app id that had a production cert (so I was told.. our backend guy's weren't so hot) which seemed dumb as hell.

One nice thing about these services was handling channels and device registrations and keeping track of apple invaliding a device registration.

We'd looked into UA but had heard they were "old news". Now we're currently on our second provider and for some unknown reason, sending a weekly automated push notification at a designated time is too hard and doesn't work properly.

Really, the biggest benefit is it directly links up with our analytics tracking and user profiling. I would LOVE to be able to draw the connections between them all but that would require people's poo poo to actually work :saddowns:

stuffed crust punk
Oct 8, 2004

by LITERALLY AN ADMIN
Fun fact, I worked on a pretty major ecommerce app a while ago and we gave qa access to the UA dashboard to test push notifications ahead of black friday. The head qa guy caught a lot of poo poo from us when he send numerous push notifications of "test test" to his 100,000 closest friends.

After that it became company policy that every test push always be some plausible-deniability message like "thanks for downloading $APPNAME! stay tuned for our next update"

Kallikrates
Jul 7, 2002
Pro Lurker
Should probably have added a caveat that I last used UA like 2 years ago. On a project I'm currently on we plan to use localytics, but that is because thats what the partner wants. I don't know if its going to be a good tool for them or not.


Every iOS SDK seems to be expanding to the point where it can gather analytics, handle push, and gather logs/crash reports. Additional seeing deep/universal links. I wonder how many will be around in a year or two. I guess more business for us when a clients needs us to re-write the whole thing because it was on maintenence mode for a couple years.

UIApplication posted:

After that it became company policy that every test push always be some plausible-deniability message like "thanks for downloading $APPNAME! stay tuned for our next update"

Probably a good idea when the keys to the dashboard get handed over. We had similar rules (devs were free to hook up tools to a sandbox cert though)

Kallikrates
Jul 7, 2002
Pro Lurker

Doh004 posted:

I wrote our own little service to talk directly to APNS at my last job and things work pretty darn well. I still get my notifications regularly and I doubt anyone is maintaining that poo poo anymore.


We'd looked into UA but had heard they were "old news". Now we're currently on our second provider and for some unknown reason, sending a weekly automated push notification at a designated time is too hard and doesn't work properly.

Really, the biggest benefit is it directly links up with our analytics tracking and user profiling. I would LOVE to be able to draw the connections between them all but that would require people's poo poo to actually work :saddowns:

It's always fun looking at the history of some of these frameworks. You can tell when the original devs move on and it moves into support. Eventually they stop keeping up with new features of iOS and the company disappears. It's unfortunate some of these tools have become industry standard while having the smallest trickle of support. They limp on, at times we shoulder that maintenance and support work.

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
Am I missing the obvious, or secure enclave keys are almost entirely useless?
  • can only be used with Touch Id enabled (this doesn't appear to be explicitly documented anywhere)
  • EC only, no RSA
  • 256 bits only
  • secure enclave can only store private keys permanently
  • ... and public keys can't be exported. SecItemCopyMatching succeeds but returns no data
  • most damning of all, they can only sign/verify and not encrypt/decrypt, and you can't derive keys on iOS
What in the name of god are they even for?

hackbunny fucked around with this message at 16:30 on Apr 5, 2016

Doh004
Apr 22, 2007

Mmmmm Donuts...

UIApplication posted:

Fun fact, I worked on a pretty major ecommerce app a while ago and we gave qa access to the UA dashboard to test push notifications ahead of black friday. The head qa guy caught a lot of poo poo from us when he send numerous push notifications of "test test" to his 100,000 closest friends.

After that it became company policy that every test push always be some plausible-deniability message like "thanks for downloading $APPNAME! stay tuned for our next update"

I'm a bit worried that'll happen when we hand it over to our marketing team... ugh.


Kallikrates posted:

Should probably have added a caveat that I last used UA like 2 years ago. On a project I'm currently on we plan to use localytics, but that is because thats what the partner wants. I don't know if its going to be a good tool for them or not.

Localytics is actually just what we moved over to... the first round of notifications worked great. But ever since? :saddowns:

Doh004 fucked around with this message at 18:03 on Apr 5, 2016

kitten smoothie
Dec 29, 2001

hackbunny posted:

Am I missing the obvious, or secure enclave keys are almost entirely useless?
  • can only be used with Touch Id enabled (this doesn't appear to be explicitly documented anywhere)
  • EC only, no RSA
  • 256 bits only
  • secure enclave can only store private keys permanently
  • ... and public keys can't be exported. SecItemCopyMatching succeeds but returns no data
  • most damning of all, they can only sign/verify and not encrypt/decrypt, and you can't derive keys on iOS
What in the name of god are they even for?

This WWDC talk explains a use case: https://developer.apple.com/videos/play/wwdc2015/706/?time=2905

I'm imagining, maybe, a stock brokerage app where your requests to the trading API must be signed with the secure element key. Your login process generates a secure enclave key pair and sends the public key up to the backend to persist with the login session.

If the signed request can successfully verify using that public key, you know then that someone authorized had put their finger to the reader.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

It is a bit disappointing, though, that it's not more flexible (especially letting you encrypt/decrypt with a protected key).

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

This is interesting and potentially useful to us (not for what I'm doing right now, protecting a symmetric key), but I haven't been able to export the public key

If understand what he's saying correctly, all keystore items are stored encrypted in the secure enclave, so I don't need to go through the extra step of encrypting a symmetric encryption key with a secure enclave key, I can just store the key in the keystore

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Thank you, dearest Xcode, for opening quickly the generated interface of my bridging header. That's probably what I'd like to see when quickly opening the bridging header while neck-deep in a pile of Swift code.

In other news, genuine thanks for making #import autocomplete work in the bridging header!

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
Thank you XCUITest for being horribly broken, making our CI User Interface tests useless and unreliable. Without you, QA might have free time on their hands and we all know idle hands are the devil's plaything.

Thank you XCTest for helpfully logging that the app PID died. I appreciate the way you now stop forever causing CI builds to time out without reporting any test failures. We all move too quickly sometimes, but you're helping us slow down to stop and smell the roses.

Thank you SourceKit for reliably crashing every single time I try to use enum with leading dot syntax. Your attempts to help me be more explicit about which type I'm using are much appreciated.

Doh004
Apr 22, 2007

Mmmmm Donuts...
I had to stop writing XCUITests. I'd spend more time debugging element selection and then trying to figure out why it succeeds locally but not on CI than actual time saved from finding bugs.

KIF wasn't the most reliable either but it sure as poo poo worked more frequently than Apple's.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Sounds like ui-tests.txt to me. Never seems to pay off on any platform without a dedicated team keeping them working.

xgalaxy
Jan 27, 2004
i write code
How do I create an NSNumberFormatter that can accept strings with either plain decimal format or in currency format? Is this even possible?
Basically I want to validate that the input is valid for 'currency'. And I don't care if they put the currency symbols in there or not.
Am I doomed to having to check both formatters for valid input? Why isn't there a good library for this poo poo?

Illustration of the problem:

stuffed crust punk
Oct 8, 2004

by LITERALLY AN ADMIN
Dehumanize yourself and face to regex

Doc Block
Apr 15, 2003
Fun Shoe
Probably something to do with localization. Currency symbols, thousands separators, and decimal point delineators are all different depending on which country you're in. In some countries, the currency symbol goes in front, in others it goes after the number.

It's annoying, but not that hard to just do the Swift version of
code:
BOOL valid = NO;
NSNumber *currency = [currencyFormatter numberFromString:string];
if(currency == nil) {
    NSNumber *decimal = [decimalFormatter numberFromString:string];
    if(decimal != nil) {
        valid = YES;
    }
} else {
    valid = YES;
}
 

UIApplication posted:

Dehumanize yourself and face to regex

You could try this, but you'll have to handle different currency symbols somehow unless you very specifically are only accepting values in US dollars.

edit: I could've sworn there was a "requires currency symbol" property for NSNumberFormatter that you could turn off so it'd take "100.0" and "$100.00" but I guess not.

Doc Block fucked around with this message at 06:14 on Apr 11, 2016

Doc Block
Apr 15, 2003
Fun Shoe

Doc Block posted:

I could've sworn there was a "requires currency symbol" property for NSNumberFormatter that you could turn off so it'd take "100.0" and "$100.00" but I guess not.

Found it, sort of.

NSNumberFormatter has a lenient property that, when set to YES on a currency style formatter, will allow the user to enter currency without the currency symbol. Be aware that this could potentially allow an invalid number to be accepted as a valid one, though.

Also, while not related to your specific issue, be careful when using floating-point numbers to represent money. Use doubles instead of floats if you really have to use floating-point numbers, etc. etc. etc.

Doc Block fucked around with this message at 06:36 on Apr 11, 2016

Adbot
ADBOT LOVES YOU

brap
Aug 23, 2004

Grimey Drawer
Does Foundation even have a decimal number type? (i.e. capable of representing 0.3 - 0.2 as exactly 0.1)

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