Tag: ios simulator

为什么我得到这个铛错误:_fwrite $ UNIX2003模拟器与iOS 8

我已经将新的iOS 8下载到我的手机和最新的Xcode到我的Mac上。 这一切工作正常,但加载后,尝试新的iPhone 6加模拟器,当我尝试iPhone 4s或5模拟器(它与5s),我得到以下错误: Undefined symbols for architecture i386: "_fwrite$UNIX2003", referenced from: leveldb::(anonymous namespace)::PosixEnv::~PosixEnv() in Firebase(env_posix.o) leveldb::(anonymous namespace)::PosixEnv::~PosixEnv() in Firebase(env_posix.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) 对我来说,我似乎很奇怪,我一直在使用iPhone 4模拟器,但它只是在我尝试了iPhone 6加模拟器,它打破了,我不能得到它的使用

Xcode UItesting – 使用存储的凭证login/注销

我想在我的iOS应用程序(Xcode 7.2.1)中为login过程运行function(UI)testing。 该应用程序的行为是,成功login后,用户凭据将被存储,以便在下次启动时自动login(不显示login屏幕)。 因此,我在login屏幕上设置了一系列UI事件,以使应用程序第一次在iOS模拟器中启动时通过logintesting。 但是,下次我运行我的testing将失败,因为login屏幕甚至没有按预期显示。 我在这里看到两种select,他们中没有一个看起来很合适: 在每次testing运行之前,用脚本重置iOS模拟器的内容和设置。 我尝试在testing目标的Build Phases添加一个Run Script阶段: xcrun simctl shutdown booted && xcrun simctl erase all && killall "Simulator" ,它似乎不工作(模拟器应用程序不会启动和testing卡住) 。 在-(void)tearDown一些代码来清除存储的用户凭证。 这个选项不好,不仅因为它在每个testing方法(不是每次testing启动)之间运行,而且似乎我没有访问我用来清除用户凭证的AuthManager类。 当用户界面testinglogin程序时,你会做什么?

使用模拟器testing自定义位置

我只是花了最后一个小时的时间search – 认为必须有一个答案 – 并没有find太多,所以我在这里问。 我试图让示例应用程序区域通过模拟器触发进入和/或退出区域更新。 我很熟悉使用Debug> Location> Custom Location来设置特定的经度和纬度,但似乎并没有太多的工作,虽然它似乎在LocateMe示例应用程序中工作。 在这一点上,我不知道这个问题是iOS模拟器的限制,还是示例应用程序处理区域检测的方式(我对iOS还是比较新的)。 我遇到了FTLocationSimulator但我想知道这是否会有所帮助(特别是因为它似乎模仿了通过模拟器设置自定义位置的能力)。 关于iOS模拟器设置自定义位置的能力,苹果公司的文档似乎也不多。

错误:SDK“iphonesimulator9.0”无法find

我最近更新Xcode到7.1并下载了iOS 8.4和iOS 9.0模拟器。 当我跑步 xcodebuild -showsdks 我明白了 OS X SDKs:OS X 10.11 -sdk macosx10.11 iOS SDKs:iOS 9.1 -sdk iphoneos9.1 iOS模拟器SDK:模拟器 – iOS 9.1 -sdk iphonesimulator9.1 tvOS SDKs:tvOS 9.0 -sdk appletvos9.0 tvOS模拟器SDK:模拟器 – tvOS 9.0 -sdk appletvsimulator9.0 watchOS SDKs:watchOS 2.0 -sdk watchos2.0 watchOS模拟器SDK:模拟器 – watchOS 2.0 -sdk watchsimulator2.0 我想要 iOS Simulator SDKs: 指向 iOS 9.0 Simulator或8.4 […]

iOS 8 – 无法获取当前位置,错误域= kCLErrorDomain代码= 0

