Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions Sources/WordPressData/Objective-C/include/CoreDataStack.h

This file was deleted.

23 changes: 23 additions & 0 deletions Sources/WordPressData/Swift/CoreDataStack.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import CoreData

@objc public protocol CoreDataStack {

var mainContext: NSManagedObjectContext { get }

@available(*, deprecated, message: "Use `performAndSave` instead")
func newDerivedContext() -> NSManagedObjectContext

func saveContextAndWait(_ context: NSManagedObjectContext)

@objc(saveContext:)
func save(_ context: NSManagedObjectContext)

@objc(saveContext:withCompletionBlock:onQueue:)
func save(_ context: NSManagedObjectContext, completion: (() -> Void)?, on queue: DispatchQueue)

@objc(performAndSaveUsingBlock:)
func performAndSave(_ block: @escaping (NSManagedObjectContext) -> Void)

@objc(performAndSaveUsingBlock:completion:onQueue:)
func performAndSave(_ block: @escaping (NSManagedObjectContext) -> Void, completion: (() -> Void)?, on queue: DispatchQueue)
}
1 change: 0 additions & 1 deletion Sources/WordPressData/WordPressData.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ FOUNDATION_EXPORT const unsigned char WordPressDataVersionString[];
// Note: Some of these might not need to be public, but it was simpler to extract to WordPressData by making everything public.
// As we'll hopefully soon rewrite these in Swift, we can implement proper access level then.
#import <WordPressData/Blog.h>
#import <WordPressData/CoreDataStack.h>
#import <WordPressData/PostHelper.h>

FOUNDATION_EXTERN void SetCocoaLumberjackObjCLogLevel(NSUInteger ddLogLevelRawValue);
1 change: 0 additions & 1 deletion WordPress/WordPress.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,6 @@
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
publicHeaders = (
"Objective-C/include/Blog.h",
"Objective-C/include/CoreDataStack.h",
"Objective-C/include/PostHelper.h",
WordPressData.h,
);
Expand Down