0

sorry for my english.

My app lets you record and share recordings with iTunes. I proceeded to move the database to another folder with this method in the AppDelegate.m

    - (NSURL *)applicationDocumentsDirectory
{
    NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) lastObject];
    NSString *path = [libraryPath stringByAppendingPathComponent:@"Private Documents"];
    NSURL *pathURL = [NSURL fileURLWithPath:path];
    BOOL isDirectory = NO;
    if ([[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:&isDirectory]) {
        if (isDirectory) {
            return pathURL;
        } else {
            [NSException raise:@"'Private Documents' exists, and is a file" format:@"Path: %@", path];
        }
    }
    NSError *error = nil;
    if (![[NSFileManager defaultManager] createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:&error]) {
        [NSException raise:@"Failed creating directory" format:@"[%@], %@", path, error];
    }
    return pathURL;
}

My app has the UIFileSharingEnabled key set to true in the Info.plist. Everything seems to work perfectly but this is the response I received:

We found that your app did not achieve the core functionality described in your marketing materials or release notes, as required by the App Store Review Guidelines.

Your app has the UIFileSharingEnabled key set to true in the Info.plist, but this feature is not functional.

When file sharing is enabled, the entire Documents folder is used for file sharing. Files that are not intended for user access via the file sharing feature should be stored in another part of your application's bundle. If your application does not require the file sharing feature, the UIFileSharingEnabled key in the Info.plist should not be set to true.

For discrete code-level questions, you may wish to consult with Apple Developer Technical Support. Please be sure to:

  • include the complete details of your rejection issues
  • prepare any symbolicated crash logs, screenshots, and steps to reproduce the issues for when the DTS engineer follows up.

For information on how to symbolicate and read a crash log, please see Tech Note TN2151 Understanding and Analyzing iPhone OS Application Crash Reports.

If you have difficulty reproducing this issue, please try testing the workflow as described in https://developer.apple.com/library/ios/qa/qa1764/Technical Q&A QA1764: How to reproduce a crash or bug that only App Review or users are seeing.

How to fix this issue? Thanks for all.

3 Answers3

0

The problem is that you mark the UIFileSharingEnable to True, but you didn't use it correctly.

They wrote you that you probably trying share files that the user not allowed to get access, that's probably your main problem.

anyway if you're just trying share records to iTunes, you can use this code and try modify it for your requests:

you should put it in your AppDelegte file.

NSString *fileName = @"your_file_name";
        NSFileManager *fileManager = [NSFileManager defaultManager];
        NSError *error;
        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
        NSString *documentsDirectory = [paths objectAtIndex:0];
        NSString *documentDBFolderPath = [documentsDirectory stringByAppendingPathComponent:fileName];


    if (![fileManager fileExistsAtPath:documentDBFolderPath])
    {
        NSString *resourceDBFolderPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:fileName];
        [fileManager copyItemAtPath:resourceDBFolderPath toPath:documentDBFolderPath error:&error];
    }

Hop i helped you Thanks.

Dekel Maman
  • 2,077
  • 1
  • 15
  • 16
  • Thanks for reply...I'm confused, i used this code for save the recording in app's folder documents and it works. In iTunes I see the recordings and I can save and rename them. I moved my database in / Library / Private Documents / and the user can't access it. Where is the problem? – user2956733 Nov 05 '13 at 16:22
  • The bad thing is that even if you done it and its work, you must do it in "Apple" way. I know it's suck but its the only way specially when you trying to do something like sharing stuff to iTunes via your app, because all the rights they have in iTunes and appStore. maybe you can try to read in the apple's documents about the way they want you to do it. – Dekel Maman Nov 05 '13 at 18:06
  • Do you make sure that you aren't store the file in anymore locations? any temps folders or something like that... are you sure you're uploading only files that created by your app??? – Dekel Maman Nov 05 '13 at 18:14
  • I sent a message to App Review Team: "File sharing is enabled deliberately, the user is given control of which documents to share" and I posted my method. Now my app status is "Processing for App Store". I hope I have solved everything. Thanks for all :) – user2956733 Nov 05 '13 at 19:08
  • If your app is in that status it looks like everything is ok now. good luck :) – Dekel Maman Nov 06 '13 at 12:02
0

I faced same problem, when i uploaded my app on app Store, the solution is to implement fileSharing through iTunes according to this tutorial link-

http://www.raywenderlich.com/1948/how-integrate-itunes-file-sharing-with-your-ios-app

Hope it helps you.

Happy coding,:)

Nico
  • 1,788
  • 2
  • 23
  • 41
0

In my case, my app was rejected because having no function introducing in app descriptions. Just edit that and resubmit.

Hope this could help.

Nghia Luong
  • 790
  • 1
  • 6
  • 11