2010-06-17 13:10:45 -04:00
|
|
|
#ifdef __OBJC__
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import <UIKit/UIKit.h>
|
2013-03-04 15:09:09 -08:00
|
|
|
#import "Underscore.h"
|
2013-09-30 12:13:10 -07:00
|
|
|
#import <SystemConfiguration/SystemConfiguration.h>
|
|
|
|
#import <MobileCoreServices/MobileCoreServices.h>
|
2013-03-04 15:09:09 -08:00
|
|
|
|
2015-10-06 18:52:58 -07:00
|
|
|
//#define DEBUG 1
|
2014-10-01 16:11:44 -07:00
|
|
|
//#define PROD_DEBUG 1
|
2013-07-18 18:24:38 -07:00
|
|
|
|
|
|
|
#ifdef DEBUG
|
2013-08-12 11:59:07 -07:00
|
|
|
#define BACKGROUND_REFRESH_SECONDS -5
|
2013-07-18 18:24:38 -07:00
|
|
|
#define NEWSBLUR_URL [NSString stringWithFormat:@"http://nb.local.com"]
|
|
|
|
#define NEWSBLUR_HOST [NSString stringWithFormat:@"nb.local.com"]
|
2014-12-16 14:24:55 -08:00
|
|
|
#define ICONS_HOST [NSString stringWithFormat:@"http://nb.local.com/rss_feeds/icon"]
|
2014-02-07 14:15:55 -08:00
|
|
|
#elif PROD_DEBUG
|
2014-06-02 15:15:15 -07:00
|
|
|
#define BACKGROUND_REFRESH_SECONDS -5
|
2014-02-07 14:15:55 -08:00
|
|
|
#define NEWSBLUR_URL [NSString stringWithFormat:@"http://debug.newsblur.com"]
|
|
|
|
#define NEWSBLUR_HOST [NSString stringWithFormat:@"debug.newsblur.com"]
|
2014-12-16 14:24:55 -08:00
|
|
|
#define ICONS_HOST [NSString stringWithFormat:@"https://s3.amazonaws.com/icons.newsblur.com"]
|
2013-07-18 18:24:38 -07:00
|
|
|
#else
|
2013-08-12 11:59:07 -07:00
|
|
|
#define BACKGROUND_REFRESH_SECONDS -10*60
|
2013-09-11 12:15:31 -07:00
|
|
|
#define NEWSBLUR_URL [NSString stringWithFormat:@"https://www.newsblur.com"]
|
|
|
|
#define NEWSBLUR_HOST [NSString stringWithFormat:@"www.newsblur.com"]
|
2014-12-16 14:24:55 -08:00
|
|
|
#define ICONS_HOST [NSString stringWithFormat:@"https://s3.amazonaws.com/icons.newsblur.com"]
|
2013-07-18 18:24:38 -07:00
|
|
|
#endif
|
|
|
|
|
2013-03-04 15:09:09 -08:00
|
|
|
#define _ Underscore
|
2011-08-24 10:24:02 -07:00
|
|
|
|
|
|
|
#define UIColorFromRGB(rgbValue) [UIColor \
|
|
|
|
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
|
|
|
|
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
|
|
|
|
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
|
|
|
|
|
2012-08-08 13:48:10 -07:00
|
|
|
#define NEWSBLUR_LINK_COLOR 0x405BA8
|
2012-08-10 09:45:44 -07:00
|
|
|
#define NEWSBLUR_HIGHLIGHT_COLOR 0xd2e6fd
|
2013-07-10 15:57:19 -07:00
|
|
|
|
|
|
|
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
|
|
|
|
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
|
|
|
|
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
|
|
|
|
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
|
|
|
|
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
|
|
|
|
|
2012-07-28 23:31:12 -07:00
|
|
|
#endif
|