ASIHTTPRequest リクエストの Cookie を設定しようとすると、objc_exception_throw が発生しました。この2つを試してみましたが、うまくいきませんでした。
ASIHTTPRequest *request = [[ASIHTTPRequest alloc] initWithURL:url];
NSMutableDictionary *properties = [[NSMutableDictionary alloc] init];
[properties setValue:@".google.com" forKey:@"Domain"];
[properties setValue:@"/" forKey:@"path"];
[properties setValue:@"1600000000" forKey:@"expires"];
NSHTTPCookie *cookie = [[NSHTTPCookie alloc] initWithProperties:properties];
[request setRequestCookies:[NSMutableArray arrayWithObject:cookie]];
または、Cookieの開始コードをこれに置き換えます
NSHTTPCookie *cookie = [[NSHTTPCookie alloc] init];
次の行をコメントアウトすると、すべて正常に機能しました。
[request setRequestCookies:[NSMutableArray arrayWithObject:cookie]];
ここで何が問題なのか教えてください!