打开启动画面后,iPhone .ipa文件变空白?
问题描述:
我创建了Map应用程序,它在我的Mac机上用xcode运行。但是当我创建它的ipa文件并与我的iPhone设备同步时,它不会打开。只有启动画面 变得开放和接近。我有设备UDID的开发人员和分发证书签名。我的客户也无法远程运行应用程序....提前感谢您的帮助。 PLZ建议我在这里失踪?打开启动画面后,iPhone .ipa文件变空白?
- (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;
}
Upadated:与泄漏问题
我也检查内存泄漏的可能性,并使用仪器工具,我得到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
}}}}
我在行尾注释了泄漏。你能纠正我的代码吗?在此先感谢...
答
初始化视图控制器首先
- (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;
}
我得到了同样的问题。检查它与您的部署目标,并与最新的ios运行在您的设备 – Hiren 2012-01-13 10:42:57
一个月前,我的客户和我能够测试我的应用程序的测试版。现在发生了什么?任何由苹果改变的政策?我有xcode 3.2和iPhone sdk 4.2.3。使用iPhone 4设备(4.3.2)进行测试 – 2012-01-13 10:57:46
需要显示启动画面查看和解除的代码,并添加主控制器 – Hiren 2012-01-13 11:01:06