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 |
@interface BitcoinLoaderSpecs : XCTestCase | |
@property (nonatomic, strong) RateModel * rate; | |
@end | |
@implementation BitcoinLoaderSpecs | |
- (void)setUp | |
{ | |
[super setUp]; | |
+(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]]; |
import Foundation | |
import UIKit | |
protocol NibDefinable { | |
var nibName: String { get } | |
} | |
extension NibDefinable { | |
var nibName : String { | |
return String(self.dynamicType) |
#!/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}/[email protected]" | |
sips --resampleWidth 60 "${f}/${1}" --out "${f}/[email protected]" |
// Returns number of seconds passed between time when process was created and function was called | |
func measureAppStartUpTime() -> Double { | |
var kinfo = kinfo_proc() | |
var size = MemoryLayout<kinfo_proc>.stride | |
var mib : [Int32] = [CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()] | |
sysctl(&mib, u_int(mib.count), &kinfo, &size, nil, 0) | |
let start_time = kinfo.kp_proc.p_starttime | |
var time : timeval = timeval(tv_sec: 0, tv_usec: 0) | |
gettimeofday(&time, nil) | |
let currentTimeMilliseconds = Double(Int64(time.tv_sec) * 1000) + Double(time.tv_usec) / 1000.0 |
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 { |