Skip to content

Commit

Permalink
Project fixes and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Mata authored and Nicholas Mata committed Dec 28, 2017
1 parent 11e0785 commit 0e5b394
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 17 deletions.
32 changes: 29 additions & 3 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 18 additions & 1 deletion Example/SimpleSync.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0720;
LastUpgradeCheck = 0920;
ORGANIZATIONNAME = CocoaPods;
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
Expand Down Expand Up @@ -426,13 +426,21 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand Down Expand Up @@ -471,13 +479,21 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand All @@ -496,6 +512,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -40,6 +40,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -69,6 +70,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
22 changes: 11 additions & 11 deletions Example/SimpleSync/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Override point for customization after application launch.
CoreDataManager.sharedModelName = "TestModel"

var fetch = NSFetchRequest<NSFetchRequestResult>(entityName: "Repo")
var request = NSBatchDeleteRequest(fetchRequest: fetch)
do {
// try CoreDataManager.shared.managedObjectContext.execute(request)
fetch = NSFetchRequest<NSFetchRequestResult>(entityName: "Person")
request = NSBatchDeleteRequest(fetchRequest: fetch)
// try CoreDataManager.shared.managedObjectContext.execute(request)
} catch {
print(error)
}
// var fetch = NSFetchRequest<NSFetchRequestResult>(entityName: "Repo")
// let request = NSBatchDeleteRequest(fetchRequest: fetch)
// do {
// // try CoreDataManager.shared.managedObjectContext.execute(request)
//
//// fetch = NSFetchRequest<NSFetchRequestResult>(entityName: "Person")
//// request = NSBatchDeleteRequest(fetchRequest: fetch)
//// try CoreDataManager.shared.managedObjectContext.execute(request)
// } catch {
// print(error)
// }
return true
}

Expand Down
2 changes: 1 addition & 1 deletion SimpleSync/Classes/SimpleSync.swift
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public class SimpleSync: NSObject, NetworkSyncDelegate, EntitySyncDelegate {
removing = Array(Set(storedIds).subtracting(Set(retrievedIds)))
}

for var removeId in removing {
for removeId in removing {
if let removeItem = fetchEntity(context: self.syncInfo.managedObjectContext, withId: removeId) {
self.delegate?.simpleSync?(self, needsRemoval: removeItem)
}
Expand Down

0 comments on commit 0e5b394

Please sign in to comment.