Skip to content

Commit

Permalink
Merge pull request #372 from regexident/patch-1
Browse files Browse the repository at this point in the history
Fixed invalid call of `NSManagedObject.fetchRequest()`. Thanks!
  • Loading branch information
atomicbird authored Jul 21, 2018
2 parents cc1304a + b835f84 commit fc2a15b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions templates/machine.swift.motemplate
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ open class _<$sanitizedManagedObjectClassName$>: NSManagedObject {

@nonobjc
open class func fetchRequest() -> NSFetchRequest<<$sanitizedManagedObjectClassName$>> {
if #available(iOS 10.0, tvOS 10.0, watchOS 3.0, macOS 10.12, *) {
return NSManagedObject.fetchRequest() as! NSFetchRequest<<$sanitizedManagedObjectClassName$>>
} else {
return NSFetchRequest(entityName: self.entityName())
}
return NSFetchRequest(entityName: self.entityName())
}

// MARK: - Life cycle methods
Expand Down

0 comments on commit fc2a15b

Please sign in to comment.