iCloudからデータをフェッチしているので、そのためにヘッダー(azureテーブルストレージ)を生成する必要があります。
そのために以下のコードを使用し、ヘッダーを生成しています。しかし、プロジェクトでこれらのヘッダーを使用すると、「承認ヘッダーの値が署名を含めて正しく形成されていることを確認してください」と表示されます。
私はたくさんググって、たくさんのコードを試しましたが、無駄でした。
誰かが親切に私がこのコードで間違っているところを手伝ってくれませんか?
-(id)generat
{
    NSString *messageToSign = [NSString stringWithFormat:@"%@/%@/%@", dateString,AZURE_ACCOUNT_NAME, tableName];
    NSString *key = @"asasasasasasasasasasasasasasasasasasasasas==";
    const char *cKey = [key cStringUsingEncoding:NSUTF8StringEncoding];
    const char *cData = [messageToSign cStringUsingEncoding:NSUTF8StringEncoding];
    unsigned char cHMAC[CC_SHA256_DIGEST_LENGTH];
    CCHmac(kCCHmacAlgSHA256, cKey, strlen(cKey), cData, strlen(cData), cHMAC);
    NSData *HMAC = [[NSData alloc] initWithBytes:cHMAC length:sizeof(cHMAC)];
    NSString *hash = [Base64 encode:HMAC];
    NSLog(@"Encoded hash: %@", hash);
    NSURL *url=[NSURL URLWithString: @"http://my url"];
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
    [request addValue:[NSString stringWithFormat:@"SharedKeyLite %@:%@",AZURE_ACCOUNT_NAME, hash] forHTTPHeaderField:@"Authorization"];
    [request addValue:dateString forHTTPHeaderField:@"x-ms-date"];
    [request addValue:@"application/atom+xml, application/xml"forHTTPHeaderField:@"Accept"];
    [request addValue:@"UTF-8" forHTTPHeaderField:@"Accept-Charset"];
    NSLog(@"Headers: %@", [request allHTTPHeaderFields]);
    NSLog(@"URL: %@", [[request URL] absoluteString]);
     return request; 
}
-(NSString*)rfc1123String:(NSDate *)date
{
    static NSDateFormatter *df = nil;
    if(df == nil)
    {
        df = [[NSDateFormatter alloc] init];
        df.locale = [[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease];
        df.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"GMT"];
        df.dateFormat = @"EEE',' dd MMM yyyy HH':'mm':'ss 'GMT'";
    }
    return [df stringFromDate:date];
}