Install dependencies and run tests
rake
Dependencies, tests, archive in Release configuration and upload to TestFlight
rake testflight
static bool isRunningTests() | |
{ | |
NSDictionary* environment = [[NSProcessInfo processInfo] environment]; | |
NSString* injectBundle = environment[@"XCInjectBundle"]; | |
return [[injectBundle pathExtension] isEqualToString:@"xctest"]; | |
} | |
int main(int argc, char *argv[]) | |
{ | |
@autoreleasepool |
+(void)uploadUserPhoto:(UIImage *)image | |
success:(void (^)(void))success | |
failure:(FailureBlock)failure | |
{ | |
GTSessionManager * manager = [GTSessionManager manager]; | |
NSString* tmpFilename = [NSString stringWithFormat:@"%f", [NSDate timeIntervalSinceReferenceDate]]; | |
NSURL* tmpFileUrl = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:tmpFilename]]; | |
NSString * query = [NSString stringWithFormat:@"%@user?auth_token=%@",[manager.baseURL absoluteString],[[UserManager shared] authToken]]; |
@interface BitcoinLoaderSpecs : XCTestCase | |
@property (nonatomic, strong) RateModel * rate; | |
@end | |
@implementation BitcoinLoaderSpecs | |
- (void)setUp | |
{ | |
[super setUp]; | |
before_all do | |
cocoapods | |
scan | |
end | |
# Increment build number to current date | |
lane :set_build_number do | |
increment_build_number( | |
build_number: Time.new.strftime("%Y.%m.%d.%H%M") | |
) |
extension UIView { | |
@IBInspectable var cornerRadius: CGFloat { | |
get { return layer.cornerRadius } | |
set { | |
layer.cornerRadius = newValue | |
layer.masksToBounds = newValue > 0 | |
} | |
} | |
@IBInspectable var borderWidth: CGFloat { |
protocol NibDefinable { | |
var nibName: String { get } | |
} | |
extension NibDefinable { | |
var nibName : String { | |
return String(self.dynamicType) | |
} | |
} |
let stacks = [UserProfileStatsView(), SwitchCompanyView(), SendInvitationToCompanyView(), LogoutButtonView()] | |
stackView.axis = .Vertical | |
stacks.forEach { | |
stackView.addArrangedSubview($0) | |
} |
#!/bin/bash | |
f=$(pwd) | |
sips --resampleWidth 512 "${f}/${1}" --out "${f}/iTunesArtwork" | |
sips --resampleWidth 1024 "${f}/${1}" --out "${f}/iTunesArtwork@2x" | |
sips --resampleWidth 20 "${f}/${1}" --out "${f}/Icon-20.png" | |
sips --resampleWidth 40 "${f}/${1}" --out "${f}/Icon-20@2x.png" | |
sips --resampleWidth 60 "${f}/${1}" --out "${f}/Icon-20@3x.png" |