|
Should I just make some sort of publicly accessible endpoint on my end that determines if we can hit our API? If a request fails, see if we can hit that instead? Because this sucks.
|
# ? Jun 22, 2015 18:43 |
|
|
# ? Jun 5, 2024 21:40 |
|
Someone wrote an XCode plugin to integrate our newly-released Infer stuff, which I thought might be of interest to this thread: https://github.com/markohlebar/XInferDoh004 posted:Should I just make some sort of publicly accessible endpoint on my end that determines if we can hit our API? If a request fails, see if we can hit that instead? Because this sucks. If you do this (which does suck, and to which people do resort) make sure you validate the response. Captive portals will often happily give you back an HTTP 200 when serving up their interception page.
|
# ? Jun 22, 2015 18:53 |
|
Doh004 posted:Should I just make some sort of publicly accessible endpoint on my end that determines if we can hit our API? If a request fails, see if we can hit that instead? Because this sucks. We typically do this with most APIs. To make it useful we use it as the auth tester / version indicator so you get those features too.
|
# ? Jun 22, 2015 20:26 |
|
Subjunctive posted:Someone wrote an XCode plugin to integrate our newly-released Infer stuff, which I thought might be of interest to this thread: https://github.com/markohlebar/XInfer If you have a better solution please do share. Reachability just tells you that DNS was able to resolve the name and one or more of the returned IPs matches a route for an available network interface. It does not prove the service is actually reachable at all. If we have errors then we do try to download truth.txt from our HTTPS server thing and validate the body is correct. It's the only way to be sure. The bullshit captive portals pull to lie is amazingly awful (because their unique snowflake login page doesn't work in the normal minibrowser apparently). I hate those assholes with a burning passion.
|
# ? Jun 22, 2015 22:46 |
|
Doing a simple https fetch of a static file is best I think, yeah.
|
# ? Jun 22, 2015 23:25 |
|
Or you can do certificate/SSL pinning (do this anyway plz) and your https connections should spew errors if the certs from the connection aren't yours. edit: For example, in what you've described, rear end in a top hat wifi networks/an attacker could serve up truth.txt on their own and keep loving you up. Using just https without pinning proves very little about what server you're hitting. ultramiraculous fucked around with this message at 23:58 on Jun 22, 2015 |
# ? Jun 22, 2015 23:54 |
|
ultramiraculous posted:Or you can do certificate/SSL pinning (do this anyway plz) and your https connections should spew errors if the certs from the connection aren't yours. Assuming your server SSL is properly configured, don't the new iOS 9.0 SSL policies take care of this?
|
# ? Jun 23, 2015 02:03 |
|
Even if it does, it's gonna be a while before there are few enough pre-iOS 9 users that you can just drop them and rely solely on the iOS 9 SSL stuff.
|
# ? Jun 23, 2015 02:26 |
Hey, iOS custom keyboard extension question. Anybody know whether there is some reason why CBCentralManager would not work within an extension? I'm trying to init a scan for peripherals and it's coming back with ble.CM.state == 2. Is there something I need to enable?
|
|
# ? Jun 23, 2015 02:59 |
|
lord funk posted:Yay app release day! I was just messing around with this and not only is it awesome, but my wife is super excited to show it to and try it out with some of her kids at work who need / use music therapy (she deals with a wide range of autism spectrum kids). Also a good reminder for me to pick up TC-11, because I don't want to get any work done this summer!
|
# ? Jun 23, 2015 03:02 |
|
Doctor w-rw-rw- posted:Assuming your server SSL is properly configured, don't the new iOS 9.0 SSL policies take care of this? It makes pinning less necessary because it requires TLS 1.2, which won't fall back to HTTP, among other things. AFAIK pinning is still a good idea in that case (and seriously not that hard). TLS still assumed that the known Certificate Authorities in the iOS install are universally trustworthy. Pinning lets you tighten up that filter down to public keys you trust. Gonna stop saying things because I'm worried pr0zac is gonna show up and yell at me...
|
# ? Jun 23, 2015 03:16 |
Data Graham posted:Hey, iOS custom keyboard extension question. Following up—I read this https://developer.apple.com/library...014214-CH16-SW3 And I enabled RequestsOpenAccess, but I guess Bluetooth/CBCentralManager isn't included in this? Am I just wasting my time?
|
|
# ? Jun 23, 2015 03:33 |
|
Pinning is not without risk; it's not a checklist item that everyone show take care of as a matter of course. Pinning people to the wrong site suuuuuuuucks.
|
# ? Jun 23, 2015 03:43 |
|
Data Graham posted:Following up—I read this https://developer.apple.com/library...014214-CH16-SW3 It's quite possible. While that document is very unhelpful for trying to make it through App Review, it seems to exhaustively list the possible capabilities of a custom keyboard.
|
# ? Jun 23, 2015 03:44 |
|
pokeyman posted:While that document is very unhelpful for trying to make it through App Review
|
# ? Jun 23, 2015 03:47 |
|
The part of App Transport Security where you can enable it or disable it for certain servers (or turn it off entirely) just by adding keys to Info.plist seems ripe for exploitation.
|
# ? Jun 23, 2015 04:38 |
|
Doc Block posted:The part of App Transport Security where you can enable it or disable it for certain servers (or turn it off entirely) just by adding keys to Info.plist seems ripe for exploitation. Not necessarily; Info.plist is signed. https://developer.apple.com/library...0005929-CH3-SW3
|
# ? Jun 23, 2015 04:49 |
|
Subjunctive posted:Pinning is not without risk; it's not a checklist item that everyone show take care of as a matter of course. Pinning people to the wrong site suuuuuuuucks. Yeah, Iiiiii guess you're right. It's easy to set up, but you have to be really thoughtful about what you pin to or, yeah, I can imagine cases where you ship an app that is/will eventually be broken.
|
# ? Jun 23, 2015 09:57 |
|
Doctor w-rw-rw- posted:Not necessarily; Info.plist is signed. Sure, but my understanding is that code signing is trivially easy to get around on jailbroken devices.
|
# ? Jun 23, 2015 12:54 |
|
Doc Block posted:Sure, but my understanding is that code signing is trivially easy to get around on jailbroken devices. Sure, but the point of ATS is to protect the user from other attackers. If they want to subvert that protection for themselves,
|
# ? Jun 23, 2015 13:10 |
|
Doc Block posted:Sure, but my understanding is that code signing is trivially easy to get around on jailbroken devices. If you're at the point where the device is jailbroken, changing plists is probably more of a pain than just monkey-patching out the ATS checks entirely.
|
# ? Jun 23, 2015 13:24 |
|
Lumpy posted:I was just messing around with this and not only is it awesome, but my wife is super excited to show it to and try it out with some of her kids at work who need / use music therapy (she deals with a wide range of autism spectrum kids). Awesome! If she ever takes any pictures please send them to me.
|
# ? Jun 23, 2015 13:57 |
|
React Native playground app was accepted: https://rnplay.org/ You can make and share snippets like a jsfiddle or Swift playground, and then click to launch them in the harness app to see it in action. It is a killer experience.
|
# ? Jun 23, 2015 18:11 |
|
Alternatively: Exponent http://exp.host/
|
# ? Jun 23, 2015 21:38 |
|
Three apps, and a total of about 10 releases and now one of them gets rejected for something it's had all along. Roll the dice! It's app review time! Big money no whammies!
|
# ? Jun 24, 2015 15:22 |
|
I got a contrived Cocoa (OS X) question. Assume that I have a single column NSTableView that's populated via a data source (not through binding via a controller). The data source returns strings and the string value is bound to each cell through "objectValue". Is there a way I can properly configure the Sort attributes for the NSTableColumn in such a way so that I can just pass them to sortedArrayUsingDescriptors? There's obviously the hack-y workaround of wrapping the array contents into dictionaries and then setting the sort key value to the appropriate dictionary key but I keep thinking there must be a more straightforward way.
|
# ? Jun 25, 2015 09:28 |
|
shodanjr_gr posted:I got a contrived Cocoa (OS X) question. Assume that I have a single column NSTableView that's populated via a data source (not through binding via a controller). The data source returns strings and the string value is bound to each cell through "objectValue". Is there a way I can properly configure the Sort attributes for the NSTableColumn in such a way so that I can just pass them to sortedArrayUsingDescriptors? There's obviously the hack-y workaround of wrapping the array contents into dictionaries and then setting the sort key value to the appropriate dictionary key but I keep thinking there must be a more straightforward way. Just use a key of "self" in your sort descriptor. Also eventually you'll want to use real objects for this stuff so why not do so now? (Not just a dictionary…)
|
# ? Jun 25, 2015 10:54 |
|
eschaton posted:Just use a key of "self" in your sort descriptor. Could have sworn i tried that last night and for some reason it wasn't working. Seems to work fine today . Thanks . quote:Also eventually you'll want to use real objects for this stuff so why not do so now? (Not just a dictionary…) Yeah that's what I'm doing but I was trying to figure out the contrived edge case.
|
# ? Jun 26, 2015 05:04 |
|
I'm super new to Xcode. Is there a way to conditionally run some script during the compile phase? For instance, when I'm compiling and running on the simulator, I don't need to do anything. But when running on an actual device, I need to run some command line scripts. I don't even know what to search for on Google for something like this.
|
# ? Jun 28, 2015 04:01 |
|
You want to add a Run Script build phase to your target, and then you want to just hit build once and look at the log in the log navigator to see what environment variables are available for you. Hopefully you'll find one that easily allows you to check if you're building for simulator or device. You'll probably find some other helpful ones here too. Then you can build out your script from there.
|
# ? Jun 28, 2015 04:09 |
|
If it's helpful, I'm almost certain there's an ENV flag I've used for this. You should be able to check for IS_IOS_SIMULATOR at the top of your build script before you do anything.
|
# ? Jun 28, 2015 05:34 |
|
pokeyman posted:You want to add a Run Script build phase to your target, and then you want to just hit build once and look at the log in the log navigator to see what environment variables are available for you. Hopefully you'll find one that easily allows you to check if you're building for simulator or device. You'll probably find some other helpful ones here too. Then you can build out your script from there. ultramiraculous posted:If it's helpful, I'm almost certain there's an ENV flag I've used for this. You should be able to check for IS_IOS_SIMULATOR at the top of your build script before you do anything. Thanks! Got it working with the following script: code:
|
# ? Jun 28, 2015 06:09 |
|
I find it highly amusing (in a sympathetic way) that the official Swift blog crashes mobile Safari.
|
# ? Jun 28, 2015 19:57 |
Apropos of nothing, when that Apple Music artist-payments-during-the-first-3-months backpedal thing happened, CNN had a headline up of "Apple backs down from Swift". Talk about a double-take
|
|
# ? Jun 28, 2015 20:05 |
|
Data Graham posted:Apropos of nothing, when that Apple Music artist-payments-during-the-first-3-months backpedal thing happened, CNN had a headline up of "Apple backs down from Swift". Glad someone else noticed this
|
# ? Jun 29, 2015 02:49 |
|
I'm playing with an iOS 9 device and Xcode-Beta and am running into some trouble with my SSL connections. The server does make a TLS 1.2 connection (verified with latest OpenSSL binaries on Windows), but the certificate is self signed. I'm using NSURLConnection and the delegate to authenticate against the protection space in didReceiveAuthenticationChallenge with [[challenge sender] useCredential:[NSURLCredential credentialForTrust:[protectionSpace serverTrust]] forAuthenticationChallenge:challenge]; But I'm getting back the error: Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo=0x165ce0c0 {NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorCodeKey=-9802, NSErrorFailingURLStringKey=https://SERVER_URL/, _kCFStreamErrorDomainKey=3, NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x165b7c90>, NSUnderlyingError=0x165c01e0 "An SSL error has occurred and a secure connection to the server cannot be made.", NSErrorFailingURLKey=SERVER_URL/} Anyone have any ideas? Edit: I'm dumb and didn't realize that the traffic was being interpreted differently since we aren't using the standard 443 port. So now I can see the SSL handshake traffic. With the global exclusion in the plist, I have a successful TLS 1.2 session. Without the global exclusion it gets to the Server Key Exchange step and the connection is terminated (The next step of client key exchange never happens). I think it's because the certificate isn't trusted, even though I'm telling NSURLConnection to trust it. Edit 2: Maybe what's happening is that the certificate is signed and references a CA that has an IPv4 address instead of a domain name? mrbass21 fucked around with this message at 21:18 on Jul 1, 2015 |
# ? Jun 29, 2015 05:41 |
|
Have you tried whitelisting the domain in your Info.plist? Google for NSAppTransportSecurity. EDIT: nm
|
# ? Jun 29, 2015 06:07 |
|
I'm trying to programmatically add cells to a UITableView that has static cells via a storyboard. Is there any way I can do this?
|
# ? Jul 1, 2015 16:50 |
|
TheReverend posted:I'm trying to programmatically add cells to a UITableView that has static cells via a storyboard. Override the relevant UITableViewDataSource methods in your view controller subclass? edit: Also I'd like to humbly suggest that you're mixing two things that probably won't taste great together. But I'm guessing it can be done if you try hard enough. pokeyman fucked around with this message at 17:54 on Jul 1, 2015 |
# ? Jul 1, 2015 17:02 |
|
|
# ? Jun 5, 2024 21:40 |
|
Yeah that's what I feared
|
# ? Jul 1, 2015 23:47 |