HappyCoding:] ChildhoodAndy


Posts match “ v1.1.0 ” tag:


| Comments

2014年11月08号,心城v1.1.0通过了苹果的审核。如果阅读过前面心城1.1.0今天提交审核了的朋友们会发现,时间俨然过了2周多。期间发生了什么事情?正常的Waiting For Review进入InReview大概1周差不多,这次怎么两周多了?




2.23: Apps must follow the iOS Data Storage Guidelines or they will be rejected 
3.3: Apps with names, descriptions, screenshots, or previews not relevant to the content and functionality of the App will be rejected 
----- 2.23 -----

We found that your app does not follow the iOS Data Storage Guidelines, which is required per the App Store Review Guidelines.

In particular, we found that on launch and/or content download, your app stores 2.04MB. To check how much data your app is storing:

- Install and launch your app
- Go to Settings > iCloud > Storage & Backup > Manage Storage 
- If necessary, tap "Show all apps" 
- Check your app's storage

The iOS Data Storage Guidelines indicate that only content that the user creates using your app, e.g., documents, new files, edits, etc., should be backed up by iCloud. 

Temporary files used by your app should only be stored in the /tmp directory; please remember to delete the files stored in this location when the user exits the app.

Data that can be recreated but must persist for proper functioning of your app - or because customers expect it to be available for offline use - should be marked with the "do not back up" attribute. For NSURL objects, add the NSURLIsExcludedFromBackupKey attribute to prevent the corresponding file from being backed up. For CFURLRef objects, use the corresponding kCFURLIsExcludedFromBackupKey attribute. 

For more information, please see Technical Q&A 1719: How do I prevent files from being backed up to iCloud and iTunes?.

It is necessary to revise your app to meet the requirements of the iOS Data Storage Guidelines. 

----- 3.3 -----

In addition, your marketing screenshots do not sufficiently reflect the app in use, which does not give the user an accurate understanding of what the app does, as required by the App Store Review Guidelines.

Weve attached the relevant screenshot(s) for your reference. 

It would be appropriate to revise your screenshots to demonstrate the app functionality in use.

If your iTunes Connect Application State is Rejected, a new binary will be required. Make the desired metadata changes when you upload the new binary.

For discrete code-level questions, you may wish to consult with Apple Developer Technical Support. When the DTS engineer follows up with you, please be ready to provide:

- complete details of your rejection issue(s)
- screenshots
- steps to reproduce the issue(s)
- symbolicated crash logs - if your issue results in a crash log


2.先说3.3 元数据问题


3.再谈2.23 数据存储问题

心城将用户拍照以及头像设置的图片以及用户的录音文件都保存在了沙箱Documents文件夹,MagicalRecord用的数据库文件默认存放在了Library/Application Support目录下。


Documents下的文件是会被 iCloud 自动备份的,苹果的测试人员发现,他们拍了一些照片,录制一些音频,然后退出应用,同步iCloud发现数据有2.04M,很明显,照片和音频数据以及数据库文件(存放在Library下的ApplicationSupport下,同样会被iCloud自动同步)是造成这2.04M的罪魁祸首,所以被拒。

究其原因是我存储文件的位置不对或者说是规则不对造成的。为了避免被 iCloud 同步,需要对这些文件进行“不备份标记”。将文件夹标记为不备份,那么其子文件和子文件夹都不会被备份。这里还不敢对 Documents 标记不备份,那样“太过分了”,毕竟还有其他数据和文稿需要备份。对Documents下的不需要的文件夹进行标记即可。

和一个朋友交流中,他提到了他以前犯过的一个错误,他的应用在访问网络时,把一些图片存放在了 Documents 文件夹里面了,也是导致被拒,这些图片应该视情况放在tmp或者cache里面。


 #define DOC_PATH ([NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0])

 #define CACHE_PATH ([NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0])

 #define LIB_PATH ([NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0])

 #define TEMP_PATH (NSTemporaryDirectory())
 // app data directory name

 #define APP_DATA_PHOTOS_DIR_NAME     @"photos"
 #define APP_DATA_AUDIOS_DIR_NAME     @"audios"
 #define APP_DATA_AVATARS_DIR_NAME    @"avatars"

-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

  [self addSkipBackup];


  NSString* photoDirPath = [DOC_PATH stringByAppendingPathComponent:APP_DATA_PHOTOS_DIR_NAME];
  NSString* audioDirPath = [DOC_PATH stringByAppendingPathComponent:APP_DATA_AUDIOS_DIR_NAME];
  NSString* avatarDirPath = [DOC_PATH stringByAppendingPathComponent:APP_DATA_AVATARS_DIR_NAME];
  [self addSkipBackupAttributeToItemAtURL:[NSURL fileURLWithPath:photoDirPath]];
  [self addSkipBackupAttributeToItemAtURL:[NSURL fileURLWithPath:audioDirPath]];
  [self addSkipBackupAttributeToItemAtURL:[NSURL fileURLWithPath:avatarDirPath]];
  [self addSkipBackupAttributeToItemAtURL:[NSURL fileURLWithPath:[NSPersistentStore MR_applicationStorageDirectory]]];

-(BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL
    assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]);
    NSError *error = nil;
    BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES]
                                  forKey: NSURLIsExcludedFromBackupKey error: &error];
        NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error);
    return success;



在等待的期间,v1.2.0也在另外的分支开发着。今天1.1.0上架后,v1.2.0 也做了提交。