由於「不備份」原因導致應用程序被拒絕原因由於「不備份」原因,蘋果開發者拒絕了iPhone應用程序。現在我該怎麼做?
我嘗試了一件事來消除此問題。我從Apple技術支持獲得了一小段代碼,並根據iOS guideLines在我的項目中使用此代碼。首先,我在我的appdelegate.m
部分添加了一個頭文件
#import<sys/xattr.h>
然後粘貼下面的函數。
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL
{
const char* filePath = [[URL path] fileSystemRepresentation];
const char* attrName = "com.apple.MobileBackup";
u_int8_t attrValue = 1;
int result = setxattr(filePath, attrName, &attrValue, sizeof(attrValue), 0, 0);
return result == 0;
}
並在完成啓動時將上述函數調用到我的appdelegate。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
[self addSkipBackupAttributeToItemAtURL:[NSURL URLWithString:@"<Application_Home>/Library/Caches"]];
[self addSkipBackupAttributeToItemAtURL:[NSURL URLWithString:@"<Application_Home>/tmp"]];
[self addSkipBackupAttributeToItemAtURL:[NSURL URLWithString:@"<Application_Home>/Library/Private Documents"]];
}
現在我只想知道這是否行。我可以重新上傳我的申請iTunes Connect嗎?
爲什麼選了票?當我在IOS新手時,我問了這個問題。現在我已經給出了關於這個問題的答案...但是仍然得票低於...... :( – TheTiger 2012-11-03 16:06:57