Permalink
Browse files

Update the podspec to provide variants that enable logging.

I've put in a request for better support from CocoaPods for setups like ours.
  • Loading branch information...
1 parent c7da2ec commit 39c49b3aa2759313791f486dfed4466678b9f834 @tonyarnold tonyarnold committed May 17, 2014
Showing with 27 additions and 8 deletions.
  1. +27 −8 MagicalRecord.podspec
View
@@ -14,32 +14,51 @@ Pod::Spec.new do |s|
s.subspec "Core" do |sp|
sp.framework = 'CoreData'
+ sp.header_dir = 'MagicalRecord'
sp.source_files = 'MagicalRecord/**/*.{h,m}'
sp.prefix_header_contents = <<-EOS
-#ifdef __OBJC__
+#import <CoreData/CoreData.h>
+#import "CoreData+MagicalRecord.h"
+EOS
+ end
+
+ s.subspec "Core+Logging" do |sp|
+ sp.framework = 'CoreData'
+ sp.header_dir = 'MagicalRecord'
+ sp.source_files = 'MagicalRecord/**/*.{h,m}'
+ sp.prefix_header_contents = <<-EOS
+#import <CoreData/CoreData.h>
#if defined(COCOAPODS_POD_AVAILABLE_CocoaLumberjack)
#import "DDLog.h"
#endif
+#define MR_LOGGING_ENABLED 1
+#import "CoreData+MagicalRecord.h"
+EOS
+ end
+ s.subspec "Shorthand" do |sp|
+ sp.framework = 'CoreData'
+ sp.header_dir = 'MagicalRecord'
+ sp.source_files = 'MagicalRecord/**/*.{h,m}'
+ sp.prefix_header_contents = <<-EOS
#import <CoreData/CoreData.h>
+#define MR_SHORTHAND 1
#import "CoreData+MagicalRecord.h"
-#endif
EOS
end
- s.subspec "Shorthand" do |sp|
+ s.subspec "Shorthand+Logging" do |sp|
sp.framework = 'CoreData'
+ sp.header_dir = 'MagicalRecord'
sp.source_files = 'MagicalRecord/**/*.{h,m}'
sp.prefix_header_contents = <<-EOS
-#ifdef __OBJC__
+#import <CoreData/CoreData.h>
#if defined(COCOAPODS_POD_AVAILABLE_CocoaLumberjack)
#import "DDLog.h"
#endif
-
-#import <CoreData/CoreData.h>
-#define MR_SHORTHAND 0
+#define MR_LOGGING_ENABLED 1
+#define MR_SHORTHAND 1
#import "CoreData+MagicalRecord.h"
-#endif
EOS
end

0 comments on commit 39c49b3

Please sign in to comment.