Re: Codesigning issues

2015-07-28 Thread Graham Cox
I’m not 100% sure if it’s related, but one user sent this to me which appeared to coincide with the launch failure: 7/28/15 4:41:01.467 PM CoreServicesUIAgent[8607]: Error -60005 creating authorization 7/28/15 4:41:11.624 PM CoreServicesUIAgent[8607]: An uncaught exception was raised 7/28/15

Re: Best way to have KVC-compliant enum property in Swift 2?

2015-07-28 Thread Charles Srstka
On Jul 28, 2015, at 8:07 PM, Rick Mann rm...@latencyzero.com wrote: I'd like to have a Swift enum that lays out a set of states, and a property of that type on an object that is KVObservable (i.e. dynamic). I don't think this is possible. What I settled on was this: class Model :

Re: Best way to have KVC-compliant enum property in Swift 2?

2015-07-28 Thread Quincey Morris
On Jul 28, 2015, at 18:07 , Rick Mann rm...@latencyzero.com wrote: dynamic var thumbnailURL: NSURL? dynamic var numFiles: NSNumber? dynamic var filesDownloaded : NSNumber? dynamic var downloadState : NSNumber? =

Re: NSPrivateQueueConcurrencyType working outside of performBlock

2015-07-28 Thread Trygve Inda
On Jul 28, 2015, at 10:14 AM, Trygve Inda cocoa...@xericdesign.com wrote: On 28 Jul 2015, at 9:12 pm, Trygve Inda cocoa...@xericdesign.com wrote: I gather that when using NSPrivateQueueConcurrencyType, all operations (a fetch for example) have to be done within a performBlock call.

Best way to have KVC-compliant enum property in Swift 2?

