2

我正在制作一个需要与服务器 (S3) 通信的 iPhone 应用程序。但是,当我执行此代码时:

- (void)submit
{
    dispatch_queue_t Q = dispatch_queue_create("Formula Submit", NULL);
    dispatch_async(Q, ^{
        NSMutableArray *formulas = [[NSArray arrayWithContentsOfURL:[NSURL URLWithString:@"https://urlremoved.com"]] mutableCopy];

        if (!formulas)
        {
            formulas = [[NSMutableArray alloc] init];
        }

       [_data addEntriesFromDictionary:[[NSDictionary alloc] initWithObjectsAndKeys:self.explanationTextView.text, @"explanation", nil]];

        [formulas addObject:_data];

        AmazonS3Client *s3 = [[AmazonS3Client alloc] initWithAccessKey:@"Access Key Removed" withSecretKey:@"Secret Key Removed"];

        S3PutObjectRequest *por = [[S3PutObjectRequest alloc] initWithKey:@"File Name Removed" inBucket:@"Bucket Name Removed"];
        por.contentType = @"application/octet-stream";

        NSData *plistData = [NSPropertyListSerialization dataFromPropertyList:formulas format:NSPropertyListBinaryFormat_v1_0 errorDescription:nil];

        por.data = plistData;
        [s3 putObject:por];
    });

    [self dismissModalViewControllerAnimated:YES];
}

我在控制台中收到此错误/警告:

void _WebThreadLockFromAnyThread(bool), 0x20150be0: Obtaining the web lock from a thread other than the main thread or the web thread. UIKit should not be called from a secondary thread.

此消息似乎不会以任何方式影响应用程序性能。它成功上传到 S3,没有明显问题。

本质上,我想知道是否有办法使此消息消失

4

0 回答 0