Skip to content

Commit 0afdb2e

Browse files
authored
Merge pull request #69 from kylef-archive/kylef/frameworks
Support integrated KFData as a framework via CocoaPods
2 parents e0cb664 + 7f12c47 commit 0afdb2e

11 files changed

Lines changed: 148 additions & 108 deletions

File tree

.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: objective-c
22
before_install:
33
- gem install cocoapods --no-rdoc --no-ri --no-document --quiet
4-
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet
54
- cd Tests && pod install && cd $TRAVIS_BUILD_DIR
65
script: make test
76

KFData.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Pod::Spec.new do |s|
3333
corespec.ios.source_files = 'KFData/KFData.h', 'KFData/Core/*.{h,m}'
3434

3535
corespec.osx.frameworks = 'CoreData'
36-
corespec.osx.source_files = 'KFData/Core/*.{h,m}'
36+
corespec.osx.source_files = 'KFData/KFData.h', 'KFData/Core/*.{h,m}'
3737
end
3838

3939
s.subspec 'Store' do |storespec|
@@ -51,7 +51,7 @@ Pod::Spec.new do |s|
5151
s.subspec 'UI' do |uispec|
5252
uispec.dependency 'KFData/Manager'
5353
uispec.platform = :ios
54-
uispec.ios.frameworks = 'UIKit'
54+
uispec.ios.frameworks = 'UIKit', 'CoreData'
5555
uispec.ios.source_files = 'KFData/UI/*.{h,m}'
5656
end
5757

KFData.xcworkspace/xcshareddata/KFData.xccheckout

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

KFData/Store/KFDataStore.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
1717
This notification will be fired on the main thread.
1818
*/
19-
NSString * const KFDataManagedObjectContextWillReset;
20-
NSString * const KFDataManagedObjectContextDidReset;
19+
extern NSString * const KFDataManagedObjectContextWillReset;
20+
extern NSString * const KFDataManagedObjectContextDidReset;
2121

2222

2323
typedef NS_ENUM(NSUInteger, KFDataStoreConfigurationType) {

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ clean:
2929

3030
test-osx:
3131
@printf "\e[34m=> Running OS X Tests\033[0m\n"
32-
@$(XCODEBUILD) -scheme 'OS X Tests' test | xcpretty -c | sed "s/^/ /" ; exit ${PIPESTATUS[0]}
32+
@$(XCODEBUILD) -scheme 'OS X Tests' test
3333

3434
test-ios:
3535
@printf "\e[34m=> Running iOS Tests\033[0m\n"
36-
@$(XCODEBUILD) -scheme 'iOS Tests' -sdk iphonesimulator -destination 'name=iPhone Retina (4-inch)' test 2>/dev/null | xcpretty -c | sed "s/^/ /" ; exit ${PIPESTATUS[0]}
36+
@$(XCODEBUILD) -scheme 'iOS Tests' -sdk iphonesimulator -destination 'name=iPhone Retina (4-inch)' test
3737

3838
test-podspec:
3939
@printf "\e[34m=> Linting podspec\033[0m\n"
40-
@pod lib lint KFData.podspec | sed "s/^/ /" ; exit ${PIPESTATUS[0]}
40+
@pod lib lint KFData.podspec
4141

4242
test: test-osx test-ios test-podspec
4343

Tests/KFDataTests.xcodeproj/project.pbxproj

Lines changed: 100 additions & 38 deletions
Large diffs are not rendered by default.

Tests/KFDataTests.xcodeproj/xcshareddata/xcschemes/OS X Tests.xcscheme

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
buildForAnalyzing = "YES">
2929
<BuildableReference
3030
BuildableIdentifier = "primary"
31-
BlueprintIdentifier = "63E5637DA82B4F9E894AC822"
32-
BuildableName = "libPods-osx.a"
31+
BlueprintIdentifier = "1A1946A05BE79DB5FB9A4891"
32+
BuildableName = "Pods_osx.framework"
3333
BlueprintName = "Pods-osx"
3434
ReferencedContainer = "container:Pods/Pods.xcodeproj">
3535
</BuildableReference>
@@ -63,6 +63,15 @@
6363
ignoresPersistentStateOnLaunch = "NO"
6464
debugDocumentVersioning = "YES"
6565
allowLocationSimulation = "YES">
66+
<MacroExpansion>
67+
<BuildableReference
68+
BuildableIdentifier = "primary"
69+
BlueprintIdentifier = "778FBFA0176107B600DE0FFF"
70+
BuildableName = "OS X Tests.xctest"
71+
BlueprintName = "OS X Tests"
72+
ReferencedContainer = "container:KFDataTests.xcodeproj">
73+
</BuildableReference>
74+
</MacroExpansion>
6675
<AdditionalOptions>
6776
</AdditionalOptions>
6877
</LaunchAction>

Tests/KFDataTests.xcodeproj/xcshareddata/xcschemes/iOS Tests.xcscheme

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
buildForAnalyzing = "YES">
2929
<BuildableReference
3030
BuildableIdentifier = "primary"
31-
BlueprintIdentifier = "50F70C15A59F4B898CEBD4D4"
32-
BuildableName = "libPods-ios.a"
31+
BlueprintIdentifier = "E46A35F6DD99B52C2939E879"
32+
BuildableName = "Pods_ios.framework"
3333
BlueprintName = "Pods-ios"
3434
ReferencedContainer = "container:Pods/Pods.xcodeproj">
3535
</BuildableReference>
@@ -63,6 +63,15 @@
6363
ignoresPersistentStateOnLaunch = "NO"
6464
debugDocumentVersioning = "YES"
6565
allowLocationSimulation = "YES">
66+
<MacroExpansion>
67+
<BuildableReference
68+
BuildableIdentifier = "primary"
69+
BlueprintIdentifier = "778FBF751761077800DE0FFF"
70+
BuildableName = "iOS Tests.xctest"
71+
BlueprintName = "iOS Tests"
72+
ReferencedContainer = "container:KFDataTests.xcodeproj">
73+
</BuildableReference>
74+
</MacroExpansion>
6675
<AdditionalOptions>
6776
</AdditionalOptions>
6877
</LaunchAction>

Tests/Podfile

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
1-
xcodeproj 'KFDataTests'
1+
project 'KFDataTests'
22
workspace '../KFData'
33
inhibit_all_warnings!
4+
use_frameworks!
45

5-
def import_pods
6-
pod 'QueryKit'
7-
pod 'KFData', :path => '../'
8-
pod 'KFData/Compatibility', :path => '../'
9-
pod 'Expecta'
10-
end
6+
abstract_target 'KFData' do
7+
pod 'QueryKit'
8+
pod 'KFData', :path => '../'
9+
pod 'KFData/Compatibility', :path => '../'
10+
pod 'Expecta'
1111

12-
target :ios do
13-
platform :ios, '5.0'
14-
link_with 'iOS Tests'
15-
import_pods
16-
end
12+
target 'iOS Tests' do
13+
platform :ios, '8.0'
14+
end
1715

18-
target :osx do
16+
target 'OS X Tests' do
1917
platform :osx, '10.7'
20-
link_with 'OS X Tests'
21-
import_pods
18+
end
2219
end
23-

0 commit comments

Comments
 (0)