【问题标题】:iPhone .ipa file goes blank after opening splash screen?iPhone .ipa 文件在打开初始屏幕后变为空白?
【发布时间】:2012-01-13 10:32:49
【问题描述】:

我已经创建了 Map 应用程序,它正在我的 mac 机器上使用 xcode 运行。但是当我创建它的 ipa 文件并与我的 iPhone 设备同步时,它没有打开。只有闪屏 变得开放和接近。我用设备 UDID 签署了我的开发人员和分发证书。我的客户也无法远程运行该应用程序....提前感谢您的帮助。请建议我在这里缺少什么??

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

  //sleep(0.5);



arrayNo = [[NSMutableArray alloc] init];             //pickerview radius array

[arrayNo addObject:@"5km"];
[arrayNo addObject:@"10km"];
[arrayNo addObject:@"15km"];

   [window addSubview:[viewController view]];
[window makeKeyAndVisible];

return YES;

}

已更新:存在泄漏问题

我还在检查内存泄漏的可能性,并使用仪器工具在启动应用程序时我得到 100% 的泄漏。它的 NSPlaceholderString 在以下代码中泄漏...

CLLocationCoordinate2D location;


    NSString *url = [NSString stringWithFormat:@"..myurl......lat=%f&lng=%f&radius=5",locationManager.location.coordinate.latitude,locationManager.location.coordinate.longitude];

    radiusinurl.text = @"5km";
    NSURL *URL = [NSURL URLWithString:url];
    NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:URL];
    //Initialize the delegate.
    **XMLParser *parser = [[XMLParser alloc] initXMLParser];**   //5.3% leaks
    //Set delegate
    [xmlParser setDelegate:parser];
    //Start parsing the XML file.
    **BOOL success = [xmlParser parse];**           //0.2% leaks

        [xmlParser release];
        [parser release];
  if(success)

    {                     
 NSLog(@"show me [appDelegate.markers count] %d",[appDelegate.markers count]);


        annobjs = [[NSMutableArray array] retain];
        if([appDelegate.markers count] == 0)
        { //99% leaks on below line where I am calling another method
**[self performSelector:@selector(showingThreeResultsOnCurrentLocation)   withObject:nil];**         //99% leaks
        }
        else
        {//some logic

        }

    }
    else
    {

         //logic
    }}}}

我在行尾评论了泄漏。你能更正我的代码吗?提前谢谢...

【问题讨论】:

  • 我遇到了同样的问题。用你的部署目标检查它,并在你的设备上运行最新的 ios
  • 一个月前,我和我的客户能够测试我的应用程序的测试版。现在发生了什么?苹果有什么政策变化??我有 xcode 3.2 和 iPhone sdk 4.2.3。使用 iPhone 4 设备 (4.3.2) 进行测试
  • 添加主控制器后需要显示闪屏视图和关闭代码
  • 我刚刚将 Default.png 图像用于启动画面,直到 ViewDidLoad 处理代码。我没有给出任何启动代码。
  • ok 没有问题,但是发布了 didFinishLaunching 方法代码

标签: iphone ad-hoc-distribution


【解决方案1】:

先初始化视图控制器

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
 {
     NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];  //This is for autoresize when in phone call mode(which does not work yet)
     [dict setObject:@"trigger" forKey:@"frame"];

     [[NSNotificationCenter defaultCenter] postNotificationName:@"trigger"
                                                object:self
                                              userInfo:dict];

     arrayNo = [[NSMutableArray alloc] init];             //pickerview radius array

     [arrayNo addObject:@"5km"];
     [arrayNo addObject:@"10km"];
     [arrayNo addObject:@"15km"];

    viewController = [[UIViewController alloc] initWithNibName:@"UIViewController" bundle:nil];
    UINavigationController *nav = [[UINavigaitonController alloc] initWithRootViewController:nav];

  self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
  self.window.rootViewController = nav;
  [self.window makeKeyAndVisible];
  return YES;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-06-10
    • 1970-01-01
    • 2021-06-12
    • 1970-01-01
    • 2018-01-28
    相关资源
    最近更新 更多