Skip to content

Instantly share code, notes, and snippets.

@amleszk
amleszk / gist:3ad63f5fd8b164fb1149
Created October 3, 2014 16:08
post_install xcode example
post_install do |installer|
project = Xcodeproj::Project.open('MeetupApp.xcodeproj')
config_mapping = {
:Debug => 'Configuration/Debug.xcconfig'
}
set_xcconfig_reference(project,'MeetupApp','Debug','Configuration/Debug.xcconfig')
end
def set_xcconfig_reference(project, target_name, config_name, xcconfig_name)
@amleszk
amleszk / gist:c79d0f6701022a91d8da
Created May 14, 2014 21:11
Adding a query string to an NSURL
#import "NSURL+MUAdditions.h"
@implementation NSURL (MUAdditions)
-(NSURL*) URLByAppendingQueryString:(NSString*)queryString
{
NSString *absoluteString = [self absoluteString];
NSInteger startOfQueryString = [absoluteString rangeOfString:@"?"].location;
NSInteger startOfFragment = [absoluteString rangeOfString:@"#"].location;