1

構成ファイルを使用して設定を制御する、深くネストされた Xcode プロジェクトに取り組んでいます。プロジェクト内のプロジェクト内にプロジェクトがあります。構成ファイル内のものをエコーすることは可能ですか? それをデバッグしようとすると、いくつかの変数が何であるかを確認することが非常に役立つことがわかりました。BUNDLE_LOADER、HEADER_SEARCH_PATHS など。

ログファイルを読むことで、これらのいくつかを取得できることを認識しています。しかし、それは本当の痛みです!

編集: 明確にするために、これらは構成ファイルによって制御されるビルド時の変数です。

4

1 に答える 1

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];
}
于 2012-01-19T00:20:53.483 に答える