Skip to content

Commit

Permalink
Merge pull request #24 from danielgindi/Swift4.2
Browse files Browse the repository at this point in the history
update to Swift 4.2, Realm 3.11.1
  • Loading branch information
liuxuan30 authored Nov 1, 2018
2 parents 3ec7f57 + 8e3b1cd commit 01413c3
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 30 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
language: objective-c
osx_image: xcode9.3
osx_image: xcode10
matrix:
include:
- osx_image: xcode9.3
- osx_image: xcode10
env: PLATFORM="iOS"
- osx_image: xcode9.3
- osx_image: xcode10
env: PLATFORM="tvOS"
- osx_image: xcode9.3
- osx_image: xcode10
env: PLATFORM="macOS"
env:
global:
Expand Down
4 changes: 2 additions & 2 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "danielgindi/Charts" ~> 3.1.1
github "realm/realm-cocoa" ~> 3.7.1
github "danielgindi/Charts" ~> 3.2.1
github "realm/realm-cocoa" ~> 3.11.1
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "danielgindi/Charts" "v3.1.1"
github "realm/realm-cocoa" "v3.7.1"
github "danielgindi/Charts" "v3.2.1"
github "realm/realm-cocoa" "v3.11.1"
6 changes: 3 additions & 3 deletions ChartsRealm.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "ChartsRealm"
s.version = "3.1.1"
s.version = "3.2.1"
s.summary = "A Realm.io module for Charts"
s.homepage = "https://github.com/danielgindi/ChartsRealm"
s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" }
Expand All @@ -10,6 +10,6 @@ Pod::Spec.new do |s|
s.osx.deployment_target = "10.11"
s.source = { :git => "https://github.com/danielgindi/ChartsRealm.git", :tag => "v#{s.version}" }
s.source_files = "ChartsRealm/Classes/**/*.swift", "ChartsRealm/Supporting Files/RLMSupport.swift"
s.dependency "Charts", "~> 3.1.1"
s.dependency "RealmSwift", "~> 3.7.1"
s.dependency "Charts", "~> 3.2.1"
s.dependency "RealmSwift", "~> 3.11.1"
end
6 changes: 3 additions & 3 deletions ChartsRealm.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
TargetAttributes = {
06B120D41D811E6200D14B02 = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 0900;
LastSwiftMigration = 1000;
};
};
};
Expand Down Expand Up @@ -369,7 +369,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.dcg.ChartsRealm;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -390,7 +390,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.dcg.ChartsRealm;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
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 = "0940"
LastUpgradeVersion = "1000"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion ChartsRealm/Classes/Data/RealmBarDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ open class RealmBarDataSet: RealmBarLineScatterCandleBubbleDataSet, IBarChartDat

@objc public convenience init(realm: RLMRealm?, modelName: String, resultsWhere: String, xValueField: String?, yValueField: String, stackValueField: String)
{
self.init(realm: realm, modelName: modelName, resultsWhere: resultsWhere, xValueField: nil, yValueField: yValueField, stackValueField: stackValueField)
self.init(realm: realm, modelName: modelName, resultsWhere: resultsWhere, xValueField: xValueField, yValueField: yValueField, stackValueField: stackValueField, label: nil)
}

public convenience init(realm: Realm?, modelName: String, resultsWhere: String, xValueField: String?, yValueField: String, stackValueField: String)
Expand Down
2 changes: 1 addition & 1 deletion ChartsRealm/Classes/Data/RealmBaseDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ open class RealmBaseDataSet: ChartBaseDataSet

@objc public convenience init(results: RLMResults<RLMObject>?, yValueField: String)
{
self.init(results: results, yValueField: yValueField)
self.init(results: results, xValueField: nil, yValueField: yValueField)
}

