Skip to content

Commit

Permalink
fix cocoapod setup
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pmairoldi committed Sep 21, 2016
1 parent 6b440aa commit 95ea820
Show file tree
Hide file tree
Showing 16 changed files with 50 additions and 34 deletions.
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0
3 changes: 1 addition & 2 deletions Charts.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Charts"
s.version = "2.2.5"
s.version = "3.0.0"
s.summary = "Charts is a powerful & easy to use chart library for iOS, tvOS and OSX (and Android)"
s.homepage = "https://github.com/danielgindi/Charts"
s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" }
Expand All @@ -10,7 +10,6 @@ Pod::Spec.new do |s|
s.osx.deployment_target = "10.11"
s.source = { :git => "https://github.com/danielgindi/Charts.git", :tag => "v#{s.version}" }
s.default_subspec = "Core"
s.prepare_command = "sed -i '' -e 's/import Charts//g' Source/ChartsRealm/**/*.swift"

s.subspec "Core" do |ss|
ss.source_files = "Source/Charts/**/*.swift"
Expand Down
2 changes: 2 additions & 0 deletions Charts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1343,6 +1343,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Source/Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
OTHER_SWIFT_FLAGS = "-DNEEDS_CHARTS";
PRODUCT_BUNDLE_IDENTIFIER = com.dcg.ChartsRealm;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -1361,6 +1362,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Source/Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
OTHER_SWIFT_FLAGS = "-DNEEDS_CHARTS";
PRODUCT_BUNDLE_IDENTIFIER = com.dcg.ChartsRealm;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ source "https://rubygems.org"

gem "rake"
gem "xcpretty"
gem "cocoapods"
gem "cocoapods", "1.1.0.rc.2"
43 changes: 23 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (5.0.0.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
activesupport (4.2.7.1)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
claide (1.0.0)
cocoapods (1.0.1)
activesupport (>= 4.0.2)
cocoapods (1.1.0.rc.2)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.0, < 2.0)
cocoapods-core (= 1.0.1)
cocoapods-deintegrate (>= 1.0.0, < 2.0)
cocoapods-downloader (>= 1.0.0, < 2.0)
cocoapods-core (= 1.1.0.rc.2)
cocoapods-deintegrate (>= 1.0.1, < 2.0)
cocoapods-downloader (>= 1.1.1, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.0.0, < 2.0)
cocoapods-try (>= 1.0.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored (~> 1.2)
escape (~> 0.0.4)
fourflusher (~> 0.3.0)
molinillo (~> 0.4.5)
fourflusher (~> 1.0.1)
gh_inspector (~> 1.0)
molinillo (~> 0.5.1)
nap (~> 1.0)
xcodeproj (>= 1.1.0, < 2.0)
cocoapods-core (1.0.1)
activesupport (>= 4.0.2)
xcodeproj (>= 1.3.1, < 2.0)
cocoapods-core (1.1.0.rc.2)
activesupport (>= 4.0.2, < 5)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.1)
Expand All @@ -39,21 +41,22 @@ GEM
netrc (= 0.7.8)
cocoapods-try (1.1.0)
colored (1.2)
concurrent-ruby (1.0.2)
escape (0.0.4)
fourflusher (0.3.2)
fourflusher (1.0.1)
fuzzy_match (2.0.4)
gh_inspector (1.0.2)
i18n (0.7.0)
json (1.8.3)
minitest (5.9.0)
molinillo (0.4.5)
molinillo (0.5.1)
nap (1.1.0)
netrc (0.7.8)
rake (11.2.2)
rake (11.3.0)
rouge (1.11.1)
thread_safe (0.3.5)
tzinfo (1.2.2)
thread_safe (~> 0.1)
xcodeproj (1.3.0)
xcodeproj (1.3.1)
activesupport (>= 3)
claide (>= 1.0.0, < 2.0)
colored (~> 1.2)
Expand All @@ -64,9 +67,9 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods
cocoapods (= 1.1.0.rc.2)
rake
xcpretty

BUNDLED WITH
1.12.5
1.13.1
3 changes: 2 additions & 1 deletion Source/ChartsRealm/Data/RealmBarDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

import Foundation
import CoreGraphics

#if NEEDS_CHARTS
import Charts
#endif
import Realm
import Realm.Dynamic

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
//

import Foundation

#if NEEDS_CHARTS
import Charts
#endif
import Realm
import Realm.Dynamic

Expand Down
3 changes: 2 additions & 1 deletion Source/ChartsRealm/Data/RealmBaseDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
//

import Foundation

#if NEEDS_CHARTS
import Charts
#endif
import Realm
import Realm.Dynamic

Expand Down
3 changes: 2 additions & 1 deletion Source/ChartsRealm/Data/RealmBubbleDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

import Foundation
import CoreGraphics

#if NEEDS_CHARTS
import Charts
#endif
import Realm
import Realm.Dynamic

Expand Down
3 changes: 2 additions & 1 deletion Source/ChartsRealm/Data/RealmCandleDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

import Foundation
import CoreGraphics

#if NEEDS_CHARTS
import Charts
#endif
import Realm
import Realm.Dynamic

Expand Down
3 changes: 2 additions & 1 deletion Source/ChartsRealm/Data/RealmLineDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
//

import Foundation

#if NEEDS_CHARTS
import Charts
#endif
import Realm
import Realm.Dynamic

Expand Down
3 changes: 2 additions & 1 deletion Source/ChartsRealm/Data/RealmLineRadarDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

import Foundation
import CoreGraphics

#if NEEDS_CHARTS
import Charts
#endif
import Realm
import Realm.Dynamic

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
//

import Foundation

#if NEEDS_CHARTS
import Charts
#endif
import Realm
import Realm.Dynamic

Expand Down
3 changes: 2 additions & 1 deletion Source/ChartsRealm/Data/RealmPieDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

import Foundation
import CoreGraphics

#if NEEDS_CHARTS
import Charts
#endif
import Realm
import Realm.Dynamic

Expand Down
3 changes: 2 additions & 1 deletion Source/ChartsRealm/Data/RealmRadarDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

import Foundation
import CoreGraphics

#if NEEDS_CHARTS
import Charts
#endif
import Realm
import Realm.Dynamic

Expand Down
3 changes: 2 additions & 1 deletion Source/ChartsRealm/Data/RealmScatterDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

import Foundation
import CoreGraphics

#if NEEDS_CHARTS
import Charts
#endif
import Realm
import Realm.Dynamic

Expand Down

3 comments on commit 95ea820

@danielgindi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't get why "#if NEEDS_CHARTS"? Is there a configuration where ChartsRealm could compile without knowing or needing Charts? :-)

@pmairoldi
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cocoapods doesn't need to have import Charts that is why that compiler flag is there. I dont know why that pushed to master, it was a mistake. Hopefully #1509 explains why the change was made better.

@danielgindi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it!

Please sign in to comment.