2012-01-19 83 views
1

我正在使用配置文件来控制设置的深度嵌套Xcode项目。项目内的项目中有项目。是否有可能在配置文件中回显东西?在试图调试它的时候,我发现看看有些变量会是非常有用的。像BUNDLE_LOADER,HEADER_SEARCH_PATHS等。xcode 4 - 有没有办法在配置文件中回显内容?

我知道我可以通过阅读日志文件来获得一些这些东西。但这真是一种痛苦!

编辑:澄清,这些是由配置文件控制的编译时间变量。

回答

0

你可以创建一个项目的警报视图,并加载它..

- (void)viewDidLoad { 
    // get your vairables from the defaults 
    NSString *variable1 = [[NSUserDefaults standardUserDefaults] stringForKey:@"variable1"]; 
    NSString *variable2 = [[NSUserDefaults standardUserDefaults] stringForKey:@"variable2"]; 

    // build your alert mesage 
    NSString *alertMessage = [NSString stringWithFormat:@"the variables you are looking for are %@ and %@",variable1,variable2]; 

    // create the alert view for display 
    UIAlertView *alertmsg = [[UIAlertView alloc] initWithTitle:@"Variables:" message:alertMessage delegate:self cancelButtonTitle:@"ok" otherButtonTitles: nil]; 

    // display the alert 
    [alertmsg show]; 


    [super viewDidLoad]; 
} 
+0

我的初步意见是默认的变量,但你将不得不改变对变量的源代码,也已经正在努力将其显示在日志中。 – Silvertiger 2012-01-19 00:35:09

+0

感谢您的回应,但我希望在构建时回显,显示由配置文件确定的构建设置。 – 2012-01-19 06:06:00

相关问题