简体   繁体   English

应用程序不会在 iOS6 上开始使用 testflight

[英]App wont start using testflight on iOS6

I have an application that I want to test it on iOS device.我有一个应用程序,我想在 iOS 设备上对其进行测试。 The application uses NIB files and no story board.该应用程序使用NIB 文件,没有故事板。

Target framework is set to - 5.1 Device - Universal.目标框架设置为 - 5.1 设备 - 通用。

I have created the IPA file and uploaded to TestFlightApp.我已经创建了 IPA 文件并上传到 TestFlightApp。

I have downloaded and installed the application on my iPad.我已经在 iPad 上下载并安装了该应用程序。 Weird thing is when I tap on the icon a black screen shows and nothing else happens.奇怪的是,当我点击图标时,会显示黑屏而没有其他任何反应。

I have done the following settings.我做了以下设置。

Main Interface - SSDMainViewController Main Storyboard - Not set as I don't have any storyboard in the applicaion.主界面 - SSDMainViewController主故事板 - 未设置,因为我在应用程序中没有任何故事板。

It is not the problem of IOS versions as other apps are working fine.这不是 IOS 版本的问题,因为其他应用程序运行良好。

EDIT : When I double click the iPad button I saw that the application is not crashing.编辑:当我双击 iPad 按钮时,我看到应用程序没有崩溃。 It is running in the background.它在后台运行。

EDIT 2 : More information on the question.编辑 2:有关该问题的更多信息。

Well I have taken a view based application and it has all NIBs no storyboard.好吧,我采用了基于视图的应用程序,它具有所有 NIB 没有故事板。 It was initially an iPhone application targeting the IOS 5.1 but then I have changed the value from the project drop down to UNIVERSAL .它最初是一个针对 IOS 5.1 的 iPhone 应用程序,但后来我将项目下拉菜单中的值更改为UNIVERSAL But that I think is no problem because when I installed it in my iPad it showed me nothing.但我认为这没有问题,因为当我将它安装到 iPad 中时,它什么也没显示。 Also it showed black screen with the iPhone frame and then nothing.它还显示带有 iPhone 框架的黑屏,然后什么也没有。 The application is still live in the thread.该应用程序仍在线程中。

What bothers me is that I have done this in the AppDelegate :困扰我的是我在AppDelegate这样做了:

I have set the我已经设置了

self.mainViewController = [[SSDMainViewController alloc] initwithnibname:@"SSDMainViewController" bundle:nil];

And then I have set the navigation controller and then pushed the view to it.然后我设置了导航控制器,然后将视图推送到它。

I FOUND SOME MORE INFORMATION我找到了更多信息

In the console it says.在控制台它说。

The application is expected to have its root view set at the end of application start.应用程序应在应用程序启动结束时设置其根视图。

MY APP DELEGATE我的应用程序委托

ftipValue=0.25; ftipValue=0.25;

cardtype = @"American Express";
[cardtype retain];

[self CallFunctionForLogout];

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

// Create an instance of YourViewController

//SSDMainViewController *yourViewController = [[SSDMainViewController alloc] init];
self.mainViewController = [[[SSDMainViewController alloc] initWithNibName:@"SSDMainViewController" bundle:nil] autorelease];



// Create an instance of a UINavigationController

// its stack contains only yourViewController

UINavigationController *navController = [[UINavigationController alloc]

                                                  initWithRootViewController:self.mainViewController];

navController.navigationBarHidden = YES;

// Place navigation controller's view in the window hierarchy

[[self window] setRootViewController:navController];

[self.window makeKeyAndVisible];

return YES;

Please use two xib file, universal app we want two xib (nib)请使用两个xib文件,我们需要两个xib(nib)的通用应用程序

  • one for iPhone - ViewController_iPhone一款适用于 iPhone - ViewController_iPhone
  • second for for iPad - ViewController_iPad第二个适用于 iPad - ViewController_iPad

Add following code to your AppDelegate.m file.将以下代码添加到您的 AppDelegate.m 文件中。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
        // Override point for customization after application launch.
       if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)
       {
           self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController_iPhone" bundle:nil] autorelease];
        } 
       else {
           self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController_iPad" bundle:nil] autorelease];
        }
        self.window.rootViewController = self.viewController;
        [self.window makeKeyAndVisible];
        return YES;
    }

I have done this and it's work fine for me.我已经这样做了,它对我来说很好。

That error means that you're not setting up your application correctly.该错误意味着您没有正确设置应用程序。

You say you've set SSDMainController as the main interface file - is this both for iPhone and iPad?您说您已将 SSDMainController 设置为主界面文件 - 这是否适用于 iPhone 和 iPad? There are two sets of entries in that section of the summary tab for universal apps.通用应用程序摘要选项卡的该部分中有两组条目。

I would expect a different xib file to be specified for the iPad, since a different sized view and different layout would be in use.我希望为 iPad 指定不同的 xib 文件,因为将使用不同大小的视图和不同的布局。

You have either not set the iPad xib, so the app can't set up a window with root view controller, or you haven't set up a valid iPad xib, so it isn't loading at all, with the same results.您要么没有设置 iPad xib,因此应用程序无法设置带有根视图控制器的窗口,要么您没有设置有效的 iPad xib,因此它根本没有加载,结果相同。

If you just want the app to run in the mini-iPhone window with the 2x button, leave it as an iPhone only app.如果您只是希望应用程序在带有 2x 按钮的迷你 iPhone 窗口中运行,请将其保留为仅限 iPhone 的应用程序。

If you are getting "The application is expected to have its root view set at the end of application start."如果您收到“应用程序应在应用程序启动结束时设置其根视图”。 there are a number of possibilities.有多种可能性。 Clearly, that is the problem, since you have a black screen with nothing in it...显然,这就是问题所在,因为您的黑屏没有任何内容......

Check out this SO question: Application windows are expected to have a root view controller at the end of application launch warning Rob Mayoff has a good description of what should be happening when your application initializes.看看这个 SO 问题: 应用程序窗口应该在应用程序启动警告结束时有一个根视图控制器Rob Mayoff 对应用程序初始化时应该发生的事情有一个很好的描述。

Also, linked to in the above post, is this post wherein there are an additional 35 answers with various scenarios of what could be happening.此外,在上面的帖子中链接到的是这个帖子,其中还有另外 35 个答案,其中包含可能发生的各种情况。

Beyond browsing through those links, you will need to post up additional code and/or descriptions of how your nibs are wired up for anyone to help you--as evidenced by the myriad ways it is possible to cripple the initialization sequence.除了浏览这些链接之外,您还需要发布额外的代码和/或关于笔尖连接方式的描述,以供任何人帮助您——正如有可能削弱初始化序列的无数方法所证明的那样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM