ios-simulator

Repeated request for microphone permission on iOS Simulator

断了今生、忘了曾经 提交于 2019-12-04 15:57:48
问题 I'm working with Xcode 10.1 (10B61) on an app that needs permission to use the microphone. (Almost) Every time I start the app from Xcode (in simulator) I get a system popup: "Appname" would like to access the microphone "Privacy - Microphone Usage Description""> It doesn't matter if I select "Don't Allow" or "OK". This message keeps popping up. How can I fix it? Update [fixed] This issue seems to be fixed in Xcode 10.2 👍 回答1: You can get rid of this following this steps: Go to "Security &

Xcode 5.0.1 iOS 7.0.3 Simulator Not launching

ε祈祈猫儿з 提交于 2019-12-04 15:44:37
问题 I just upgraded to Xcode 5.0.1 on OSX Mavericks and upgraded Xcode to 5.0.1. When I try to launch an app on iOS 7.0.3 Simulator, the Simulator won't launch. The app will launch on iOS 6.1 Simulator, but the iOS 7.0.3 Simulator just gets stuck on a black screen. Anyone else have this issue? I've tried re-installing XCode as well and still get the same problem. 回答1: I'm also having same problem in Xcode 5.0.1/OS X 10.8.5. Finally, able to resolve it. First clean project (Cmd+K) and then run

Simulate on Xcode 6 somethings wrong

倖福魔咒の 提交于 2019-12-04 15:26:57
I installed Xcode 6 gm version. I created new project and I run it on iPhone 6 or iPhone 5s simulator with ios 8. Everything is fine.But When I simulate on iphone 5s deployment target ios 7.1.Device screen is not full screen.it runs like as 3.5inc screen.Do you know reason of that? Is it XCode 6's bug? you should put launch screen for iphone 5 - 640x1136 named Default-568h@2x or use catalog assets alternatively. Figured out a solution in my case Go to General tab of project's target Scroll down to App Icons and Launch Screens section Click on Use Asset Catalog drop down option under Launch

Draw partial image or clipping diagonally using Core Graphics

≡放荡痞女 提交于 2019-12-04 15:01:41
I am looking to draw an image using Core Graphics.However I am able to draw the partial image i.e Horizontally & vertically. But instead of it I want to have it in a Diagonal Way.For more clarification, pls refer to below image : Real Image : Required Image Output: Below is the code using to fill the Layer with Color : CGContextRef contextRef = UIGraphicsGetCurrentContext(); CGContextMoveToPoint(contextRef, r.origin.x, r.origin.y ); CGContextAddLineToPoint(contextRef, r.origin.x , r.origin.y); CGContextAddLineToPoint(contextRef, r.origin.x + (r.size.width ), r.origin.y + (r.size.height));

Failed to install “iOS 6.1 Simulator” XCode 5

喜夏-厌秋 提交于 2019-12-04 14:57:31
问题 I want to run my app on both simulators ios6 and ios7. I'm trying to install ios 6 simulator but I am getting this error: Failed to install "iOS 6.1 Simulator" An unknown error occured. Please try again later. I restarted XCode but not working stil.. 回答1: Try to reset iOS 6.1 simulator from menu "iOS Simulator -> Reset Content and Settings...", then run your app in XCode. This helped me. 回答2: Was having the same problem , already did a system restart and reset the simulator but didn't work

Waiting for debugger to connect

你说的曾经没有我的故事 提交于 2019-12-04 14:52:00
(excuse me for my english!) When i debug my app, the simulator is opening but with nothing... in the monodevelop ide, it shows alert box with message "Waiting for debugger to connect..." sometime, the simulator ask me the applicaton to load... but which? why? in the past, i had monodevelop 2.6 installed, then monodevelop 2.6 and 2.8 together, NOW: only monodevelop 2.8 can somebody help me? how i can resolve all this troubles? thank you Try to restart MonoDevelop . Then reset IOS Simulator IOS Simulator >> Reset Content and Settings... and then restart your IOS Simulator . 来源: https:/

Customize iOS Simulator preset locations to fake as current location

匆匆过客 提交于 2019-12-04 14:51:43
In the iOS simulator, one can select from some Apple pre-defined locations, or enter a custom latitude/longitude for your own location. I want to customize that list of available locations. I see from this answer that one can provide a gpx file. However, I don't see where to do this in Xcode5 (the screenshots shown in the linked to answer are for Xcode 4). Suggestions? EDIT: Another way to achieve this to edit your run scheme and select options. and provide GPX file in default location dropbox.Make sure that allow location simulation is enabled. https://developer.apple.com/library/ios

iOS 7 Completion handler never gets called

烈酒焚心 提交于 2019-12-04 14:33:18
In the following code none of the completion handlers ever get executed. The one explanation I was able to find is this Bug in iPhone Simulator 5.1 with Xcode 4.5 using UIManagedDocument . It says that it might be a bug in iPhone simulator 5.1 . However, I've tried iPhone simulators 6.0, 6.1 and 7.0, none of them worked. I'll really appreciate your help. (By the way, I've seen this code in the Stanford iOS course, lecture 14) NSURL *url = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; url = [url URLByAppendingPathComponent:@

NSHTTPURLResponse statusCode is returning zero when it should be 401 [duplicate]

若如初见. 提交于 2019-12-04 13:20:27
Possible Duplicate: iOS: How can i receive HTTP 401 instead of -1012 NSURLErrorUserCancelledAuthentication Just doing a normal HTTP post with a NSMutableURLRequest and sendSynchronousRequest. But the NSHTTPURLResponse object I pass in has a statusCode of zero after the call. I get this error: Error Domain=NSURLErrorDomain Code=-1012 UserInfo=0x4d3b3c0 "Operation could not be completed. (NSURLErrorDomain error -1012.)" but no status code. Why? The status code the server is sending is 401. I don't have a solution to the problem, but here is a list of NSURLErrorDomain codes of which -1012 refers

Open pdf with other apps

折月煮酒 提交于 2019-12-04 13:18:44
I am displaying a pdf file in an app. I want to show "open with" option on nag bar showing apps installed on iPhone that can open same pdf and if user selects any of the app (for e.g. pdf viewer) then the pdf should get open with pdf viewer app. How do I do this? Please help Thanks in advance. This code will present the OpenIn interaction you're looking for. It works for iPhone and iPad. On iPad its in a popover. I'm generating the PDF but if you're just using one you have you don't need to writeToFile, just hand in the filePath. // In your header. MyViewController.h @interface