Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
shipping

Felix Krause KrauseFx

🚀
shipping
View GitHub Profile
@KrauseFx
KrauseFx / DeviceSwitcherForSubliminal.rb
Created Nov 1, 2014
This script runs through all the devices and generates a HTML page, viewing all the images
View DeviceSwitcherForSubliminal.rb
require 'JSON'
class Runner
def Runner.run
system("xcodebuild clean")
config = {
"devices": [
"iPhone 6 Plus (8.1 Simulator)",
"iPhone 6 (8.1 Simulator)",
View FMDBPart3.m
[_writeQueue addOperationWithBlock:^{
[_writeQueueLock lock];
[_queue inDatabase:^(FMDatabase *db) {
if (![db executeUpdate:@"..." withArgumentsInArray:...]) { ... }
}];
[_writeQueueLock unlock];
}];
View FMDPart3.m
[_writeQueueLock lock];
[_queue inDatabase:^(FMDatabase *db) {
FMResultSet *res = [db executeQuery:@"..."];
if ([res next]) {
...
}
[res close];
}];
[_writeQueueLock unlock];
View FMDBPart2.m
_queue = [FMDatabaseQueue databaseQueueWithPath:...];
_writeQueue = [NSOperationQueue new];
[_writeQueue setMaxConcurrentOperationCount:1];
_writeQueueLock = [NSRecursiveLock new];
View FMDBPart1.m
static FMDatabaseQueue *_queue;
static NSOperationQueue *_writeQueue;
static NSRecursiveLock *_writeQueueLock;
@KrauseFx
KrauseFx / get_identifier_to_be_uploaded.rb
Created Sep 2, 2014
iTunesConnect: Receive the app identifier of the next app to be uploaded (Waiting for Upload status), since you can not specify which app you want to deploy next (http://stackoverflow.com/questions/7568420/how-to-perform-ios-app-validation-from-the-command-line#comment23525642_7569194)
View get_identifier_to_be_uploaded.rb
# 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
You can’t perform that action at this time.