OC

Knowledge OS
登录 注册
全部话题 移民 创业 iOS Mac Objective-C Swift Android 招聘 求职

请教一个关于iOS模拟器的问题

examplelewis
examplelewis 发布于 2014年01月20日
无人欣赏。

今天调试程序,出现了如下错误 2014年01月20日 16:53:13.311 Quiz[3346:70b] Cannot find executable for CFBundle 0x8a776e0 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/CertUIFramework.axbundle> (not loaded)

stackoverflow上给的答案是:click iOS Simulator> Reset Content and Settings... and run again. 但我的模拟器只有一个"还原内容和设置",而且我还原了好几次,程序依然报同样的错

所以我想请问一下如何将iOS模拟器改为英文版本?或者说还有什么办法可以解决问题么?

共8条回复
楼长 ·
玉楼 回复于 2014年01月20日

是俺浏览器的原因还是那么长一行就是不能换行?有强迫症的俺看着好别扭。

2楼 ·
tinyfool 回复于 2014年01月20日

1楼 @玉楼 有些实际原因在哪里,我记得弄过,换了也很不好看

3楼 ·
tinyfool 回复于 2014年01月20日

这跟英文版本与否没关系,你系统切换成英文的模拟器自然就变成英文的了,然后模拟器里面的操作系统你也可以自己选择语言,跟iPhone是一样的。

你的Xcode重启过么?电脑重启过么?

4楼 ·
examplelewis 回复于 2014年01月20日

3楼 @tinyfool 我都重启过了,连Xcode都重装了一遍,还是报错 接到iPhone上调试同样没用

5楼 ·
tinyfool 回复于 2014年01月20日

4楼 @examplelewis 你换一个模拟器操作系统版本会怎么样?

6楼 ·
examplelewis 回复于 2014年01月20日

5楼 @tinyfool 我刚下了iOS 6.0 Simulator,还是报同样的错误。。。为什么google上很多回答说Reset一下就好了。。。

7楼 ·
examplelewis 回复于 2014年01月20日

好吧,代码特简单(新建了一个Single View Application工程,定义什么的都跳过了): - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {

self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
 questions = [[NSMutableArray alloc] init];
 answers = [[NSMutableArray alloc] init];
 [questions addObject:@"What is 7 + 7?"];
 [answers addObject:@"14"];
 [questions addObject:@"What is the capital of Vermont?"];
 [answers addObject:@"Montpelier"];
 [questions addObject:@"From what is cognac made?"];
 [answers addObject:@"Grapes"];
}
return self;

}

- (IBAction)showQuestion:(id)sender {
currentQuestionIndex++;
if (currentQuestionIndex == [questions count]) {
 currentQuestionIndex = 0;
}
NSString *question = [questions objectAtIndex:currentQuestionIndex];
NSLog(@"displaying question:%@", question);
[questionField setText:question];
[answerField setText:@"???"];

}

  • (IBAction)showAnswer:(id)sender { NSString *answer = [answers objectAtIndex:currentQuestionIndex];

    [answerField setText:answer]; }

现在不知道为什么不报错了,但是调用showQuestion方法后输出结果跟报错时一样 displaying question:(null)

正常情况下的输出应该是 displaying question:(加一个问题)

8楼 ·
examplelewis 回复于 2014年01月20日

7楼 @examplelewis 好吧,排版有点问题,不好意思了。。。

登录 或者 注册

AltStyle によって変換されたページ (->オリジナル) /