我阅读了一些关于如何在 iPhone 上以编程方式拨打电话的参考资料,因此我将其放入我的代码中:
UIApplication *app = [UIApplication sharedApplication];
NSString *urlString = [NSString stringWithFormat:@"tel:0225225657"];
NSURL *url = [NSURL URLWithString:urlString];
[app openURL:url];
那是对的吗?如果是,我怎么知道我的应用程序在模拟器中运行时拨打了那个号码?