Search results for

eskimo

34,935 results found

Post

Replies

Boosts

Views

Activity

Reply to startUpdatingLocation Unavailable Watchkit 2
This call fails to compile because it's flagged with __WATCHOS_PROHIBITED. As to why it fails to compile, I'm not up-to-speed on location issues for watchOS but it seems that continuous location tracking is not allowed on the watch itself. WWDC 2015 Session 714 What's New in Core Location discusses this in depth (haven't yet had a chance to watch it myself, alas).Finally, I've moved your thread over to System Frameworks > Maps and Location, where you're more likely to find folks with experience doing this sort of thing.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Jul ’15
Reply to unable to call c++ class in objective c
I agree with dgatwood's response except for one minor niggle. They wrote:You also need to use the C++ compiler.What you want is the Objective-C++ compiler.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: General Tags:
Jul ’15
Reply to How to get an UnsafeMultablePointer<mach_port_t> to pass to IOMasterPort?
While it's interesting to see all of this IOMasterPort info fly by, the simplest option by far is to avoid that call and simply using the kIOMasterPortDefault global variable. The following compiles in both Xcode 7b4 and Xcode 6.4:import IOKit IOServiceGetMatchingService(kIOMasterPortDefault, nil)Just by way of history, kIOMasterPortDefault wasn't part of the original Mac OS X 10.10 API, so lots of folks wrote lots of code using IOMasterPort. These days that's not necessary; kIOMasterPortDefault was introduced a long time ago (I checked the Mac OS X 10.2 SDK, and it has it), so there's really no need to call IOMasterPort. Of course, the information in this thread will be handy when calling other I/O Kit APIs.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:
Jul ’15
Reply to Actual timestamp
ObjectHub wrote:I suggest using CFAbsoluteTimeGetCurrent() …CFAbsoluteTimeGetCurrent is based on gettimeofday and thus will change with the system clock. benrimmington wrote:For real time threads, see Technical Note TN2169 …Mach absolute time may well be the right option here, and all of the APIs you mentioned are based on Mach absolute time.The big gotcha with these APIs is that Mach absolute time stops when the CPU sleeps. @OmniOnline, if you only need to track time while your app is in the foreground, Mach absolute time (or one of its derivatives) is your best option. Otherwise things get more complex and you should post a follow-up with more information about your goals.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:
Jul ’15
Reply to Background Session Task state persistence
You're interpreting my approach correctly, although I'm not 100% sure what you mean by original request. I presume you're doing that on a mutable request before you pass it to -downloadTaskWithRequest:. If so, that's exactly what I did. Here's my code to set it:request = [[NSMutableURLRequest alloc] initWithURL:download.targetURL]; [NSURLProtocol setProperty:[download.downloadUUID UUIDString] forKey:kDownloadUUIDStrPropertyKey inRequest:request]; result = [self.session downloadTaskWithRequest:request];and here's the Quinn-level-of-paranoia code to get it:downloadUUIDStr = [NSURLProtocol propertyForKey:kDownloadUUIDStrPropertyKey inRequest:task.originalRequest]; if (downloadUUIDStr == nil) { assert(NO); } else if ( ! [downloadUUIDStr isKindOfClass:[NSString class]] ) { assert(NO); } else { downloadUUID = [[NSUUID alloc] initWithUUIDString:downloadUUIDStr]; if (downloadUUID == nil) { assert(NO); } else { ... } }where:download is an object I use to track the downloadkDownloadUUIDStrPropertyKey is my custom keyTh
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’15
Reply to With Split View, how can I talk to the parent app from its extension?
It would be nice if NSUserDefaults took care of this for you; it even has a handy-dandy notification (NSUserDefaultsDidChangeNotification) that it could post in this case. Alas, that support wasn't wired up for the shared container case, at least when I last tried it on iOS 8.x. You should re-test on iOS 9 beta to see if things have improved. If not, something like MMWormhole is your best way forward. And if you are forced down that path, please file a bug requesting better system-level support, and then post the bug number here 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: App & System Services SubTopic: Core OS Tags:
Jul ’15
Reply to nsmanagedobjectcontext don't save certain url file
First up, I moved your question to Core OS > Networking because it seems more about networking than about Swift.Second, I'm having a hard time understanding your actual question. At first blush it seems like you're simply trying to test URLs for equality, that is, you're trying to see if request.URL matches some fixed URL. Is that right? If so, == should work. Swift translates it to -[NSURL isEqual:]. For example: import Foundation let u1 = NSURL(string: http://foo.example.com)! let u2 = NSURL(string: http://bar.example.com)! let u3 = NSURL(string: http://foo.example.com)! println(u1 == u2) // prints false println(u1 == u3) // prints true println(u1 === u3) // prints falseNote that u1 and u3 are not the same object, so === returns false: [I tested this with Xcode 6.4 on OS X 10.10.4, although I expect it'd be the same for Swift 2.]println(u1 === u3) // prints falseIMPORTANT URL equality is more complex than you might think. Consider the following:let uR = NSURL(string: http://example.com) let uR1 = NSURL(s
Jul ’15
Reply to CFSocket with TLSV1 under proxy network
CFSocketStream does not support HTTP proxies directly. I recommend that you look at NSURLSessionStreamTask, slated for iOS 9 and OS X 10.11, which should help in this setup. I recently posted about this on MacNetworkProg.On current systems your second approach should work. This is, effectively, the same as STARTTLS, and I've definitely got STARTTLS working with CFSocketStream. To be clear, I started TLS by setting the kCFStreamPropertySSLSettings property after the stream had opened and I'd exchanged plaintext data to set up the STARTTLS. I'm not sure why this is failing in your specific situation but I recommend you look at the traffic on the 'wire' to see why the TLS handshake failed. For help with that, see QA1176 Getting a Packet Trace.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Jul ’15
Reply to iOS - direct HTTP connection disregarding system proxy settings. Possible? How?
First up, I'd label the current behaviour as a bug and I encourage you to file a bug report about it. Please post your bug number, just for the record.Second, I suspect there might be a workaround here but it will require more research than I'm able to do in the context of DevForums. If you want to continue this in a more formal context, please open a DTS tech support incident and we can pick things up from there.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Jul ’15
Reply to How to check in IOS 9 if HTTP/2 is used?
I don't think there's a way to ask NSURLSession what protocol was used. You might be able to get this info from your server logs. Failing that, you could look at the traffic on the wire.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Jul ’15
Reply to Scan for WiFi networks within sandbox
I am trying to perform a WiFi network scan using CoreWLAN but I keep getting these errors:CoreWLAN is not supported within the sandbox, something that we've actually documented in the Determine Whether Your App Is Suitable for Sandboxing section of the App Sandbox Design Guide.I have found two apps on the Mac App Store that do exactly thisIt's déjà vu all over again (-:Please read this thread.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Jul ’15
Reply to CNCopySupportedInterfaces broken in iOS 9 beta 4
I've moved your thread over to Core OS > Networking because it's about networking, not the Objective-C language.There's another thread that discusses this issue. If I learn more about this I'll post updates there.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Jul ’15
Reply to How to check in IOS 9 if HTTP/2 is used?
Maybe it would be interesting to get also this info from NSURLSession because we don't have always access to the server ?I think it would be. Originally I thought that might be possible because NSHTTPURLResponse knows the HTTP version of the response (note that it's one of the parameters to -initWithURL:statusCode:HTTPVersion:headerFields:). But annoyingly there's no HTTPVersion property so, while the object has the value, there's no way to get it out. I had a chat with CFNetwork Engineering about this and they confirmed my analysis. So, if you think this would be useful to you, please file an enhancement request for this API. I'd appreciate you posting your bug number here, 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
Jul ’15
Reply to cachedResponseForRequest not called
Are you running your requests with NSURLConnection or NSURLSession? If it's the latter, you should look at the three 'forDataTask' methods in the NSURLSessionTaskAdditions category.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Jul ’15