This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'JSON' | |
class Runner | |
def Runner.run | |
system("xcodebuild clean") | |
config = { | |
"devices": [ | |
"iPhone 6 Plus (8.1 Simulator)", | |
"iPhone 6 (8.1 Simulator)", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[_writeQueue addOperationWithBlock:^{ | |
[_writeQueueLock lock]; | |
[_queue inDatabase:^(FMDatabase *db) { | |
if (![db executeUpdate:@"..." withArgumentsInArray:...]) { ... } | |
}]; | |
[_writeQueueLock unlock]; | |
}]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[_writeQueueLock lock]; | |
[_queue inDatabase:^(FMDatabase *db) { | |
FMResultSet *res = [db executeQuery:@"..."]; | |
if ([res next]) { | |
... | |
} | |
[res close]; | |
}]; | |
[_writeQueueLock unlock]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_queue = [FMDatabaseQueue databaseQueueWithPath:...]; | |
_writeQueue = [NSOperationQueue new]; | |
[_writeQueue setMaxConcurrentOperationCount:1]; | |
_writeQueueLock = [NSRecursiveLock new]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static FMDatabaseQueue *_queue; | |
static NSOperationQueue *_writeQueue; | |
static NSRecursiveLock *_writeQueueLock; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
require 'pty' | |
require 'pry' | |
command = "xcrun -sdk iphoneos Validation -online -upload -verbose notHere.ipa" | |
# upload it now: http://stackoverflow.com/questions/7568420/how-to-perform-ios-app-validation-from-the-command-line | |
output = '' | |
begin |
NewerOlder