iphone - 应用程序因在第三代 iPad 上崩溃而被拒绝

标签 iphone objective-c ios ipad crash

我的应用程序被 Apple 拒绝,因为它在 iPad 3rd Gen 上崩溃。 拒绝原因:

We found that your app crashed on iPad 3rd Gen. running iOS 5.1.1, which is not in compliance with the App Store Review Guidelines.

Your app crashed on both Wi-Fi and cellular networks on launch.

我在 iPhone 4 模拟器和设备上测试了我的应用程序并且它工作正常,我还在 iPad 模拟器和 iPad 视网膜模拟器上测试了我的应用程序并且它工作正常。 但我没有真正的 iPad 3rd Gen 设备。 这是应用程序的代码:didFinishLaunchingWithOptions:

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

//Piracy Check
iShmoopi *PiracyCheck = [[[iShmoopi alloc] init] autorelease];
if ([PiracyCheck isPirated] == KAPPLICATIONNOTPIRATED || [PiracyCheck isPirated] == KNOTPIRATED) {
    //Do Nothing, Not Pirated
} else {
    //Do Something, Pirated
    
    //Hostile Exit 
    iShmoopi *HostileExit = [[[iShmoopi alloc] init] autorelease];
    [HostileExit Hostile];
}


NSString *gameDataPath = pathInDocumentDirectory(@"gameDataPath.data");
if (gameDataPath != nil) {
    
    NSDictionary *gameDataDictionary = [NSKeyedUnarchiver unarchiveObjectWithFile:gameDataPath];
    
    if  (gameDataDictionary != nil) {
    
        smartEasyBestTime = [[gameDataDictionary objectForKey:@"smartEasyBestTimeKey"] intValue];
        smartEasyBestPoint = [[gameDataDictionary objectForKey:@"smartEasyBestPointKey"] intValue];
        smartNormalIsPlayable = [[gameDataDictionary objectForKey:@"smartNormalIsPalyableKey"] boolValue];
        smartNormalBestTime = [[gameDataDictionary objectForKey:@"smartNormalBestTimeKey"] intValue];
        smartNormalBestPoint = [[gameDataDictionary objectForKey:@"smartNormalBestpointKey"] intValue];
        smartHardIsPlayable = [[gameDataDictionary objectForKey:@"smartHardIsPalyableKey"] boolValue];
        smartHardBestTime = [[gameDataDictionary objectForKey:@"smartHardBestTimeKey"] intValue];
        smartHardBestPoint = [[gameDataDictionary objectForKey:@"smartHardBestPointKey"] intValue];
        
        focusEasyBestTime = [[gameDataDictionary objectForKey:@"focusEasyBestTimeKey"] intValue];
        focusEasyBestPoint = [[gameDataDictionary objectForKey:@"focusEasyBestPointKey"] intValue];
        focusNormalIsPlayable = [[gameDataDictionary objectForKey:@"focusNormalIsPalyableKey"] boolValue];
        focusNormalBestTime = [[gameDataDictionary objectForKey:@"focusNormalBestTimeKey"] intValue];
        focusNormalBestPoint = [[gameDataDictionary objectForKey:@"focusNormalBestpointKey"] intValue];
        focusHardIsPlayable = [[gameDataDictionary objectForKey:@"focusHardIsPalyableKey"] boolValue];
        focusHardBestTime = [[gameDataDictionary objectForKey:@"focusHardBestTimeKey"] intValue];
        focusHardBestPoint = [[gameDataDictionary objectForKey:@"focusHardBestPointKey"] intValue];
        
        logicEasyBestTime = [[gameDataDictionary objectForKey:@"logicEasyBestTimeKey"] intValue];
        logicEasyBestPoint = [[gameDataDictionary objectForKey:@"logicEasyBestPointKey"] intValue];
        logicNormalIsPlayable = [[gameDataDictionary objectForKey:@"logicNormalIsPalyableKey"] boolValue];
        logicNormalBestTime = [[gameDataDictionary objectForKey:@"logicNormalBestTimeKey"] intValue];
        logicNormalBestPoint = [[gameDataDictionary objectForKey:@"logicNormalBestpointKey"] intValue];
        logicHardIsPlayable = [[gameDataDictionary objectForKey:@"logicHardIsPalyableKey"] boolValue];
        logicHardBestTime = [[gameDataDictionary objectForKey:@"logicHardBestTimeKey"] intValue];
        logicHardBestPoint = [[gameDataDictionary objectForKey:@"logicHardBestPointKey"] intValue];
        
        speedEasyBestTime = [[gameDataDictionary objectForKey:@"speedEasyBestTimeKey"] intValue];
        speedEasyBestPoint = [[gameDataDictionary objectForKey:@"speedEasyBestPointKey"] intValue];
        speedNormalIsPlayable = [[gameDataDictionary objectForKey:@"speedNormalIsPalyableKey"] boolValue];
        speedNormalBestTime = [[gameDataDictionary objectForKey:@"speedNormalBestTimeKey"] intValue];
        speedNormalBestPoint = [[gameDataDictionary objectForKey:@"speedNormalBestpointKey"] intValue];
        speedHardIsPlayable = [[gameDataDictionary objectForKey:@"speedHardIsPalyableKey"] boolValue];
        speedHardBestTime = [[gameDataDictionary objectForKey:@"speedHardBestTimeKey"] intValue];
        speedHardBestPoint = [[gameDataDictionary objectForKey:@"speedHardBestPointKey"] intValue];
    }
}

self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];


return YES;

}

这是第一个加载的 View Controller 的代码

- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.

//Piracy Check
iShmoopi *PiracyCheck = [[[iShmoopi alloc] init] autorelease];
if ([PiracyCheck isPirated] == KAPPLICATIONNOTPIRATED || [PiracyCheck isPirated] == KNOTPIRATED) {
    //Do Nothing, Not Pirated
    NSLog(@"not pirated");
} 
else 
{
    //Do Something, Pirated
    
    //Hostile Exit 
    iShmoopi *HostileExit = [[[iShmoopi alloc] init] autorelease];
    [HostileExit Hostile];
}

[titleImageView setImage:[UIImage imageNamed:@"gameTitleImage.png"]];

NSTimer *t;
t = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(tEnd) userInfo:nil repeats:YES];

}

顺便说一句,我使用 Shmoopi Anti-Piracy Library上面代码中显示的内容。

有什么建议吗?

最佳答案

找到一种在真实设备中进行测试的方法。借、租或买一个。

关于iphone - 应用程序因在第三代 iPad 上崩溃而被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11214787/

相关文章:

iPhone "Bookmark to Homescreen"删除 cookie 和 session ?

iphone - 支持旧版本iOS和过时方法的功能的最佳方法

ios - 'success' 中的成员 'Result<AnyObject, NSError>' 产生类型为 'Result<Value, Error>' 的结果,但上下文需要 'Result<AnyObject, NSError>'

ios - 如何使用 bundle 中的数据移动 sqlite3 数据库

ios - 错误消息 : The Bundle ID you entered has already been used

ios - 用户切换选项卡栏项目后导航项目未更新

iphone - 如何在启动时使用黑色半透明状态栏 - info.plist 键/值似乎不起作用

ios - View 宽度无法通过自动布局正确更改

objective-c - NSTableView 中的动画行

ios - 在 Xamarin 中绑定(bind) Block 的方法