Search results for

eskimo

34,986 results found

Post

Replies

Boosts

Views

Activity

Reply to If IOS9 allows TLS1.0 exception then doesn't this automatically relax the SHA-256 restraint?
I’m confused: why do you think that TLS 1.0 doesn’t support SHA2/256 certificates. Remember that is not the TLS cypher suite we’re talking about, but the signature hash algorithm within the certificate itself.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 Cannot set delegate in Swift
Just as a matter of style, I think Int would be better here. Both UInt and Int can hold invalid port values, so you still have to handle the ‘value out of range’ case. And Swift, in general, recommends Int over UInt unless there are really good reasons to do otherwise. Notably, if you look at the new-in-iOS 8 +[NSStream getStreamsToHostWithName:port:inputStream:outputStream:], you’ll see it uses Int. 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 your honest answer. I really wished to avoid using CFHost or DNS-SD with all the nasty C-Swift-bridging and UnsafePointer business, but it seems that I'm left alone with this solution.For my old Objective-C-based application I used a clean C implementation for the reverse lookup using arpa/inet.h and netdb.h, but for more complete results it seems I have to go the CFHost path anyway. So I'd better pull myself together and get a deep understanding of C-bridging in Swift and how to use UnsafePointer with sockaddr structs. 😉Currently I'm struggling with bus errors (aka BAD EXEC exceptions) as my pointers fail to be prepared corretly as it seems. Using Core Foundation with pointers is clearly doing away with the beauty of Swift's strong typing and elegant call-by-value and call-by-reference implementation.So, back to C—again ... 😢Cheers,Mati
Sep ’15
Reply to CSLocalizedString from strings files?
You can do this (see below) but it’s not exactly fun. If you need this sort of thing a lot, I encourage you to file an enhancement request for it. And if you do that, please post your bug number, just for the record.To work around this you can exploit the fact that .strings files are one of the supported dictionary serialisation formats, that is, you can initialise a dictionary from a .strings file. So you can write code like this: - (NSDictionary *)localizedStringDictionaryForKey:(NSString *)key table:(NSString *)tableName bundle:(NSBundle *)bundle { NSMutableDictionary * result; result = [[NSMutableDictionary alloc] init]; for (NSString * readLoc in [bundle localizations]) { NSString * writeLoc; NSURL * tableURL; NSDictionary * tableDict; NSString * localizedString; writeLoc = readLoc; if ([readLoc isEqual:@Base]) { writeLoc = bundle.developmentLocalization; } tableURL = [bundle URLForResource:tableName withExtension:@strings subdirectory:nil localization:readLoc]; if (tableURL != nil) { tableDict = [[NSDic
Topic: App & System Services SubTopic: General Tags:
Sep ’15
Reply to Network Extension VPN provider killed due to EXC_RESOURCE
Currently the throughput in wireless device can easily reach 10Mbits/s. If the length of packet is about 1500 bytes, then the number of the packets per second would be 873.Your logic assumes that:the network will be running at full speed for all of the 300 secondsthe device is fast enough that your process has the chance to sleep that many times per secondI’m not sure that this will happen in the real world. So, my advice is that you focus on the cause of the immediate problem (the crazy high number of wakes) and then, once that’s sorted out, test your provider to see if this actually happens in realistic scenarios.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 Why does NSHost.names only return one result?
Honestly, your best option here is to use a thin Objective-C wrapper around CFHost. You can access CFHost directly from Swift (see below) but the whole process is kinda ugly.As far as calling CFHost directly from Swift, here’s an example:func startResolve(addressStr: String) { // The copyDescription member of the CFHostClientContext struct is not marked as __nullable // <rdar://problem/22574088>, so Swift won't let us pass in nil, so we have a second unsafeBitCast // in the initialisation below. var context = CFHostClientContext( version: 0, info: unsafeBitCast(self, UnsafeMutablePointer<Void>.self), retain: nil, release: nil, copyDescription: unsafeBitCast(0, CFAllocatorCopyDescriptionCallBack.self) ) self.host = CFHostCreateWithName(nil, addressStr as CFString).takeRetainedValue() CFHostSetClient(self.host!, { (host, infoType, unsafeStreamError, info) in let obj = unsafeBitCast(info, AppDelegate.self) obj.resolveDidFinishWithStreamError(unsafeStreamError.memory) }, &context) CFHostScheduleWi
Sep ’15
Reply to Why does NSHost.names only return one result?
Oh yeah, and feel free to file an enhancement request for a Cocoa-y DNS API to replace NSHost. It’s been on the list of things to do for a while now, but it’s always good to hear from real developers about their requirements.And if you can suggest a good name for the class, that’d be fab! It’s annoying that NSHost has ‘stolen’ the obvious name.If you do file a bug, 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
Sep ’15
Reply to If IOS9 allows TLS1.0 exception then doesn't this automatically relax the SHA-256 restraint?
Does iOS9, built with SDK9, provide exceptions to use SHA-1 certs like the exception process for TLS1.0?Yes, and no (-:Yes, in that you can disable ATS entirely for a domain using NSExceptionAllowsInsecureHTTPLoads.No, in that this is not a particularly good solution. It doesn’t specifically undermine your security—things are still as secure as they were on iOS 8—but it runs counter to ATS’s goals.And again yes, as described in this thread.And again no, per my comments in that thread.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 VPN failure L2TP (privacy abroad)
Since completing a update of the Mac OS, my VPN will not function at all.As this isn’t a code-level question, you’ll probably have more luck asking over in the Apple Support Communities, run by AppleCare. The folks over there are more likely to have experience in user-level VPN setup issues.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 Can my app get permission to rename one of its files when installed in Applications on OSX?
Is there any way my application can prompt this login to get permission to rename the file?No. Modifying an app requires elevated privileges and Mac App Store apps are not allowed to elevate their privileges.Even if you could do this, changing your app would invalidate its code signature, which is a real bad idea.Modifying apps is just not supported on OS X; in fact, this is something that we’ve been warning folks not to do since the very early days of the Mac.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 Open() is not working after sandbox turning on.
open will work in general, it’s just that the sandbox is preventing you from opening files outside of your app’s container. There are various ways around this, so many in fact that it’s not feasible to explain them here. Fortunately, the are discussed in depth in the App Sandbox Design Guide. 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:
Sep ’15
Reply to iOS TCP Client: downloading big text file
I’ve moved your question over to Core OS > Networking because this is more about networking than about Swift.There’s more than one issue here. guywithmazda spotted one, which is cool because I probably wouldn’t have spotted it myself. OTOH, I have a few more comments which I’ll outline below.First, code like this:while (self.inputStream!.hasBytesAvailable) { … }is incorrect. It’ll probably work but it’s not how you’re supposed to use NSStream. Rather, when you get a .HasBytesAvailable event, you should do one read, process those bytes, and then return. Continuing to work while the -hasXxxAvailable returns true can cause subtle problems. For example: On a fast network you can end up ‘stuck’ in your stream event handler, which prevents anything else on that thread doing any work (which is bad if it’s the main thread). This can happen on both the send and receive sides.On the send side, you end up being incompatible with TCP_NOTSENT_LOWAT. See WWDC 2015 Session 719 Your App and Next Generation Networks.Your d
Sep ’15