Search results for

eskimo

35,039 results found

Post

Replies

Boosts

Views

Activity

Reply to WebView not working with Xcode 7
First up, I moved your question to Core OS > Networking.Second, are you aware of App Transport Security (ATS)? If not, you should read the App Transport Security Technote, which has all the details.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Aug ’15
Reply to let constant initialization in the control flow statements
That is, indeed, quite strange. Notably, this only affects code at the top level of the program; the same code in a function works as expected.func foo(condition: Bool) { if condition { let s: String s = foo // compiles just fine print(s) } }You should file a bug about this. Please post your bug number, just for the record.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’15
App Transport Security Tip
If you're dealing with App Transport Security (ATS), here's one small snippet from the OS X El Capitan Developer Beta 6 Release Notes that you might have missed (I know I did)...The nscurl tool on OS X El Capitan supports diagnosing ATS secure connections. For example, /usr/bin/nscurl --ats-diagnostics https://www.example.com will display ATS connection information for www.example.com. Run /usr/bin/nscurl -h for more information. The nscurl tool is useful in general, but this option is particularly valuable when debugging ATS issues. In addition, if you’re trying to work out exactly what TLS parameters your server supports, one good option is to connect to it using TLSTool. For example:$ TLSTool s_client -connect forums.developer.apple.com:443 * input stream did open * output stream did open * output stream has space * protocol: TLS 1.2 * cipher: ECDHE_RSA_WITH_AES_256_GCM_SHA384 * trust result: unspecified * certificate info: * 0 rsaEncryption 2048 sha256-with-rsa-signature 'forums.developer.apple.com' * 1 r
0
0
15k
Aug ’15
Moving to Fewer, Larger Transfers
Note Much of this content has been rolled into URL Loading System documentation, but I’m leaving this doc here for my own reference. URLSession background sessions are optimised for transferring a small number of large resources. Moreover, it’s best if the transfer is resumable. This design makes the best use of client device resources and the available network bandwidth. If your app runs a lot of tasks in a background session, you should rethink its design. Below you’ll find a number of options you might consider. Most of these options require server-side support. If your server does not have this support, and you can’t add it — perhaps you’re writing a client app for a server you don’t control — you won’t be able to implement these options directly. In that case consider creating your own server that sits between your app and the final server and implements the necessary smarts required to optimise your app’s network usage. If that’s not possible, a final option is to not use a background session but instea
0
0
5.9k
Aug ’15
NSURLSession’s Resume Rate Limiter
IMPORTANT The resume rate limiter is now covered by the official documentation. See Use background sessions efficiently within Downloading files in the background. So, the following is here purely for historical perspective. NSURLSession’s background session support on iOS includes a resume rate limiter. This limiter exists to prevent apps from abusing the background session support in order to run continuously in the background. It works as follows: nsurlsessiond (the daemon that does all the background session work) maintains a delay value for your app. It doubles that delay every time it resumes (or relaunches) your app. It resets that delay to 0 when the user brings your app to the front. It also resets the delay to 0 if the delay period elapses without it having resumed your app. When your app creates a new task while it is in the background, the task does not start until that delay has expired. To understand the impact of this, consider what happens when you download 10 resources. If you pass them to th
0
0
13k
Aug ’15
Testing Background Session Code
Debugging code that runs in the background on iOS is tricky because the act of running your app in the debugger affects how it behaves. This is especially true with URLSession background session code. I regularly see folks confused about how to test and debug such code, and this is my attempt to help with that. If you have questions or comments about this, start a new thread and tag it with Foundation and CFNetwork so that I see it. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com Testing Background Session Code Testing an app that uses a URLSession background session is tricky because of the differences between the test environment and the production environment. This post explains those differences and describes how you can effectively test your background session code. Confusing Behaviours When testing background session code you might encounter four common sources of confusion: When you run your app from Xcode, Xcode ins
0
0
31k
Aug ’15
Reply to VoIP on lock screen issues
If iOS has killed your app it should generate a crash log for that event. Do you see such a log?See Technote 2151 Understanding and Analyzing iOS Application Crash Reports for information on how to get these logs.My guess is that you’ll see a log with the 0xbad22222 exception code but let’s confirm that before we get into the details. Finally, I want to address this:I've developed a simple VoIP app using the old keep alive timeout approach (not PushKit) including a inputstream and outputstream.Developing new code with an old, now-officially-deprecated API, is a poor choice IMO.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Aug ’15
Reply to nsnetservicebrowser not finding nearby devices with some routers
Is this issue router specific?I’ve seen lots of problems where buggy Wi-Fi access points (APs) cause Bonjour to misbehave. Bonjour requires that Wi-Fi multicast works correctly. Wi-Fi multicast is a relatively infrequently used feature otherwise, so it’s not uncommon to see APs that don’t implement it properly.This is especially true for APs built in to DSL gateways. The first thing I do when I install a new DSL gateway at home is disable its Wi-Fi and connect my trusty AirPort base station (in bridge mode) to provide reliable Wi-Fi service.If yes, what kind of router settings can cause such issue?If the problem occurs 100% of the time, you should look to see if the AP has a specific UI to enable multicast. High-end APs typically have such a feature because multicast is a relatively expensive operation on Wi-Fi, so enterprise environments will sometimes want to disable or limit it.If the problem is intermittent then you should try restarting the AP. A lot of the time that helps.If you want to test your code w
Aug ’15
Reply to How can I avoid repeating account permission requests in El Capitan?
Can you post a screen shot of one of these dialogs?IMPORTANT DevForums doesn’t let you post images, so you’ll have to put the screen shot elsewhere and post a link. That will, in turn, require moderator approval, although that won’t be a problem. We are well aware of how clumsy this is (r. 22028729). Sorry.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: Privacy & Security SubTopic: General Tags:
Aug ’15
Reply to Using IOKit with a VFS Kext
I vaguely remember hearing that mixing and matching IOKit and BSD drivers was not recommended.I wouldn’t say “not recommended”, rather I’d say “tricky”. When your KEXT spans multiple kernel environments you have to be careful to follow the rules of each environment. Back in the day that was particularly tricky because the BSD side of the world was controlled by giant man-eating locks (the kernel funnels). That problem is long gone but various other issues remain. You still have two threading models, two memory management models, two locking models, and so on, and you have to follow the rules of both.Having said that, there are plenty of kernel components that do that—the most obvious example in this context being IOMediaBSDClient—so it’s fine to do as long as your careful.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’15
Reply to Is Apple going to release new version of Reachability classes to support IPV6 address?
I don’t think that will be a problem. Even if the device only has IPv6 connectivity to the outside world, it should still be able to get to link-local IPv4 addresses (169.254/16), which is what +reachabilityForLocalWiFi uses. Have you tried this in the IPv6-only test environment that we introduced at WWDC?Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Aug ’15
Reply to NSURLSessionConfiguration leaking
I've been trying to find where its stated that we have only one urlsession per app.Whoa, that’s not what I wrote. What I said was:NSURLSession objects are intended to be long-lived.A common usage pattern is to create a single session object at app launch and have it persist for the duration of the app.Creating a new session object per request is needlessly inefficient.All of these are true. None of these preclude you having multiple NSURLSessions within your app, and in some contexts that makes perfect sense. However, created and invalidate a session for every request is definitely not recommended.The goal of the session API is for you to have a session for each logically distinct type of request. For example:Different subsystems within your app might each use their own session to avoid any cross talk.A web browser might use a separate session for each private browsing tab.A mail app might have a separate session per account (so it can control things like the TLS version numbers).You might use separate sessio
Aug ’15
Reply to Automatic authentication with matching client certificates?
I definitely recommend that you file a bug about this. It doesn’t sound like a deliberate change but, even if it were, the fact that it’s causing substantial user-level grief is bugworthy.Please post your bug number, just for the record.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: Privacy & Security SubTopic: General Tags:
Aug ’15
Reply to Swift setsockopt SOL_SOCKET SO_RCVTIMEO gets invalid argument
See the answer you got to your exact same post on Stack Overflow.Alas, that answer is incorrect. If it were, then the following C code would also fail, which it does not.BOOL success; int s; struct timeval tv = {3, 100000}; s = socket(AF_INET, SOCK_STREAM, 0); success = setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) == 0; if (success) { NSLog(@success); } else { NSLog(@error %d, errno); }The actual issue relates to sizeof. In C this returns 16 (at least in the 64-bit case, which is what I was testing), whereas in Swift it returns 12. That’s a well-known discrepancy related to how padding at the end of structures is handled. If you want the C value from Swift, use strideof. So, with the following single line change, jphughes’s Swift code works just fine. let tvSize = socklen_t(strideof(timeval))Except that you’re not allowed to look at errno without confirming that you did actually get an error by first checking the function result. So the end of the code should look more like the C code I posted
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’15