2015-07-28 Thread Rick Mann
I'd like to have a Swift enum that lays out a set of states, and a property of that type on an object that is KVObservable (i.e. dynamic). I don't think this is possible. What I settled on was this: class Model : MPObject { enum DownloadState : NSNumber { case notDownloaded

Re: Best way to have KVC-compliant enum property in Swift 2?

2015-07-28 Thread Charles Srstka
On Jul 28, 2015, at 8:57 PM, Charles Srstka cocoa...@charlessoft.com wrote: func valueForKey(key: String) - AnyObject? { func setValue(value: AnyObject?, forKey key: String) { D’oh — I forgot to put “override” in front of these. Old Objective-C habits die hard. Sorry about

iOS 8.4: Converting a URL into a PHAsset

2015-07-28 Thread Carl Hoefs
I'm trying to get an NSURL into PHAsset form, but I keep coming up with null. PHAsset fetchAssetsWithALAssetURLs: takes an NSArray of NSURLs: An array of NSURL objects, each an asset URL previously retrieved from an ALAsset object. Apparently, this is not a simple array of NSURL objects. How

Re: NSPrivateQueueConcurrencyType working outside of performBlock

2015-07-28 Thread Roland King
performBlockAndWait might work. In my completion handler I have basically: Context = [self createPrivateContect]; For (I = 1; I something ; i++) { ...do stuff with completetion data from URL... ...do stuff with the context... } So I need to make sure the context stuff

Change window.rootViewController at runtime

2015-07-28 Thread Diederik Meijer
Dear list, I am working on an iOS app that uses a UISplitViewController. As per the client’s requirements, a UIViewController should be loaded before the UISplitViewController loads. This “preceding” UIViewController - let’s call it the Home Screen - allows the user to select from a small

Re: NSPrivateQueueConcurrencyType working outside of performBlock

2015-07-28 Thread Roland King
On 28 Jul 2015, at 10:14 pm, Trygve Inda cocoa...@xericdesign.com wrote: On 28 Jul 2015, at 9:12 pm, Trygve Inda cocoa...@xericdesign.com wrote: I gather that when using NSPrivateQueueConcurrencyType, all operations (a fetch for example) have to be done within a performBlock call.

Re: NSPrivateQueueConcurrencyType working outside of performBlock

2015-07-28 Thread Dave Fernandes
Depending on what you are doing, you could either put doSomething and doSomethingElse inside the performBlock, or you could use performBlockAndWait On Jul 28, 2015, at 10:14 AM, Trygve Inda cocoa...@xericdesign.com wrote: If I do use performBlock and have to do several things: This code

NSPrivateQueueConcurrencyType working outside of performBlock

2015-07-28 Thread Trygve Inda
I gather that when using NSPrivateQueueConcurrencyType, all operations (a fetch for example) have to be done within a performBlock call. Apple has sample code here: https://developer.apple.com/library/mac/samplecode/Earthquakes/History/Histo

Re: NSPrivateQueueConcurrencyType working outside of performBlock

2015-07-28 Thread Roland King
On 28 Jul 2015, at 9:12 pm, Trygve Inda cocoa...@xericdesign.com wrote: I gather that when using NSPrivateQueueConcurrencyType, all operations (a fetch for example) have to be done within a performBlock call. ... Then later, this context is used outside a performBlock: NSArray

Re: NSPrivateQueueConcurrencyType working outside of performBlock

2015-07-28 Thread davelist
On Jul 28, 2015, at 10:01 AM, Roland King r...@rols.org wrote: On 28 Jul 2015, at 9:12 pm, Trygve Inda cocoa...@xericdesign.com wrote: I gather that when using NSPrivateQueueConcurrencyType, all operations (a fetch for example) have to be done within a performBlock call. ...

Re: NSPrivateQueueConcurrencyType working outside of performBlock

2015-07-28 Thread davelist
On Jul 28, 2015, at 10:14 AM, Trygve Inda cocoa...@xericdesign.com wrote: On 28 Jul 2015, at 9:12 pm, Trygve Inda cocoa...@xericdesign.com wrote: I gather that when using NSPrivateQueueConcurrencyType, all operations (a fetch for example) have to be done within a performBlock call.

Re: NSPrivateQueueConcurrencyType working outside of performBlock

2015-07-28 Thread Trygve Inda
On 28 Jul 2015, at 9:12 pm, Trygve Inda cocoa...@xericdesign.com wrote: I gather that when using NSPrivateQueueConcurrencyType, all operations (a fetch for example) have to be done within a performBlock call. ... Then later, this context is used outside a performBlock: NSArray

Obj-c to Swift conversion question

2015-07-28 Thread Eric E. Dolecki
The more I stretch to Swift goals, the more I learn. However I've come upon a little thing where I am translating code into Swift and quickly stumbled. *Obj-C:* NSValue *keyboardEndFrameValue = [[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey]; *Swift (the closest I've

Re: Obj-c to Swift conversion question

2015-07-28 Thread Jean-Daniel Dupas
Le 28 juil. 2015 à 16:03, Eric E. Dolecki edole...@gmail.com a écrit : The more I stretch to Swift goals, the more I learn. However I've come upon a little thing where I am translating code into Swift and quickly stumbled. *Obj-C:* NSValue *keyboardEndFrameValue = [[notification

Re: NSPrivateQueueConcurrencyType working outside of performBlock

2015-07-28 Thread Trygve Inda
On 28 Jul 2015, at 9:12 pm, Trygve Inda cocoa...@xericdesign.com wrote: I gather that when using NSPrivateQueueConcurrencyType, all operations (a fetch for example) have to be done within a performBlock call. ... Then later, this context is used outside a performBlock: NSArray

Re: NSPrivateQueueConcurrencyType working outside of performBlock

2015-07-28 Thread Dave Fernandes
“Setter methods on queue-based managed object contexts are thread-safe. You can invoke these methods directly on any thread” https://developer.apple.com/library/mac/documentation/Cocoa/Reference/CoreDataFramework/Classes/NSManagedObjectContext_Class/index.html On Jul 28, 2015, at 11:49 PM,

Re: Issues with WKWebView: Requestor is not a platform binary

2015-07-28 Thread Jens Alfke
Also FYI, it’s a lot simpler to serve content to a WebView by implementing an NSURLProtocol, than by embedding an entire web server. (And it doesn’t open any sockets, so you avoid this problem.) I’m sure there’s sample code somewhere showing how to do this, but I don’t have any pointers to it.

Re: Obj-c to Swift conversion question

2015-07-28 Thread Eric E. Dolecki
Yes, thanks. I ended up with this (yes, I like to use Void): func keyboardWillShow(notification:NSNotification) - Void { let userInfo = notification.userInfo! let keyboardEndFrame = (userInfo[UIKeyboardFrameEndUserInfoKey] as! NSValue).CGRectValue() let

Re: Issues with WKWebView: Requestor is not a platform binary

2015-07-28 Thread Rick Mann
Huh, interesting. I'll see what I can suss out. I borrowed someone else's code. On Jul 27, 2015, at 22:36 , Jens Alfke j...@mooseyard.com wrote: I'll bet the OS is killing your server/listener socket. It does that after an app's been suspended a while. You'll need to close the socket on