ios-simulator

Editing the iPhone Simulator hosts file

旧巷老猫 提交于 2021-01-20 23:18:27
问题 is it possible to edit the hosts file of the iPhone simulator? I'm working on a REST API and I need to be able to access my local site using a correct domain (e.g. http://api.local.com) 回答1: You can simply edit your Mac's /etc/hosts file and iPhone Simulator will adopt whatever is set there. It works because the iPhone Simulator simply provides a simulated frontend of Mobile Safari's user interface, which just uses your Mac's network settings. 来源: https://stackoverflow.com/questions/3648764

Xcode 12.3 iOS 14.3 simulators Yellow Dock / yellow translucent issues

独自空忆成欢 提交于 2021-01-13 11:51:27
问题 Today I downloaded the release of Xcode 12.3, and I went running the iOS 14.3 simulators and it seems like there is a graphic glitch that all translucent views are yellow, dock included. I redownloaded iOS 14.2 and those seem fine. It just seems really odd. I've submitted feedback, but I was curious if anyone else has seen this? I'm on macOS v10.15.7 (Catalina) and am curious of if it's just Catalina or also macOS v11 (Big Sur). 回答1: I think it is a bug related to the discrete GPU. In

SwiftUI with Core Data getting Blank Screen in simulator in Xcode 12

旧街凉风 提交于 2021-01-04 07:36:47
问题 In XCode 12, if I create a new SwiftUI App and check the "Use Core Data" button, the resulting application (with no changes) shows a blank screen in simulator (as well as on a device). In preview it shows the example timestamps as expected. Why are the simulator/device not showing the example timestamps? 回答1: If you want to see the sample inputs from the template (10 rows with timestamp) in your simulator, you need to change in App.swift: let persistenceController = PersistenceController

React Native on Apple Silicon M1 - The linked library 'libPods-ProjectName.a' is missing one or more architectures required by this target: x86_64

僤鯓⒐⒋嵵緔 提交于 2020-12-30 02:44:06
问题 I'm trying to build a React Native project on a Mac Book Pro with a M1 architecture, for iOS simulator. The project built nicely on Intel architecture. It also build on device and archive well on M1. But not on simulator. I had this classical error when switching to the M1 chipset. in /project-folder/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(cryptlib.o), building for iOS Simulator, but linking in object file built for iOS, file '/project-folder/ios/Pods/OpenSSL-Universal/ios/lib

React Native on Apple Silicon M1 - The linked library 'libPods-ProjectName.a' is missing one or more architectures required by this target: x86_64

江枫思渺然 提交于 2020-12-30 02:44:04
问题 I'm trying to build a React Native project on a Mac Book Pro with a M1 architecture, for iOS simulator. The project built nicely on Intel architecture. It also build on device and archive well on M1. But not on simulator. I had this classical error when switching to the M1 chipset. in /project-folder/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(cryptlib.o), building for iOS Simulator, but linking in object file built for iOS, file '/project-folder/ios/Pods/OpenSSL-Universal/ios/lib

Slide over and split view in iPad simulator

拜拜、爱过 提交于 2020-12-28 09:59:46
问题 iOS 9 introduced slide over and split view for iPad. How do I simulate these features on an iPad simulator? I have tried swiping from right on iPad Air 2 simulator with no luck. 回答1: To simulate slide over: drag from the right edge (starting from a point very close to the edge). To simulate split view: tap on the small white bar on the left edge of the slide-over app. See this WWDC video. EDIT (Thanks to @qix, @Bogdan Weidmann, @Solomon) Supported devices: iPad Air+, Mini 2+ for slide over

does the accelerometer work for the iphone/ipad simulator?

荒凉一梦 提交于 2020-12-06 06:43:50
问题 From what I can tell, my app should be firing accelerometer events while Im using the iPad simulator in XCode, but its not. I have googled around and it somewhat seems that the accelerometer is not implemented in the simulator, is this correct? If so, why on earth would they have a "Hardware->Shake Gesture" menu option? My code is as follows: .h file: @interface MyViewController : UIViewController <UIPickerViewDataSource, UIPickerViewDelegate, UIAccelerometerDelegate>{ UIAccelerometer

does the accelerometer work for the iphone/ipad simulator?

我们两清 提交于 2020-12-06 06:41:41
问题 From what I can tell, my app should be firing accelerometer events while Im using the iPad simulator in XCode, but its not. I have googled around and it somewhat seems that the accelerometer is not implemented in the simulator, is this correct? If so, why on earth would they have a "Hardware->Shake Gesture" menu option? My code is as follows: .h file: @interface MyViewController : UIViewController <UIPickerViewDataSource, UIPickerViewDelegate, UIAccelerometerDelegate>{ UIAccelerometer