Skip to content

Commit fcb6b2f

Browse files
committed
fix cocoapods setup
remove the prepare command since its not needed. To lint pod you need to set (export FORK_XCODE_WRITING=true) to get around the prepare_command issue with realm. Update cocoapods and include a swift-version file for safety
1 parent 2813ef5 commit fcb6b2f

23 files changed

+76
-53
lines changed

.swift-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.3

Charts.podspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Pod::Spec.new do |s|
1010
s.osx.deployment_target = "10.11"
1111
s.source = { :git => "https://github.com/danielgindi/Charts.git", :tag => "v#{s.version}" }
1212
s.default_subspec = "Core"
13-
s.prepare_command = "sed -i '' -e 's/import Charts//g' Source/ChartsRealm/**/*.swift"
1413

1514
s.subspec "Core" do |ss|
1615
ss.source_files = "Source/Charts/**/*.swift"

Charts.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,6 +1299,7 @@
12991299
INFOPLIST_FILE = "$(SRCROOT)/Source/Supporting Files/Info.plist";
13001300
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
13011301
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
1302+
OTHER_SWIFT_FLAGS = "-DNEEDS_CHARTS";
13021303
PRODUCT_BUNDLE_IDENTIFIER = com.dcg.ChartsRealm;
13031304
PRODUCT_NAME = "$(TARGET_NAME)";
13041305
SKIP_INSTALL = YES;
@@ -1317,6 +1318,7 @@
13171318
INFOPLIST_FILE = "$(SRCROOT)/Source/Supporting Files/Info.plist";
13181319
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
13191320
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
1321+
OTHER_SWIFT_FLAGS = "-DNEEDS_CHARTS";
13201322
PRODUCT_BUNDLE_IDENTIFIER = com.dcg.ChartsRealm;
13211323
PRODUCT_NAME = "$(TARGET_NAME)";
13221324
SKIP_INSTALL = YES;

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ source "https://rubygems.org"
22

33
gem "rake"
44
gem "xcpretty"
5-
gem "cocoapods"
5+
gem "cocoapods", "1.1.0.rc.2"

Gemfile.lock

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (5.0.0.1)
5-
concurrent-ruby (~> 1.0, >= 1.0.2)
4+
activesupport (4.2.7.1)
65
i18n (~> 0.7)
6+
json (~> 1.7, >= 1.7.7)
77
minitest (~> 5.1)
8+
thread_safe (~> 0.3, >= 0.3.4)
89
tzinfo (~> 1.1)
910
claide (1.0.0)
10-
cocoapods (1.0.1)
11-
activesupport (>= 4.0.2)
11+
cocoapods (1.1.0.rc.2)
12+
activesupport (>= 4.0.2, < 5)
1213
claide (>= 1.0.0, < 2.0)
13-
cocoapods-core (= 1.0.1)
14-
cocoapods-deintegrate (>= 1.0.0, < 2.0)
15-
cocoapods-downloader (>= 1.0.0, < 2.0)
14+
cocoapods-core (= 1.1.0.rc.2)
15+
cocoapods-deintegrate (>= 1.0.1, < 2.0)
16+
cocoapods-downloader (>= 1.1.1, < 2.0)
1617
cocoapods-plugins (>= 1.0.0, < 2.0)
1718
cocoapods-search (>= 1.0.0, < 2.0)
1819
cocoapods-stats (>= 1.0.0, < 2.0)
1920
cocoapods-trunk (>= 1.0.0, < 2.0)
20-
cocoapods-try (>= 1.0.0, < 2.0)
21+
cocoapods-try (>= 1.1.0, < 2.0)
2122
colored (~> 1.2)
2223
escape (~> 0.0.4)
23-
fourflusher (~> 0.3.0)
24-
molinillo (~> 0.4.5)
24+
fourflusher (~> 1.0.1)
25+
gh_inspector (~> 1.0)
26+
molinillo (~> 0.5.1)
2527
nap (~> 1.0)
26-
xcodeproj (>= 1.1.0, < 2.0)
27-
cocoapods-core (1.0.1)
28-
activesupport (>= 4.0.2)
28+
xcodeproj (>= 1.3.1, < 2.0)
29+
cocoapods-core (1.1.0.rc.2)
30+
activesupport (>= 4.0.2, < 5)
2931
fuzzy_match (~> 2.0.4)
3032
nap (~> 1.0)
3133
cocoapods-deintegrate (1.0.1)
@@ -39,16 +41,17 @@ GEM
3941
netrc (= 0.7.8)
4042
cocoapods-try (1.1.0)
4143
colored (1.2)
42-
concurrent-ruby (1.0.2)
4344
escape (0.0.4)
44-
fourflusher (0.3.2)
45+
fourflusher (1.0.1)
4546
fuzzy_match (2.0.4)
47+
gh_inspector (1.0.2)
4648
i18n (0.7.0)
49+
json (1.8.3)
4750
minitest (5.9.0)
48-
molinillo (0.4.5)
51+
molinillo (0.5.1)
4952
nap (1.1.0)
5053
netrc (0.7.8)
51-
rake (11.2.2)
54+
rake (11.3.0)
5255
rouge (1.11.1)
5356
thread_safe (0.3.5)
5457
tzinfo (1.2.2)
@@ -64,9 +67,9 @@ PLATFORMS
6467
ruby
6568

6669
DEPENDENCIES
67-
cocoapods
70+
cocoapods (= 1.1.0.rc.2)
6871
rake
6972
xcpretty
7073

7174
BUNDLED WITH
72-
1.12.5
75+
1.13.1

Source/ChartsRealm/Data/RealmBarData.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
//
1414

1515
import Foundation
16-
16+
#if NEEDS_CHARTS
1717
import Charts
18+
#endif
1819
import Realm
1920
import Realm.Dynamic
2021

@@ -31,4 +32,4 @@ public class RealmBarData: BarChartData
3132
super.init(xVals: RealmChartUtils.toXVals(results: results!, xValueField: xValueField), dataSets: dataSets)
3233
}
3334
}
34-
}
35+
}

Source/ChartsRealm/Data/RealmBarDataSet.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414

1515
import Foundation
1616
import CoreGraphics
17-
17+
#if NEEDS_CHARTS
1818
import Charts
19+
#endif
1920
import Realm
2021
import Realm.Dynamic
2122

Source/ChartsRealm/Data/RealmBarLineScatterCandleBubbleDataSet.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
//
1414

1515
import Foundation
16-
16+
#if NEEDS_CHARTS
1717
import Charts
18+
#endif
1819
import Realm
1920
import Realm.Dynamic
2021

@@ -40,4 +41,4 @@ public class RealmBarLineScatterCandleBubbleDataSet: RealmBaseDataSet, IBarLineS
4041
copy.highlightLineDashLengths = highlightLineDashLengths
4142
return copy
4243
}
43-
}
44+
}

Source/ChartsRealm/Data/RealmBaseDataSet.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
//
1414

1515
import Foundation
16-
16+
#if NEEDS_CHARTS
1717
import Charts
18+
#endif
1819
import Realm
1920
import Realm.Dynamic
2021

Source/ChartsRealm/Data/RealmBubbleData.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
//
1414

1515
import Foundation
16-
16+
#if NEEDS_CHARTS
1717
import Charts
18+
#endif
1819
import Realm
1920
import Realm.Dynamic
2021

@@ -31,4 +32,4 @@ public class RealmBubbleData: BubbleChartData
3132
super.init(xVals: RealmChartUtils.toXVals(results: results!, xValueField: xValueField), dataSets: dataSets)
3233
}
3334
}
34-
}
35+
}

0 commit comments

Comments
 (0)