我正在嘗試使用TestFlight更新我的iPad應用程序,我遇到的問題是當我更新應用程序時,存儲的圖像被刪除。更新應用程序後,我的圖片已被刪除
我使用此代碼下載和後來存儲圖像:
NSData *responseData = [request responseData];
UIImage *imageURL = [[UIImage alloc] initWithData:responseData];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSData *data1 = [NSData dataWithData:UIImagePNGRepresentation(imageURL)];
[data1 writeToFile:documentsDirectory atomically:YES];
[imageURL release];