Search results for

eskimo

35,024 results found

Post

Replies

Boosts

Views

Activity

Reply to Issues with sharedSession.downloadTaskWithURL in Swift 2
The problem is that your completion blocks parameters are all implicitly unwrapped optionals whereas the latest Swift compiler expects them to be simply optionals (the latter makes more sense because you can reasonable expect them to be nil).So, the following code will compile in Xcode 7.0b5.let messageURL = NSURL(string: https://www.apple.com) let sharedSession = NSURLSession.sharedSession() let downloadTask: NSURLSessionDownloadTask = sharedSession.downloadTaskWithURL(messageURL!, completionHandler: { (location: NSURL?, response: NSURLResponse?, error: NSError?) -> Void in let urlContents = try! NSString(contentsOfURL: location!, encoding: NSUTF8StringEncoding) print(response : (response)) print(urlContents) }) downloadTask.resume()I had to make four changes:the above-mentioned change to the completion block parameters in line 5adopting Swift 2 error handling in line 7switching from var to let, also in line 7force unwrapping location, still in line 7Of course this code is still not correct because, if th
Aug ’15
Reply to push serverTrust from NSURLProtocol to NSURLSessionDelegate
This is not possible. The fundamental problem is that there’s no equivalent to -connection:canAuthenticateAgainstProtectionSpace: in NSURLProtocolClient. That’s required because NSURLConnection delegates are not expecting to be sent arbitrary challenges via -connection:didReceiveAuthenticationChallenge:; for anything except simple user name and password challenges, they have to opt in via -connection:canAuthenticateAgainstProtectionSpace:. I called out this limitation in the read me of the CustomHTTPProtocol sample code.Having said that this usually isn’t a problem because either you control the client (that is, the NSURLConnection delegate) or you don’t. If you do, you can use some private handshake to get at the authentication challenges. If you don’t, then sending them arbitrary challenges isn’t going to do anything useful anyway.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 The computation time for the same block of simple calculation varies significantly in IOS 8.4
The computation time for that same block of code should always be: 0.031 seconds or something close to that one [...]That’s an unreasonable expectation. There are lots of things that can cause computation time to vary significantly from run-to-run. The most obvious ones that spring to mind are:thread schedulingthermal (the system slows down the CPU as it gets hotter)Artificially tests like this one are useful in some situations but I suspect that in this case you’ll have to take a step back and discuss what your app is trying to do at a higher level.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 os_trace doesn't ever show output
You should read my posts in this thread in the old DevForums, where I gave multiple sets of precise steps for testing os_trace. Alas, I don’t have time to repeat those tests today, so stuff might have changed, but it will at least give you a baseline.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 SecKeyRef always nil in Xcode 7 Beta 5
Here is my code about the these for PeerPublicKey…OK. But I also asked for a dump of an example key. You can generate such a dump by simply adding this line to the start of +addPeerPublicKey:withPublicKey:. NSLog(@publicKey = %@, publicKey);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 NSFileManager and sandboxing
What is the best way to allow the user to see everything in their home folder by default?There is no way to do that (because it would largely undermine the whole point of the app sandbox). You will have to rework your UI to ask the user to choose the root of the directory hierarchy that they want to browse with your app. This represents explicit consent by the user for your app to access items within that hierarchy.Once the user has done this you can use a security-scope bookmark to retain access to that hierarchy between launches of your app.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: Code Signing SubTopic: General Tags:
Aug ’15
Reply to Xcode 6.4 Error even though code nothing
Looking in Xcode’s console pane in your second screen shot, I see an indication that your app is dying because of an unhandled language exception. There’s two ways to further investigation this:Expand the console pane to see the exception message. That will often give you enough information to work out what’s going wrong.If you want to see where the exception was thrown, use the Breakpoint Navigation to add a an exception breakpoint (click the ‘add’ button at the bottom left of the navigator).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 Debugging Release Version
In my experience problems like this are often caused by memory management issues, so I generally start out by taking the usual memory management debugging steps:enable all the compiler warnings and fix anything that it complains aboutfix any issues reported by the static analyserrun the app with zombies enabledrun the app with address sanitiser enabled (a new feature in Xcode 7)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 Equatable for structs: compare all fields?
Is using the Equality protocol the right thing to do in this situation or is it confusing for the client that two structs with different values are treated the same?I think the key point is “is it confusing for the clients”. Do you think it’ll be confusing? It’s hard for us to say without knowing more about how your various interfaces fit together.There are lots of situations where equality ignores some state. Consider a mutable array implementation. When you add an element to the array, you want to grow the array in chunks to improve efficiency. So, the array has both a ‘count’ (the actual number of elements in the array) and a ‘capacity’ (the size of the array’s buffer). No one would ever suggest that the array include ‘capacity’ in its equality determination.This example is easy because ‘capacity’ is internal state. However, there are other examples that are less clear cut. Consider a string implementation. It’s likely that you want it to be able to represents multiple different strings that all compare as
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’15
Reply to SecKeyRef always nil in Xcode 7 Beta 5
Hi Mr. Eskimo,Thanks for your reply and sorry I forgot to give you a dump of example key. Here is my example key:publicKey = <30818802 8180d4e7 f650365c 80bd7201 42968410 74c49767 ab23539f c5b4a3a2 e14299fe 48427292 24752a76 a5a73a62 65f55d81 8066489a e183435a edc40eba 48e53b1a 84d8489b 17e1fa11 6ac5c40e cbf0fa4f c73ccf4c ea79867b 8259bca6 00f7805c 8fa8028e 6352354c cd4f1862 68a8f0ae e692bb27 4748dc35 00eac86f 161939b2 c90f0203 010001>Hope you can help me.. 🙂Thanks.
Topic: Privacy & Security SubTopic: General Tags:
Aug ’15
Reply to Can swift make 32bit OSX 10.10 Application?
Can swift make 32bit OSX 10.10 Application?No. Swift requires the ‘modern’ Objective-C runtime, which isn’t present on i386.I should also point out that the minimum deployment target for Swift on OS X is 10.9, which only runs on 64-bit capable hardware (10.6 was the last OS that supported 32-bit hardware).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
Reply to get current WiFi ssid
Does anyone know in which iOS8 update this was introduced?No version of iOS 8 has, or will get, this restriction. I don’t know where these reviews are coming from but picobit’s theory sounds reasonable to me.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 get current WiFi ssid
RLKingSoftware wrote:There is no reasonable expectation of privacy with a broadcast SSID […]I strongly disagree with this. The collection of SSIDs that the user’s device associates with is a fairly accurate fingerprint of that user. Moreover, that fingerprint is persistent, correlatable between apps, and can’t be reset by the user. Those are all Bad Things™ from a privacy perspective.I totally agree that there’s a balance to be struck between privacy and utility here, but arguing that there’s no privacy case to answer is naïve.SolarCat wrote:(which is why all of my personal networks don't broadcadt their SSID)Which is kid sister security IMO because all APs broadcast their BSSID, which is much more identifying (typically it’s the MAC address of the AP). Notably, CNCopyCurrentNetworkInfo also gives you the BSSID )-: maverick808b wrote:I just don't get it, how can a user's exact location 24/7 from GPS be permitted, yet broadcast SSIDs and BSSIDs are somehow considered totally off limits!?It’s because that acces
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’15