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

Commit

Permalink
Version 2.0.0 (#13)
Browse files Browse the repository at this point in the history
## 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*.
  • Loading branch information
Sorix authored Dec 25, 2017
1 parent ae9094a commit 219194e
Show file tree
Hide file tree
Showing 111 changed files with 2,119 additions and 1,699 deletions.
54 changes: 23 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,37 @@
osx_image: xcode9
osx_image: xcode9.2
language: objective-c
podfile: "Example/Podfile"

branches:
only:
- master

env:
global:
- PROJECT="CloudCore.xcodeproj"
- EXAMPLE_PROJECT="Example/CloudCoreExample.xcodeproj"

- IOS_FRAMEWORK_SCHEME="CloudCore-iOS"
- MACOS_FRAMEWORK_SCHEME="CloudCore-Mac"
- EXAMPLE_SCHEME="CloudCoreExample"
matrix:
- DESTINATION="OS=11.0,name=iPhone 7 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" BUILD_EXAMPLE="YES" POD_LINT="YES"
- DESTINATION="arch=x86_64" SCHEME="$MACOS_FRAMEWORK_SCHEME" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION='platform=OS X' POD_LINT="YES"
- DESTINATION='platform=iOS Simulator,name=iPhone 6S' BUILD_EXAMPLE="YES"
- DESTINATION='platform=watchOS Simulator,name=Apple Watch - 38mm' SKIP_TEST="YES"
- DESTINATION='platform=tvOS Simulator,name=Apple TV 4K'

before_install:
- gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet
- gem install xcpretty-travis-formatter

script:
- set -o pipefail

# Build and test in debug
- xcodebuild -project "$PROJECT" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -f `xcpretty-travis-formatter`
# Build and test in release
- xcodebuild -project "$PROJECT" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -f `xcpretty-travis-formatter`

# Build example project
- if [ $BUILD_EXAMPLE == "YES" ]; then
xcodebuild -project "$EXAMPLE_PROJECT" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -f `xcpretty-travis-formatter`;
fi

# Run on Pull Request
- if [ $POD_LINT == "YES" && $TRAVIS_PULL_REQUEST != "false" ]; then
- set -o pipefail
- xcodebuild -scheme CloudCore -destination "$DESTINATION" build | xcpretty -f `xcpretty-travis-formatter`
- if [ "$SKIP_TEST" != "YES" ]; then
xcodebuild -scheme CloudCore -destination "$DESTINATION" test | xcpretty -f `xcpretty-travis-formatter`;
fi

# Example
- if [ "$BUILD_EXAMPLE" = "YES" ]; then
xcodebuild -workspace "Example/CloudCoreExample.xcworkspace" -scheme "CloudCoreExample" -destination "$DESTINATION" build | xcpretty -f `xcpretty-travis-formatter`;
fi

- if [ "$POD_LINT" = "YES" ]; then
pod lib lint --allow-warnings;
fi
fi

# Run release to master branch
- if [ $POD_LINT == "YES" && $TRAVIS_BRANCH = "master" ]; then
pod spec lint --allow-warnings;
fi
# Run release to master branch
- if [ "$POD_LINT" = "YES" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
pod spec lint --allow-warnings;
fi
12 changes: 6 additions & 6 deletions CloudCore.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "CloudCore"
s.summary = "Framework that enables syncing between iCloud (CloudKit) and Core Data"
s.version = "1.0.1"
s.summary = "Framework that enables synchronization between CloudKit (iCloud) and Core Data. Can be used as CloudKit caching mechanism."
s.version = "2.0.0"
s.homepage = "https://github.com/sorix/CloudCore"
s.license = 'MIT'
s.author = { "Vasily Ulianov" => "[email protected]" }
Expand All @@ -12,14 +12,14 @@ Pod::Spec.new do |s|

s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '3.0'

s.ios.source_files = 'Sources/**/*.swift'
# s.tvos.source_files = 'Sources/**/*.swift'
s.osx.source_files = 'Sources/**/*.swift'
s.source_files = 'Source/**/*.swift'

s.ios.frameworks = 'Foundation', 'CloudKit', 'CoreData'
s.osx.frameworks = 'Foundation', 'CloudKit', 'CoreData'

s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' }
s.documentation_url = 'https://github.com/Sorix/CloudCore/wiki'
s.documentation_url = 'http://cocoadocs.org/docsets/CloudCore/'
end
506 changes: 103 additions & 403 deletions CloudCore.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

101 changes: 0 additions & 101 deletions CloudCore.xcodeproj/xcshareddata/xcschemes/CloudCore-Mac.xcscheme

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D5B2E89E1C3A780C00C0327D"
BuildableName = "CloudCore.framework"
BlueprintName = "CloudCore-iOS"
BlueprintName = "CloudCore"
ReferencedContainer = "container:CloudCore.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -35,8 +35,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E29BB2271E436F310020F5B6"
BuildableName = "CloudCoreTests-iOS.xctest"
BlueprintName = "CloudCoreTests-iOS"
BuildableName = "CloudCoreTests.xctest"
BlueprintName = "CloudCoreTests"
ReferencedContainer = "container:CloudCore.xcodeproj">
</BuildableReference>
</TestableReference>
Expand All @@ -46,7 +46,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D5B2E89E1C3A780C00C0327D"
BuildableName = "CloudCore.framework"
BlueprintName = "CloudCore-iOS"
BlueprintName = "CloudCore"
ReferencedContainer = "container:CloudCore.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand All @@ -69,7 +69,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D5B2E89E1C3A780C00C0327D"
BuildableName = "CloudCore.framework"
BlueprintName = "CloudCore-iOS"
BlueprintName = "CloudCore"
ReferencedContainer = "container:CloudCore.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand All @@ -87,7 +87,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D5B2E89E1C3A780C00C0327D"
BuildableName = "CloudCore.framework"
BlueprintName = "CloudCore-iOS"
BlueprintName = "CloudCore"
ReferencedContainer = "container:CloudCore.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand Down
Loading

0 comments on commit 219194e

Please sign in to comment.