public convenience init(results: Results<Object>?, yValueField: String)
Expand Down
14 changes: 8 additions & 6 deletions ChartsRealmDemo/ChartsRealmDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,12 @@
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 1000;
ORGANIZATIONNAME = dcg;
TargetAttributes = {
5B57BBAE1A9B26AA0036A6CC = {
CreatedOnToolsVersion = 6.1.1;
LastSwiftMigration = 0900;
LastSwiftMigration = 1000;
ProvisioningStyle = Manual;
};
};
Expand Down Expand Up @@ -537,12 +537,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -589,12 +591,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -642,8 +646,7 @@
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_OBJC_BRIDGING_HEADER = "Supporting Files/ChartsRealmDemo-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -666,8 +669,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_OBJC_BRIDGING_HEADER = "Supporting Files/ChartsRealmDemo-Bridging-Header.h";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
8 changes: 4 additions & 4 deletions ChartsRealmDemo/Classes/Components/BalloonMarker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ open class BalloonMarker: MarkerImage
fileprivate var labelns: NSString?
fileprivate var _labelSize: CGSize = CGSize()
fileprivate var _paragraphStyle: NSMutableParagraphStyle?
fileprivate var _drawAttributes = [NSAttributedStringKey : AnyObject]()
fileprivate var _drawAttributes = [NSAttributedString.Key : AnyObject]()

public init(color: UIColor, font: UIFont, textColor: UIColor, insets: UIEdgeInsets)
{
Expand Down Expand Up @@ -122,9 +122,9 @@ open class BalloonMarker: MarkerImage
labelns = label as NSString

_drawAttributes.removeAll()
_drawAttributes[NSAttributedStringKey.font] = self.font
_drawAttributes[NSAttributedStringKey.paragraphStyle] = _paragraphStyle
_drawAttributes[NSAttributedStringKey.foregroundColor] = self.textColor
_drawAttributes[NSAttributedString.Key.font] = self.font
_drawAttributes[NSAttributedString.Key.paragraphStyle] = _paragraphStyle
_drawAttributes[NSAttributedString.Key.foregroundColor] = self.textColor

_labelSize = labelns?.size(withAttributes: _drawAttributes) ?? CGSize.zero

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**Version 3.1.1**
**Version 3.2.1**

![alt tag](https://raw.github.com/danielgindi/Charts/master/Assets/feature_graphic.png)
![Supported Platforms](https://img.shields.io/cocoapods/p/ChartsRealm.svg) [![Releases](https://img.shields.io/github/release/danielgindi/ChartsRealm.svg)](https://github.com/danielgindi/ChartsRealm/releases) [![Latest pod release](https://img.shields.io/cocoapods/v/ChartsRealm.svg)](http://cocoapods.org/pods/chartsrealm) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Build Status](https://travis-ci.org/danielgindi/ChartsRealm.svg?branch=master)](https://travis-ci.org/danielgindi/ChartsRealm) [![codecov](https://codecov.io/gh/danielgindi/ChartsRealm/branch/master/graph/badge.svg)](https://codecov.io/gh/danielgindi/ChartsRealm)
Expand All @@ -7,7 +7,7 @@
### We've separated ChartsRealm from the main repositoy, for easier handling of dependencies.
### Please avoid duplicate issues. Post on this repo for Charts+Realm specific problems, and other stuff in the issues section of the core Charts repo.

* Xcode 9.4 / Swift 4.1
* Xcode 10 / Swift 4.2
* iOS >= 8.0 (Use as an **Embedded** Framework)
* tvOS >= 9.0
* macOS >= 10.11
Expand Down Expand Up @@ -68,7 +68,7 @@ Add both `pod 'Charts'` and `pod 'ChartsRealm'` to your Podfile.
Charts now include Carthage prebuilt binaries.

```carthage
github "danielgindi/ChartsRealm" ~> 3.1.1
github "danielgindi/ChartsRealm" ~> 3.2.1
```

In order to build the binaries for a new release, use `carthage build --no-skip-current && carthage archive ChartsRealm`.
Expand Down

0 comments on commit 01413c3

Please sign in to comment.