ios-simulator

Does UI_USER_INTERFACE_IDIOM work with Targeted Device Family

匆匆过客 提交于 2019-12-06 12:11:44
So I'm currently using UI_USER_INTERFACE_IDIOM in conjunction with [[UIDevice currentDevice] model] to check if I'm on an iPhone, iPod or iPad. What I've found is that in the iPad simulator 3.2, UI_USER_INTERFACE_IDIOM still evaluates to UIUserInterfaceIdiomPhone (iPhone). I'm wondering if this has something to do with my Targeted Device Family setting. I'm only targeting iPhone for my App (I don't want to make a universal app with scaling views). However, I support the 3.2 SDK so I still want users that have an iPad to be able to run my iPhone app. Will UI_USER_INTERFACE_IDIOM evaluate

Simulating an update in iPhone SDK?

为君一笑 提交于 2019-12-06 11:48:23
问题 I have created an app, and then later changed the core data model. I changed the model and this all works fine during development. However to my surprise, when users download the updated version (with the new core data model), the app keeps the old model from the previous version. This causes the app to crash. Is there some way to simulate an update as if it was updated from the app store? I need to be able to do this in order to test my possible solutions to the problem. 回答1: You cannot

UITabBar images visible on simulator, disappear on the device

我是研究僧i 提交于 2019-12-06 11:29:35
问题 in an iPhone app, I have a UITabBar with three tabs. One has a system image, two more have custom images. These are PNGs, 30x30, palette-based, mostly transparent. These images show up fine in the simulator, but on the device, all I see is a grey gradiented square on a tab. The shapes on these images are grey to begin with, but they do show up as expected on the simulator. Any ideas, please? 回答1: The image should be white on transparent. It's in the UI design guide. In my case, it was grey on

Customize iOS Simulator preset locations to fake as current location

。_饼干妹妹 提交于 2019-12-06 10:26:13
问题 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? 回答1: EDIT: Another way to achieve this to edit your run scheme and select options. and provide GPX file in default location

iPhone Programming in Mac OS X running not in a Mac Computer

拟墨画扇 提交于 2019-12-06 09:30:19
问题 I want to try some "programming for iphone". For that I need a Mac OS X, no question about it.. But I have a problem I don't have a Mac Computer. I have a Intel Dual-Core PC, running XP. Snow Leopard its for Intel, but for Intel Mac computers, right?. If I manage to install Mac OS X Snow Leopard in my Notebook. Do you think I can still install and do programming for Iphone, as well in a Mac Computer? There will be any problems in the programming or debugging? And there is another thing.. I

Open Google+ Application in Xcode 4.5

不羁岁月 提交于 2019-12-06 08:48:37
I making a social application which requires Google+. I know that I can open Google+ as a link to Safari (Which isn't really user Friendly having to switch apps just to post something). This code opens the link to Safari: -(IBAction)Google+:(id)sender { NSLog(@"Google+"); //The link will go to Stack Overflow Google+ Page NSURL *GooglePlus = [NSURL URLWithString:@"https://plus.google.com/+StackExchange/posts"]; [[UIApplication sharedApplication] openURL:GooglePlus]; } But is there a way to detect if Google+ Application is installed and open the application there (And if it isn't then open the

Simulate on Xcode 6 somethings wrong

删除回忆录丶 提交于 2019-12-06 08:42:42
问题 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? 回答1: you should put launch screen for iphone 5 - 640x1136 named Default-568h@2x or use catalog assets alternatively. 回答2: Figured out a solution in my case Go to General tab of project's target

iOS 7 Completion handler never gets called

那年仲夏 提交于 2019-12-06 08:38:12
问题 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

Ad Hoc iPhone SIGSEGV crash while Debug on device & simulator works

旧巷老猫 提交于 2019-12-06 08:27:36
App crashes immediately after I attempt to login so it can’t a be a watchdog memory issue Reason: _mh_execute_header App crashes upon attempting to make a network request using ASIHTTPRequest. Request never touches server. ASIHTTPRequest: I use -fno-objc-arc to omit ASIHTTPRequest from ARC. I believe that the following call is causing my problems since my call never even touches the server when I make a request. Any help would be greatly appreciated! Call: NSDictionary *response = [[NetworkManager sharedManager] loginWithName:name password:pwd]; Method: - (NSDictionary *)loginWithName:

Incorrect UIView bounds/drawing in the Simulator

穿精又带淫゛_ 提交于 2019-12-06 08:19:24
I've created a single-view test app and added a UIButton and UIView to the UIViewController in the main storyboard. I have resized both the button an view to have the same size. In my VC's -viewDidAppear:animated method I dump the frame and bounds of the button and view: - (void)viewDidAppear:(BOOL)animated { NSLog(@"button bounds: %@", NSStringFromCGRect(self.theButton.bounds)); NSLog(@"button frame: %@", NSStringFromCGRect(self.theButton.frame)); NSLog(@"view bounds: %@", NSStringFromCGRect(self.theView.bounds)); NSLog(@"view frame: %@", NSStringFromCGRect(self.theView.frame)); } And here is