我有问题得到我的当前位置。 我仍然收到错误: Error Domain=kCLErrorDomain Code=0 "The operation couldn't be completed. (kCLErrorDomain error 0.)" 我已经做了我在这里find的所有东西: 重置iOS模拟器中的内容和设置(模拟器中的地图应用程序显示正确的位置)。 在Xcode的产品>计划>编辑我未标记的允许位置模拟(当我标记它,它模拟例如伦敦)。 我已经添加NSLocationWhenInUseUsageDescription Info.plist文件在我的项目(应用程序要求的位置的权限,我可以看到他们在设置在iOS模拟器)。 我打开了Wi-Fi连接(就像我说的位置服务在Safari,地图,甚至在iOS模拟器中的地图一样正常工作)。 -(void)viewDidLoad { [super viewDidLoad]; self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.delegate = self; if(IS_OS_8_OR_LATER){ NSUInteger code = [CLLocationManager authorizationStatus]; if (code == kCLAuthorizationStatusNotDetermined && ([self.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)])) { if([[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationWhenInUseUsageDescription"]) { [self.locationManager requestWhenInUseAuthorization]; } else { NSLog(@"Info.plist […]

xcode ios项目花费很长时间来编译和运行?

我的应用程序需要10分钟左右的时间才能在模拟器上编译和运行。 应用程序运行良好,但是在添加SUP静态库之后,需要很长的时间来构build。 xcode版本:4.6 我已经尝试重置模拟器并重新启动机器 请帮忙。

Xcode服务器,机器人,持续集成和模拟器上的unit testing

我有一个Xcode服务器设置了iOS项目的几个机器人(用Xcode 6.1编译),所有这些都包含unit testing目标 我似乎无法在模拟器中运行这些testing。 到目前为止所有的尝试都失败了相同的错误(模拟器启动超时): Test target NAME_OF_MY_TARGET encountered an error (Timed out waiting 120 seconds for simulator to boot, current state is 1. If you believe this error represents a bug, please attach the log file at […]) 当然,build议的日志文件path不是服务器上的有效path,因此无法检查日志

XCode 4.3.1 iPad模拟器

有谁知道为什么只有iPad模拟器的主页button丢失?

Xcode 9 iOS模拟器 – 无法获取有效的进程句柄

我已经升级到Xcode 9,而iOS模拟器10.3和11不工作。 所有股票和我的应用程序试图运行时强制closures。 如下所示的Xcode控制台错误显示当我尝试运行日历,首选项等。“无法获取有效的进程句柄”是什么意思? Process handle (com.apple.Preferences, <BSProcessHandle: 0x7fe84552b8b0; Preferences:9270; valid: NO>) is invalid. Returning error { BKSProcessExitReason = 0; BKSProcessJobLabel = "UIKitApplication:com.apple.Preferences[0x90bf][6825]"; NSLocalizedFailureReason = "Unable to obtain valid process handle"; } [com.apple.Preferences] Bootstrap failed with error: <NSError: 0x600000846c60; domain: BKSProcessErrorDomain; code: 1 (bootstrap-failed); reason: "Unable to obtain valid process handle"> Bootstrapping failed for <FBApplicationProcess: […]

iOS 7完成处理程序永远不会被调用

在下面的代码中,没有一个完成处理程序被执行。 我能find的一个解释是iPhone Simulator 5.1中的这个Bug,使用UIManagedDocument的Xcode 4.5 。 它说这可能是iPhone模拟器5.1中的一个错误。 不过,我试过iPhone模拟器6.0,6.1和7.0,他们都没有工作。 我会很感激你的帮助。 (顺便说一下,我在斯坦福iOS课程中看到了这个代码,第14讲) NSURL *url = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; url = [url URLByAppendingPathComponent:@"DataDocument"]; UIManagedDocument *document = [[UIManagedDocument alloc] initWithFileURL:url]; if(![[NSFileManager defaultManager] fileExistsAtPath:[url path]]){ NSLog(@"This logs"); [document saveToURL:url forSaveOperation:UIDocumentSaveForCreating completionHandler:^(BOOL success){ NSLog(@"This never logs"); }]; }else if(document.documentState == UIDocumentStateClosed){ NSLog(@"This logs"); [document openWithCompletionHandler:^(BOOL success){ NSLog(@"This never logs"); […]