Search results for

eskimo

34,986 results found

Post

Replies

Boosts

Views

Activity

Reply to Resources for scriptable Swift OS X Apps
I’ve not seen this covered specifically but you should be able to do it using the standard Cocoa infrastructure.One gotcha is that the .sdef file holds class names, so you’ll have to either supplied the mangled Swift class name or use @objc(Foo) in your Swift source to control the class name. 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:
Sep ’15
Reply to indexesOfObjectsPassingTest replacement for Swift Array
What is the best replacement for indexesOfObjectsPassingTest when using Swift arrays?You’ve got some good replies here but I fear you might be asking the wrong question. -indexesOfObjectsPassingTest: works well in an NSArray world because NSArray supports other handy-dandy methods like -objectsAtIndexes:, -replaceObjectsAtIndexes:withObjects:, and so on. Swift arrays don’t support those, but they have lots of other neat-o features. If you describe more about your high-level goal, you may find a more Swift-y solution. 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:
Sep ’15
Reply to Why does NSHost.names only return one result?
Thanks, eskimo, for the supplied code which does not resemble much Swift but seems to be the only solution—for now. 😐 I will modify it to do an IP address reverse lookup and see if the result is what I expect which nobody can tell me right now. I'll submit the code for other developers' reference as soon as I got it working.Regarding the idea for an enhancement request—I just posted a request with the following bug tracking ID: 22576570Regards,Mati
Sep ’15
Reply to get current WiFi ssid
Thanks Eskimo. I wanted to add my concerns and my use case for reading the connected SSID as well.My app controls a connected-home hardware device that pairs with user's home network to let the user manage the device remotely. Knowing the SSID during this pairing process is crucial while we walk the user through the setup so we can ensure that they are connected to the correct device throughout the setup. There may be some workarounds that could potentially provide a stable way to detect and isolate these connection scenarios, but I have to restructure a lot of the setup process to even try it out. Until I am able to get a new solution in place, we have to recommend to our customers to not update to iOS 9.
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’15
Reply to iOS TCP Client: downloading big text file
Guys. Thank you so much for your help!guywithmazda. Yes, this does address the problem. However, since eskimo says it is the wrong approach, I had to reconsider it.eskimo. I did read your RemoteCurrency code many times, particularly the QCommandConnection class. I tried to replicate it in swift, but faced difficulties converting some code. It would really be great if the example was updated in Swift.Meanwhile, I tried to incorporate both comments and came up with the following:func stream(theStream : NSStream, handleEvent streamEvent : NSStreamEvent) { switch (streamEvent) { ... case NSStreamEvent.HasBytesAvailable: processInput() case NSStreamEvent.HasSpaceAvailable: self.hasSpaceAvailable = true processOutput() case NSStreamEvent.ErrorOccurred: println(NSStreamEventErrorOccurred); var connectionError : NSError = theStream.streamError! let errorMsg = NSString(format: Obtaining navdata information requires connection with X-Plane.n Error %li: %@, connectionError.code, connectionError.localizedDescrip
Sep ’15
Reply to Can't Build xnu-2782.20.48
I'm having some issues building the xnu-2782.20.48 kernel source.You might have more luck posting over on the Darwin-kernel mailing list, where there’s more folks with experience building the kernel from source.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:
Sep ’15
Reply to TLS server trust caching with two NSURLSessions
The platform is iOS and I'm targeting iOS 8.0+.I recommend you testing with iOS 9 beta; this feature got broken at some point (I think with iOS 8) and wasn’t fixed until iOS 9 )-:Often session:didReceiveChallenge: is invoked twice, sometimes just once, and sometimes not at all!Make sure to disable caching on your requests, otherwise you might be getting answers from the cache.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Sep ’15
Reply to Has anybody got entitlement for SimpleTunnel sample app for NetworkExtension framework iOS 9 beta
Lots of folks have received approval already (you’ll find other threads discussing this API right here in this topic area of DevForums) but it can take a while.I have submitted my request to networkextension@apple.com some days back and I still don't have any response from them.Do you mean “no response” or “no approval”. That is, did you get the auto ACK that includes the questionnaire?Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Sep ’15
Reply to NSURLSession, NSURLSessionUploadTask, NSURLSessionDownload task delegates not firing. NSURLSession in one class (Singleton), NSURLUploadTask and NSURLDownloadTask and related delegates in sub classes of NSOperation
I recommend against starting a session per request. Read see this thread for more information.There are at least three ways to resolve this:Use the NSURLSession task creation methods that implement a completion handler block.Have your QueueController class accept raw delegate events, handle all the common work, and then pass the request-specific stuff up to your TransferModel subclass via its own delegate protocol.Use something like the QNSURLSessionDemux class (which you’ll find in the CustomHTTPProtocol sample code) to do a full demultiplex.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Sep ’15
Reply to iOS and Wi-Fi Direct
How does it do this when the two devices need not be on the same network?Via an Apple-specific (not Wi-Fi Direct) peer-to-peer Wi-Fi protocol.It seems the WiTap sample code requires all instances to be on the same network already, is that correct?No. Although don’t take my word for it, try it yourself:grab two iOS devicesNote the only requirement is that they each must be new enough to have a Lightning connector. Peer-to-peer Wi-Fi support is not tied to the Lightning connector, it's just a helpful coincidence that the hardware that supports peer-to-peer Wi-Fi also happens to have a Lightning connector and thus it's an easy way to identify that support.on each, forget the infrastructure Wi-Fi networkon each, disable Bluetooth (which implements a different form of Apple-specific, Bonjour + TCP/IP peer-to-peer networking)on each, run WiTap and start a ‘game’This is the problem we're trying to solve: there's no infrastructure Wi-Fi network. Our peripheral can host a network, but we'd like to avoid making the use
Sep ’15
Reply to Why works on swift 2 beta 1 not on beta 6
It’s hard to say exactly what’s going on here without looking at a packet trace, but you’re definitely dealing with authentication incorrectly. In general, the NSURLSessions subsystem ‘owns’ the Authorization header of the HTTP[S] requests they send. You shouldn’t be manually trying to set up the header. Rather, you should handle authentication challenges via the authentication challenge delegate callbacks. Here’s an example of how to handle the authentication challenge posed by that server.class MyClass: NSObject, NSURLSessionDelegate { var session: NSURLSession! @IBAction func testAction(sender: AnyObject) { if self.session == nil { let config = NSURLSessionConfiguration.defaultSessionConfiguration() config.requestCachePolicy = .ReloadIgnoringLocalCacheData // simplifies testing by forcing a new request each time self.session = NSURLSession(configuration: config, delegate: self, delegateQueue: NSOperationQueue.mainQueue()) } self.session.dataTaskWithURL(NSURL(string: http://apps.solu4b.com/beepinservice/Bee
Sep ’15
Reply to iOS TCP Client: downloading big text file
Another option that I came up with would be this:Right. That’s more along the lines of the approach I now use. Consider the code in TLSToolCommon in the TLSTool sample code:bytesRead = [self.inputStream read:buffer maxLength:sizeof(buffer)]; if (bytesRead > 0) { (void) fwrite(buffer, 1, (size_t) bytesRead, stdout); (void) fflush(stdout); }It simply reads the bytes and ignores any non-positive result. That’s because a result of 0 will trigger a subsequent .EndEncountered event and a negative result will trigger a subsequent .ErrorOccurred event. However, it still does not address the issue of closing the connection right after the full text has been downloaded.Can you be more specific about that problem? Once you get the .EndEncountered event, you’ve received all the bytes you’re going to receive, so I’m not sure as to what problem you’re still having here. Another issue is performing functions on the downloaded text. I would like to extract a part of the full downloaded text. What happens is the applicatio
Sep ’15
Reply to Can my app get permission to rename one of its files when installed in Applications on OSX?
… you can rename files in a code signed application without breaking the code signature.That’s not my experience.$ codesign -vv RenameTest.app RenameTest.app: valid on disk RenameTest.app: satisfies its Designated Requirement $ mv RenameTest.app/Contents/Resources/MainMenu.nib RenameTest.app/Contents/Resources/foo.nib $ codesign -vv RenameTest.app RenameTest.app: a sealed resource is missing or invalid file added: /Users/quinn/Desktop/RenameTest/build/Debug/RenameTest.app/Contents/Resources/foo.nib file missing: /Users/quinn/Desktop/RenameTest/build/Debug/RenameTest.app/Contents/Resources/MainMenu.nibShare 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:
Sep ’15
Reply to How to delete a certificate from KEYCHAIN using IOS keychain api
I’m not sure what you’re asking here. Some things to consider:Your question is about certificates but the code you posted tries to delete generic passwords (kSecClassGenericPassword) or keys (kSecClassKey) (although the way things are set up the former will override the latter).You’re discussing multiple applications but you haven’t discussed how, if at all, keychain sharing is set up between those applications.Are you talking about just a certificate or are you interested in a digital identity (that is, a certificate and a private key)? The latter would be used as a credential whereas the former would be used to check the credential of some other service. This distinction is important and is often a source of confusion.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:
Sep ’15
Reply to search with a loaded page
Can anyone point me in the right direction of how I can search a loaded page?What platform?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:
Sep ’15