Skip to content
This repository was archived by the owner on Dec 17, 2018. It is now read-only.

Commit 219194e

Browse files
authored
Version 2.0.0 (#13)
## New features * Existing data will be automatically uploaded if CloudKit doesn't exists (fix #9) * Framework now handles next CloudKit errors: * `userDeletedZone`: all local cached Core Data will removed (user asked to purge data) * `zoneNotFound`: existing data will be automatically uploaded to CloudKit * `changeTokenExpired`: tokens will be reset and all data downloaded again * `isMore`: if you fetch a lot of data from Cloud, fetch requests will be divided to several ones * Sync status and errors are reported to `CloudCoreDelegate` instead of notifications, it's more Swift way. ## Improvements * Changed API calls (check changes at CloudCore), that version is not compatible with `1.x` * Numerous bug fixes (really, alpha version wasn't usable) * More clean folder structure * Documented 100% of public methods and variables. * Combined all targets to one multiplatform target. Thanks for [that guide](http://ilya.puchka.me/xcode-cross-platform-frameworks/). ## Removed * Removed Swift Package Manager support, because it doesn't well support manager for iOS & macOS applications. * Notifications removed, use delegate. ## New example application Absolutely new example application with more realistic use cases. All changes can be made by pressing *Edit* button, and it will be saved when you click *Done*.
1 parent ae9094a commit 219194e

File tree

111 files changed

+2119
-1699
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+2119
-1699
lines changed

.travis.yml

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,37 @@
1-
osx_image: xcode9
1+
osx_image: xcode9.2
22
language: objective-c
3+
podfile: "Example/Podfile"
34

45
branches:
56
only:
67
- master
78

89
env:
9-
global:
10-
- PROJECT="CloudCore.xcodeproj"
11-
- EXAMPLE_PROJECT="Example/CloudCoreExample.xcodeproj"
12-
13-
- IOS_FRAMEWORK_SCHEME="CloudCore-iOS"
14-
- MACOS_FRAMEWORK_SCHEME="CloudCore-Mac"
15-
- EXAMPLE_SCHEME="CloudCoreExample"
16-
matrix:
17-
- DESTINATION="OS=11.0,name=iPhone 7 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" BUILD_EXAMPLE="YES" POD_LINT="YES"
18-
- DESTINATION="arch=x86_64" SCHEME="$MACOS_FRAMEWORK_SCHEME" BUILD_EXAMPLE="NO" POD_LINT="NO"
10+
- DESTINATION='platform=OS X' POD_LINT="YES"
11+
- DESTINATION='platform=iOS Simulator,name=iPhone 6S' BUILD_EXAMPLE="YES"
12+
- DESTINATION='platform=watchOS Simulator,name=Apple Watch - 38mm' SKIP_TEST="YES"
13+
- DESTINATION='platform=tvOS Simulator,name=Apple TV 4K'
1914

2015
before_install:
21-
- gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet
2216
- gem install xcpretty-travis-formatter
2317

2418
script:
25-
- set -o pipefail
26-
27-
# Build and test in debug
28-
- xcodebuild -project "$PROJECT" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -f `xcpretty-travis-formatter`
29-
# Build and test in release
30-
- xcodebuild -project "$PROJECT" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -f `xcpretty-travis-formatter`
31-
32-
# Build example project
33-
- if [ $BUILD_EXAMPLE == "YES" ]; then
34-
xcodebuild -project "$EXAMPLE_PROJECT" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -f `xcpretty-travis-formatter`;
35-
fi
36-
37-
# Run on Pull Request
38-
- if [ $POD_LINT == "YES" && $TRAVIS_PULL_REQUEST != "false" ]; then
19+
- set -o pipefail
20+
- xcodebuild -scheme CloudCore -destination "$DESTINATION" build | xcpretty -f `xcpretty-travis-formatter`
21+
- if [ "$SKIP_TEST" != "YES" ]; then
22+
xcodebuild -scheme CloudCore -destination "$DESTINATION" test | xcpretty -f `xcpretty-travis-formatter`;
23+
fi
24+
25+
# Example
26+
- if [ "$BUILD_EXAMPLE" = "YES" ]; then
27+
xcodebuild -workspace "Example/CloudCoreExample.xcworkspace" -scheme "CloudCoreExample" -destination "$DESTINATION" build | xcpretty -f `xcpretty-travis-formatter`;
28+
fi
29+
30+
- if [ "$POD_LINT" = "YES" ]; then
3931
pod lib lint --allow-warnings;
40-
fi
32+
fi
4133

42-
# Run release to master branch
43-
- if [ $POD_LINT == "YES" && $TRAVIS_BRANCH = "master" ]; then
44-
pod spec lint --allow-warnings;
45-
fi
34+
# Run release to master branch
35+
- if [ "$POD_LINT" = "YES" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
36+
pod spec lint --allow-warnings;
37+
fi

CloudCore.podspec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "CloudCore"
3-
s.summary = "Framework that enables syncing between iCloud (CloudKit) and Core Data"
4-
s.version = "1.0.1"
3+
s.summary = "Framework that enables synchronization between CloudKit (iCloud) and Core Data. Can be used as CloudKit caching mechanism."
4+
s.version = "2.0.0"
55
s.homepage = "https://github.com/sorix/CloudCore"
66
s.license = 'MIT'
77
s.author = { "Vasily Ulianov" => "[email protected]" }
@@ -12,14 +12,14 @@ Pod::Spec.new do |s|
1212

1313
s.ios.deployment_target = '10.0'
1414
s.osx.deployment_target = '10.12'
15+
s.tvos.deployment_target = '10.0'
16+
s.watchos.deployment_target = '3.0'
1517

16-
s.ios.source_files = 'Sources/**/*.swift'
17-
# s.tvos.source_files = 'Sources/**/*.swift'
18-
s.osx.source_files = 'Sources/**/*.swift'
18+
s.source_files = 'Source/**/*.swift'
1919

2020
s.ios.frameworks = 'Foundation', 'CloudKit', 'CoreData'
2121
s.osx.frameworks = 'Foundation', 'CloudKit', 'CoreData'
2222

2323
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' }
24-
s.documentation_url = 'https://github.com/Sorix/CloudCore/wiki'
24+
s.documentation_url = 'http://cocoadocs.org/docsets/CloudCore/'
2525
end

CloudCore.xcodeproj/project.pbxproj

Lines changed: 103 additions & 403 deletions
Large diffs are not rendered by default.

CloudCore.xcodeproj/xcshareddata/xcschemes/CloudCore-Mac.xcscheme

Lines changed: 0 additions & 101 deletions
This file was deleted.

CloudCore.xcodeproj/xcshareddata/xcschemes/CloudCore-iOS.xcscheme renamed to CloudCore.xcodeproj/xcshareddata/xcschemes/CloudCore.xcscheme

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
BuildableIdentifier = "primary"
1717
BlueprintIdentifier = "D5B2E89E1C3A780C00C0327D"
1818
BuildableName = "CloudCore.framework"
19-
BlueprintName = "CloudCore-iOS"
19+
BlueprintName = "CloudCore"
2020
ReferencedContainer = "container:CloudCore.xcodeproj">
2121
</BuildableReference>
2222
</BuildActionEntry>
@@ -35,8 +35,8 @@
3535
<BuildableReference
3636
BuildableIdentifier = "primary"
3737
BlueprintIdentifier = "E29BB2271E436F310020F5B6"
38-
BuildableName = "CloudCoreTests-iOS.xctest"
39-
BlueprintName = "CloudCoreTests-iOS"
38+
BuildableName = "CloudCoreTests.xctest"
39+
BlueprintName = "CloudCoreTests"
4040
ReferencedContainer = "container:CloudCore.xcodeproj">
4141
</BuildableReference>
4242
</TestableReference>
@@ -46,7 +46,7 @@
4646
BuildableIdentifier = "primary"
4747
BlueprintIdentifier = "D5B2E89E1C3A780C00C0327D"
4848
BuildableName = "CloudCore.framework"
49-
BlueprintName = "CloudCore-iOS"
49+
BlueprintName = "CloudCore"
5050
ReferencedContainer = "container:CloudCore.xcodeproj">
5151
</BuildableReference>
5252
</MacroExpansion>
@@ -69,7 +69,7 @@
6969
BuildableIdentifier = "primary"
7070
BlueprintIdentifier = "D5B2E89E1C3A780C00C0327D"
7171
BuildableName = "CloudCore.framework"
72-
BlueprintName = "CloudCore-iOS"
72+
BlueprintName = "CloudCore"
7373
ReferencedContainer = "container:CloudCore.xcodeproj">
7474
</BuildableReference>
7575
</MacroExpansion>
@@ -87,7 +87,7 @@
8787
BuildableIdentifier = "primary"
8888
BlueprintIdentifier = "D5B2E89E1C3A780C00C0327D"
8989
BuildableName = "CloudCore.framework"
90-
BlueprintName = "CloudCore-iOS"
90+
BlueprintName = "CloudCore"
9191
ReferencedContainer = "container:CloudCore.xcodeproj">
9292
</BuildableReference>
9393
</MacroExpansion>

0 commit comments

Comments
 (0)