├── NSString+CookieTests ├── en.lproj │ └── InfoPlist.strings ├── NSString+CookieTests-Info.plist └── NSString_CookieTests.m ├── .gitignore ├── NSString+Cookie ├── NSString+Cookie-Prefix.pch ├── NSString+Cookie.h └── NSString+Cookie.m ├── README.md └── NSString+Cookie.xcodeproj └── project.pbxproj /NSString+CookieTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .hgignore 3 | 4 | build/* 5 | .hg/* 6 | docs/* 7 | .svn/ 8 | 9 | # Xcode 10 | *.pbxuser 11 | *.mode1v3 12 | *.mode2v3 13 | *.perspectivev3 14 | *.xcuserstate 15 | project.xcworkspace/ 16 | xcuserdata/ 17 | 18 | .idea/ -------------------------------------------------------------------------------- /NSString+Cookie/NSString+Cookie-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #endif 10 | -------------------------------------------------------------------------------- /NSString+Cookie/NSString+Cookie.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+Cookie.h 3 | // NSString+Cookie 4 | // 5 | // Created by Luke on 3/5/14. 6 | // Copyright (c) 2014 taobao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | 将单条Cookie字符串转成NSHTTPCookie对象 13 | Cookie的规范可以见相应的RFC文档 http://tools.ietf.org/html/rfc6265 14 | */ 15 | @interface NSString(Cookie) 16 | 17 | /*! 18 | 当前字符串为单条cookie 19 | */ 20 | - (NSHTTPCookie *)cookie; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #### NSString-Cookie 2 | =============== 3 | 将单个Cookie字符串转成NSHTTPCookie对象. 4 | 单条Cookie由多个属性组成,各个属性由分号隔开。 5 | 具体的规范可以参见RFC文档: [http://tools.ietf.org/html/rfc6265](http://tools.ietf.org/html/rfc6265) 6 | 7 | 下面是支付宝网站的某个Set-Cookie的例子 8 | 9 | `ali_apache_id=10.228.255.113.1394110376595.4; path=/; domain=.alipay.com; expires=Wed, 30-Nov-2084 01:01:01 GMT` 10 | 11 | NSString *alipaySetCookieString = @"ali_apache_id=10.228.255.113.1394110376595.4; path=/; domain=.alipay.com; expires=Wed, 30-Nov-2084 01:01:01 GMT"; 12 | NSHTTPCookie *cookie = [alipaySetCookieString cookie]; 13 | -------------------------------------------------------------------------------- /NSString+CookieTests/NSString+CookieTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.taobao.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /NSString+CookieTests/NSString_CookieTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString_CookieTests.m 3 | // NSString+CookieTests 4 | // 5 | // Created by Luke on 3/5/14. 6 | // Copyright (c) 2014 taobao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "NSString+Cookie.h" 11 | 12 | @interface NSString_CookieTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation NSString_CookieTests 17 | 18 | - (void)setUp 19 | { 20 | [super setUp]; 21 | // Put setup code here. This method is called before the invocation of each test method in the class. 22 | } 23 | 24 | - (void)tearDown 25 | { 26 | // Put teardown code here. This method is called after the invocation of each test method in the class. 27 | [super tearDown]; 28 | } 29 | 30 | - (void)testCookie 31 | { 32 | 33 | NSString *alipaySetCookieString = @"ali_apache_id=10.228.255.113.1394110376595.4; path=/; domain=.alipay.com; expires=Wed, 30-Nov-2084 01:01:01 GMT"; 34 | NSHTTPCookie *cookie = [alipaySetCookieString cookie]; 35 | XCTAssertEqualObjects(cookie.name, @"ali_apache_id", @"检测name"); 36 | XCTAssertEqualObjects(cookie.value, @"10.228.255.113.1394110376595.4", @"检测value"); 37 | XCTAssertEqualObjects(cookie.domain, @".alipay.com", @"检测domain"); 38 | XCTAssertEqualObjects(cookie.path, @"/", @"检测path"); 39 | 40 | NSString *dateString = @"Wed, 30-Nov-2084 01:01:01 GMT" ; 41 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 42 | [dateFormatter setDateFormat:@"EEE, d-MMM-yyyy HH:mm:ss zzz"]; 43 | NSDate *expiresDate = [dateFormatter dateFromString:dateString]; 44 | 45 | XCTAssertEqualObjects(cookie.expiresDate, expiresDate, @"检测expires"); 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /NSString+Cookie/NSString+Cookie.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString_Cookie.m 3 | // NSString+Cookie 4 | // 5 | // Created by Luke on 3/5/14. 6 | // Copyright (c) 2014 taobao. All rights reserved. 7 | // 8 | 9 | #import "NSString+Cookie.h" 10 | 11 | @implementation NSString(Cookie) 12 | 13 | - (NSDictionary *)cookieMap{ 14 | NSMutableDictionary *cookieMap = [NSMutableDictionary dictionary]; 15 | 16 | NSArray *cookieKeyValueStrings = [self componentsSeparatedByString:@";"]; 17 | for (NSString *cookieKeyValueString in cookieKeyValueStrings) { 18 | //找出第一个"="号的位置 19 | NSRange separatorRange = [cookieKeyValueString rangeOfString:@"="]; 20 | 21 | if (separatorRange.location != NSNotFound && 22 | separatorRange.location > 0 && 23 | separatorRange.location < ([cookieKeyValueString length] - 1)) { 24 | //以上条件确保"="前后都有内容,不至于key或者value为空 25 | 26 | NSRange keyRange = NSMakeRange(0, separatorRange.location); 27 | NSString *key = [cookieKeyValueString substringWithRange:keyRange]; 28 | NSString *value = [cookieKeyValueString substringFromIndex:separatorRange.location + separatorRange.length]; 29 | 30 | key = [key stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; 31 | value = [value stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; 32 | [cookieMap setObject:value forKey:key]; 33 | 34 | } 35 | } 36 | return cookieMap; 37 | } 38 | 39 | 40 | 41 | - (NSDictionary *)cookieProperties{ 42 | NSDictionary *cookieMap = [self cookieMap]; 43 | 44 | NSMutableDictionary *cookieProperties = [NSMutableDictionary dictionary]; 45 | for (NSString *key in [cookieMap allKeys]) { 46 | 47 | NSString *value = [cookieMap objectForKey:key]; 48 | NSString *uppercaseKey = [key uppercaseString];//主要是排除命名不规范的问题 49 | 50 | if ([uppercaseKey isEqualToString:@"DOMAIN"]) { 51 | if (![value hasPrefix:@"."] && ![value hasPrefix:@"www"]) { 52 | value = [NSString stringWithFormat:@".%@",value]; 53 | } 54 | [cookieProperties setObject:value forKey:NSHTTPCookieDomain]; 55 | }else if ([uppercaseKey isEqualToString:@"VERSION"]) { 56 | [cookieProperties setObject:value forKey:NSHTTPCookieVersion]; 57 | }else if ([uppercaseKey isEqualToString:@"MAX-AGE"]||[uppercaseKey isEqualToString:@"MAXAGE"]) { 58 | [cookieProperties setObject:value forKey:NSHTTPCookieMaximumAge]; 59 | }else if ([uppercaseKey isEqualToString:@"PATH"]) { 60 | [cookieProperties setObject:value forKey:NSHTTPCookiePath]; 61 | }else if([uppercaseKey isEqualToString:@"ORIGINURL"]){ 62 | [cookieProperties setObject:value forKey:NSHTTPCookieOriginURL]; 63 | }else if([uppercaseKey isEqualToString:@"PORT"]){ 64 | [cookieProperties setObject:value forKey:NSHTTPCookiePort]; 65 | }else if([uppercaseKey isEqualToString:@"SECURE"]||[uppercaseKey isEqualToString:@"ISSECURE"]){ 66 | [cookieProperties setObject:value forKey:NSHTTPCookieSecure]; 67 | }else if([uppercaseKey isEqualToString:@"COMMENT"]){ 68 | [cookieProperties setObject:value forKey:NSHTTPCookieComment]; 69 | }else if([uppercaseKey isEqualToString:@"COMMENTURL"]){ 70 | [cookieProperties setObject:value forKey:NSHTTPCookieCommentURL]; 71 | }else if([uppercaseKey isEqualToString:@"EXPIRES"]){ 72 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 73 | [dateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]]; 74 | dateFormatter.dateFormat = @"EEE, dd-MMM-yyyy HH:mm:ss zzz"; 75 | [cookieProperties setObject:[dateFormatter dateFromString:value] forKey:NSHTTPCookieExpires]; 76 | }else if([uppercaseKey isEqualToString:@"DISCART"]){ 77 | [cookieProperties setObject:value forKey:NSHTTPCookieDiscard]; 78 | }else if([uppercaseKey isEqualToString:@"NAME"]){ 79 | [cookieProperties setObject:value forKey:NSHTTPCookieName]; 80 | }else if([uppercaseKey isEqualToString:@"VALUE"]){ 81 | [cookieProperties setObject:value forKey:NSHTTPCookieValue]; 82 | }else{ 83 | [cookieProperties setObject:key forKey:NSHTTPCookieName]; 84 | [cookieProperties setObject:value forKey:NSHTTPCookieValue]; 85 | } 86 | } 87 | 88 | //由于cookieWithProperties:方法properties中不能没有NSHTTPCookiePath,所以这边需要确认下,如果没有则默认为@"/" 89 | if (![cookieProperties objectForKey:NSHTTPCookiePath]) { 90 | [cookieProperties setObject:@"/" forKey:NSHTTPCookiePath]; 91 | } 92 | return cookieProperties; 93 | } 94 | 95 | - (NSHTTPCookie *)cookie{ 96 | NSDictionary *cookieProperties = [self cookieProperties]; 97 | NSHTTPCookie *cookie = [NSHTTPCookie cookieWithProperties:cookieProperties]; 98 | return cookie; 99 | } 100 | 101 | @end 102 | -------------------------------------------------------------------------------- /NSString+Cookie.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | A3959B8618C6F39200DA8037 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3959B8518C6F39200DA8037 /* Foundation.framework */; }; 11 | A3959B8B18C6F39300DA8037 /* NSString+Cookie.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A3959B8A18C6F39300DA8037 /* NSString+Cookie.h */; }; 12 | A3959B8D18C6F39300DA8037 /* NSString+Cookie.m in Sources */ = {isa = PBXBuildFile; fileRef = A3959B8C18C6F39300DA8037 /* NSString+Cookie.m */; }; 13 | A3959B9418C6F39300DA8037 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3959B9318C6F39300DA8037 /* XCTest.framework */; }; 14 | A3959B9518C6F39300DA8037 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3959B8518C6F39200DA8037 /* Foundation.framework */; }; 15 | A3959B9718C6F39300DA8037 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3959B9618C6F39300DA8037 /* UIKit.framework */; }; 16 | A3959B9A18C6F39300DA8037 /* libNSString+Cookie.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A3959B8218C6F39200DA8037 /* libNSString+Cookie.a */; }; 17 | A3959BA018C6F39300DA8037 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A3959B9E18C6F39300DA8037 /* InfoPlist.strings */; }; 18 | A3959BA218C6F39300DA8037 /* NSString_CookieTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A3959BA118C6F39300DA8037 /* NSString_CookieTests.m */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | A3959B9818C6F39300DA8037 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = A3959B7A18C6F39200DA8037 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = A3959B8118C6F39200DA8037; 27 | remoteInfo = "NSString+Cookie"; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXCopyFilesBuildPhase section */ 32 | A3959B8018C6F39200DA8037 /* CopyFiles */ = { 33 | isa = PBXCopyFilesBuildPhase; 34 | buildActionMask = 2147483647; 35 | dstPath = "include/$(PRODUCT_NAME)"; 36 | dstSubfolderSpec = 16; 37 | files = ( 38 | A3959B8B18C6F39300DA8037 /* NSString+Cookie.h in CopyFiles */, 39 | ); 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXCopyFilesBuildPhase section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | A3959B8218C6F39200DA8037 /* libNSString+Cookie.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libNSString+Cookie.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | A3959B8518C6F39200DA8037 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 47 | A3959B8918C6F39200DA8037 /* NSString+Cookie-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+Cookie-Prefix.pch"; sourceTree = ""; }; 48 | A3959B8A18C6F39300DA8037 /* NSString+Cookie.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+Cookie.h"; sourceTree = ""; }; 49 | A3959B8C18C6F39300DA8037 /* NSString+Cookie.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+Cookie.m"; sourceTree = ""; }; 50 | A3959B9218C6F39300DA8037 /* NSString+CookieTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "NSString+CookieTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | A3959B9318C6F39300DA8037 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 52 | A3959B9618C6F39300DA8037 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 53 | A3959B9D18C6F39300DA8037 /* NSString+CookieTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "NSString+CookieTests-Info.plist"; sourceTree = ""; }; 54 | A3959B9F18C6F39300DA8037 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 55 | A3959BA118C6F39300DA8037 /* NSString_CookieTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NSString_CookieTests.m; sourceTree = ""; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | A3959B7F18C6F39200DA8037 /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | A3959B8618C6F39200DA8037 /* Foundation.framework in Frameworks */, 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | A3959B8F18C6F39300DA8037 /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | A3959B9418C6F39300DA8037 /* XCTest.framework in Frameworks */, 72 | A3959B9718C6F39300DA8037 /* UIKit.framework in Frameworks */, 73 | A3959B9518C6F39300DA8037 /* Foundation.framework in Frameworks */, 74 | A3959B9A18C6F39300DA8037 /* libNSString+Cookie.a in Frameworks */, 75 | ); 76 | runOnlyForDeploymentPostprocessing = 0; 77 | }; 78 | /* End PBXFrameworksBuildPhase section */ 79 | 80 | /* Begin PBXGroup section */ 81 | A3959B7918C6F39200DA8037 = { 82 | isa = PBXGroup; 83 | children = ( 84 | A3959B8718C6F39200DA8037 /* NSString+Cookie */, 85 | A3959B9B18C6F39300DA8037 /* NSString+CookieTests */, 86 | A3959B8418C6F39200DA8037 /* Frameworks */, 87 | A3959B8318C6F39200DA8037 /* Products */, 88 | ); 89 | sourceTree = ""; 90 | }; 91 | A3959B8318C6F39200DA8037 /* Products */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | A3959B8218C6F39200DA8037 /* libNSString+Cookie.a */, 95 | A3959B9218C6F39300DA8037 /* NSString+CookieTests.xctest */, 96 | ); 97 | name = Products; 98 | sourceTree = ""; 99 | }; 100 | A3959B8418C6F39200DA8037 /* Frameworks */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | A3959B8518C6F39200DA8037 /* Foundation.framework */, 104 | A3959B9318C6F39300DA8037 /* XCTest.framework */, 105 | A3959B9618C6F39300DA8037 /* UIKit.framework */, 106 | ); 107 | name = Frameworks; 108 | sourceTree = ""; 109 | }; 110 | A3959B8718C6F39200DA8037 /* NSString+Cookie */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | A3959B8A18C6F39300DA8037 /* NSString+Cookie.h */, 114 | A3959B8C18C6F39300DA8037 /* NSString+Cookie.m */, 115 | A3959B8818C6F39200DA8037 /* Supporting Files */, 116 | ); 117 | path = "NSString+Cookie"; 118 | sourceTree = ""; 119 | }; 120 | A3959B8818C6F39200DA8037 /* Supporting Files */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | A3959B8918C6F39200DA8037 /* NSString+Cookie-Prefix.pch */, 124 | ); 125 | name = "Supporting Files"; 126 | sourceTree = ""; 127 | }; 128 | A3959B9B18C6F39300DA8037 /* NSString+CookieTests */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | A3959BA118C6F39300DA8037 /* NSString_CookieTests.m */, 132 | A3959B9C18C6F39300DA8037 /* Supporting Files */, 133 | ); 134 | path = "NSString+CookieTests"; 135 | sourceTree = ""; 136 | }; 137 | A3959B9C18C6F39300DA8037 /* Supporting Files */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | A3959B9D18C6F39300DA8037 /* NSString+CookieTests-Info.plist */, 141 | A3959B9E18C6F39300DA8037 /* InfoPlist.strings */, 142 | ); 143 | name = "Supporting Files"; 144 | sourceTree = ""; 145 | }; 146 | /* End PBXGroup section */ 147 | 148 | /* Begin PBXNativeTarget section */ 149 | A3959B8118C6F39200DA8037 /* NSString+Cookie */ = { 150 | isa = PBXNativeTarget; 151 | buildConfigurationList = A3959BA518C6F39300DA8037 /* Build configuration list for PBXNativeTarget "NSString+Cookie" */; 152 | buildPhases = ( 153 | A3959B7E18C6F39200DA8037 /* Sources */, 154 | A3959B7F18C6F39200DA8037 /* Frameworks */, 155 | A3959B8018C6F39200DA8037 /* CopyFiles */, 156 | ); 157 | buildRules = ( 158 | ); 159 | dependencies = ( 160 | ); 161 | name = "NSString+Cookie"; 162 | productName = "NSString+Cookie"; 163 | productReference = A3959B8218C6F39200DA8037 /* libNSString+Cookie.a */; 164 | productType = "com.apple.product-type.library.static"; 165 | }; 166 | A3959B9118C6F39300DA8037 /* NSString+CookieTests */ = { 167 | isa = PBXNativeTarget; 168 | buildConfigurationList = A3959BA818C6F39300DA8037 /* Build configuration list for PBXNativeTarget "NSString+CookieTests" */; 169 | buildPhases = ( 170 | A3959B8E18C6F39300DA8037 /* Sources */, 171 | A3959B8F18C6F39300DA8037 /* Frameworks */, 172 | A3959B9018C6F39300DA8037 /* Resources */, 173 | ); 174 | buildRules = ( 175 | ); 176 | dependencies = ( 177 | A3959B9918C6F39300DA8037 /* PBXTargetDependency */, 178 | ); 179 | name = "NSString+CookieTests"; 180 | productName = "NSString+CookieTests"; 181 | productReference = A3959B9218C6F39300DA8037 /* NSString+CookieTests.xctest */; 182 | productType = "com.apple.product-type.bundle.unit-test"; 183 | }; 184 | /* End PBXNativeTarget section */ 185 | 186 | /* Begin PBXProject section */ 187 | A3959B7A18C6F39200DA8037 /* Project object */ = { 188 | isa = PBXProject; 189 | attributes = { 190 | LastUpgradeCheck = 0500; 191 | ORGANIZATIONNAME = taobao; 192 | }; 193 | buildConfigurationList = A3959B7D18C6F39200DA8037 /* Build configuration list for PBXProject "NSString+Cookie" */; 194 | compatibilityVersion = "Xcode 3.2"; 195 | developmentRegion = English; 196 | hasScannedForEncodings = 0; 197 | knownRegions = ( 198 | en, 199 | ); 200 | mainGroup = A3959B7918C6F39200DA8037; 201 | productRefGroup = A3959B8318C6F39200DA8037 /* Products */; 202 | projectDirPath = ""; 203 | projectRoot = ""; 204 | targets = ( 205 | A3959B8118C6F39200DA8037 /* NSString+Cookie */, 206 | A3959B9118C6F39300DA8037 /* NSString+CookieTests */, 207 | ); 208 | }; 209 | /* End PBXProject section */ 210 | 211 | /* Begin PBXResourcesBuildPhase section */ 212 | A3959B9018C6F39300DA8037 /* Resources */ = { 213 | isa = PBXResourcesBuildPhase; 214 | buildActionMask = 2147483647; 215 | files = ( 216 | A3959BA018C6F39300DA8037 /* InfoPlist.strings in Resources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXResourcesBuildPhase section */ 221 | 222 | /* Begin PBXSourcesBuildPhase section */ 223 | A3959B7E18C6F39200DA8037 /* Sources */ = { 224 | isa = PBXSourcesBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | A3959B8D18C6F39300DA8037 /* NSString+Cookie.m in Sources */, 228 | ); 229 | runOnlyForDeploymentPostprocessing = 0; 230 | }; 231 | A3959B8E18C6F39300DA8037 /* Sources */ = { 232 | isa = PBXSourcesBuildPhase; 233 | buildActionMask = 2147483647; 234 | files = ( 235 | A3959BA218C6F39300DA8037 /* NSString_CookieTests.m in Sources */, 236 | ); 237 | runOnlyForDeploymentPostprocessing = 0; 238 | }; 239 | /* End PBXSourcesBuildPhase section */ 240 | 241 | /* Begin PBXTargetDependency section */ 242 | A3959B9918C6F39300DA8037 /* PBXTargetDependency */ = { 243 | isa = PBXTargetDependency; 244 | target = A3959B8118C6F39200DA8037 /* NSString+Cookie */; 245 | targetProxy = A3959B9818C6F39300DA8037 /* PBXContainerItemProxy */; 246 | }; 247 | /* End PBXTargetDependency section */ 248 | 249 | /* Begin PBXVariantGroup section */ 250 | A3959B9E18C6F39300DA8037 /* InfoPlist.strings */ = { 251 | isa = PBXVariantGroup; 252 | children = ( 253 | A3959B9F18C6F39300DA8037 /* en */, 254 | ); 255 | name = InfoPlist.strings; 256 | sourceTree = ""; 257 | }; 258 | /* End PBXVariantGroup section */ 259 | 260 | /* Begin XCBuildConfiguration section */ 261 | A3959BA318C6F39300DA8037 /* Debug */ = { 262 | isa = XCBuildConfiguration; 263 | buildSettings = { 264 | ALWAYS_SEARCH_USER_PATHS = NO; 265 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 266 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 267 | CLANG_CXX_LIBRARY = "libc++"; 268 | CLANG_ENABLE_MODULES = YES; 269 | CLANG_ENABLE_OBJC_ARC = YES; 270 | CLANG_WARN_BOOL_CONVERSION = YES; 271 | CLANG_WARN_CONSTANT_CONVERSION = YES; 272 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 273 | CLANG_WARN_EMPTY_BODY = YES; 274 | CLANG_WARN_ENUM_CONVERSION = YES; 275 | CLANG_WARN_INT_CONVERSION = YES; 276 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 277 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 278 | COPY_PHASE_STRIP = NO; 279 | GCC_C_LANGUAGE_STANDARD = gnu99; 280 | GCC_DYNAMIC_NO_PIC = NO; 281 | GCC_OPTIMIZATION_LEVEL = 0; 282 | GCC_PREPROCESSOR_DEFINITIONS = ( 283 | "DEBUG=1", 284 | "$(inherited)", 285 | ); 286 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 287 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 288 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 289 | GCC_WARN_UNDECLARED_SELECTOR = YES; 290 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 291 | GCC_WARN_UNUSED_FUNCTION = YES; 292 | GCC_WARN_UNUSED_VARIABLE = YES; 293 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 294 | ONLY_ACTIVE_ARCH = YES; 295 | SDKROOT = iphoneos; 296 | }; 297 | name = Debug; 298 | }; 299 | A3959BA418C6F39300DA8037 /* Release */ = { 300 | isa = XCBuildConfiguration; 301 | buildSettings = { 302 | ALWAYS_SEARCH_USER_PATHS = NO; 303 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 304 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 305 | CLANG_CXX_LIBRARY = "libc++"; 306 | CLANG_ENABLE_MODULES = YES; 307 | CLANG_ENABLE_OBJC_ARC = YES; 308 | CLANG_WARN_BOOL_CONVERSION = YES; 309 | CLANG_WARN_CONSTANT_CONVERSION = YES; 310 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 311 | CLANG_WARN_EMPTY_BODY = YES; 312 | CLANG_WARN_ENUM_CONVERSION = YES; 313 | CLANG_WARN_INT_CONVERSION = YES; 314 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 315 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 316 | COPY_PHASE_STRIP = YES; 317 | ENABLE_NS_ASSERTIONS = NO; 318 | GCC_C_LANGUAGE_STANDARD = gnu99; 319 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 320 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 321 | GCC_WARN_UNDECLARED_SELECTOR = YES; 322 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 323 | GCC_WARN_UNUSED_FUNCTION = YES; 324 | GCC_WARN_UNUSED_VARIABLE = YES; 325 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 326 | SDKROOT = iphoneos; 327 | VALIDATE_PRODUCT = YES; 328 | }; 329 | name = Release; 330 | }; 331 | A3959BA618C6F39300DA8037 /* Debug */ = { 332 | isa = XCBuildConfiguration; 333 | buildSettings = { 334 | DSTROOT = /tmp/NSString_Cookie.dst; 335 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 336 | GCC_PREFIX_HEADER = "NSString+Cookie/NSString+Cookie-Prefix.pch"; 337 | OTHER_LDFLAGS = "-ObjC"; 338 | PRODUCT_NAME = "$(TARGET_NAME)"; 339 | SKIP_INSTALL = YES; 340 | }; 341 | name = Debug; 342 | }; 343 | A3959BA718C6F39300DA8037 /* Release */ = { 344 | isa = XCBuildConfiguration; 345 | buildSettings = { 346 | DSTROOT = /tmp/NSString_Cookie.dst; 347 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 348 | GCC_PREFIX_HEADER = "NSString+Cookie/NSString+Cookie-Prefix.pch"; 349 | OTHER_LDFLAGS = "-ObjC"; 350 | PRODUCT_NAME = "$(TARGET_NAME)"; 351 | SKIP_INSTALL = YES; 352 | }; 353 | name = Release; 354 | }; 355 | A3959BA918C6F39300DA8037 /* Debug */ = { 356 | isa = XCBuildConfiguration; 357 | buildSettings = { 358 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 359 | FRAMEWORK_SEARCH_PATHS = ( 360 | "$(SDKROOT)/Developer/Library/Frameworks", 361 | "$(inherited)", 362 | "$(DEVELOPER_FRAMEWORKS_DIR)", 363 | ); 364 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 365 | GCC_PREFIX_HEADER = "NSString+Cookie/NSString+Cookie-Prefix.pch"; 366 | GCC_PREPROCESSOR_DEFINITIONS = ( 367 | "DEBUG=1", 368 | "$(inherited)", 369 | ); 370 | INFOPLIST_FILE = "NSString+CookieTests/NSString+CookieTests-Info.plist"; 371 | OTHER_LDFLAGS = ( 372 | "$(inherited)", 373 | "-framework", 374 | XCTest, 375 | "-ObjC", 376 | ); 377 | PRODUCT_NAME = "$(TARGET_NAME)"; 378 | WRAPPER_EXTENSION = xctest; 379 | }; 380 | name = Debug; 381 | }; 382 | A3959BAA18C6F39300DA8037 /* Release */ = { 383 | isa = XCBuildConfiguration; 384 | buildSettings = { 385 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 386 | FRAMEWORK_SEARCH_PATHS = ( 387 | "$(SDKROOT)/Developer/Library/Frameworks", 388 | "$(inherited)", 389 | "$(DEVELOPER_FRAMEWORKS_DIR)", 390 | ); 391 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 392 | GCC_PREFIX_HEADER = "NSString+Cookie/NSString+Cookie-Prefix.pch"; 393 | INFOPLIST_FILE = "NSString+CookieTests/NSString+CookieTests-Info.plist"; 394 | OTHER_LDFLAGS = ( 395 | "$(inherited)", 396 | "-framework", 397 | XCTest, 398 | "-ObjC", 399 | ); 400 | PRODUCT_NAME = "$(TARGET_NAME)"; 401 | WRAPPER_EXTENSION = xctest; 402 | }; 403 | name = Release; 404 | }; 405 | /* End XCBuildConfiguration section */ 406 | 407 | /* Begin XCConfigurationList section */ 408 | A3959B7D18C6F39200DA8037 /* Build configuration list for PBXProject "NSString+Cookie" */ = { 409 | isa = XCConfigurationList; 410 | buildConfigurations = ( 411 | A3959BA318C6F39300DA8037 /* Debug */, 412 | A3959BA418C6F39300DA8037 /* Release */, 413 | ); 414 | defaultConfigurationIsVisible = 0; 415 | defaultConfigurationName = Release; 416 | }; 417 | A3959BA518C6F39300DA8037 /* Build configuration list for PBXNativeTarget "NSString+Cookie" */ = { 418 | isa = XCConfigurationList; 419 | buildConfigurations = ( 420 | A3959BA618C6F39300DA8037 /* Debug */, 421 | A3959BA718C6F39300DA8037 /* Release */, 422 | ); 423 | defaultConfigurationIsVisible = 0; 424 | defaultConfigurationName = Release; 425 | }; 426 | A3959BA818C6F39300DA8037 /* Build configuration list for PBXNativeTarget "NSString+CookieTests" */ = { 427 | isa = XCConfigurationList; 428 | buildConfigurations = ( 429 | A3959BA918C6F39300DA8037 /* Debug */, 430 | A3959BAA18C6F39300DA8037 /* Release */, 431 | ); 432 | defaultConfigurationIsVisible = 0; 433 | defaultConfigurationName = Release; 434 | }; 435 | /* End XCConfigurationList section */ 436 | }; 437 | rootObject = A3959B7A18C6F39200DA8037 /* Project object */; 438 | } 439 | --------------------------------------------------------------------------------