Simulator

RSS for tag

Rapidly prototype and test builds of your app during the development process using Simulator.

Posts under Simulator tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

iOS 17.0.1 Simulator Doesn't Show Custom App Settings When Requesting Location Permission Access
I may have found a bug within Xcode 15.0.1. I am working with CoreLocation in order to access a user's location. I have all the code working and the permissions needed within the info.plist. Below is a checklist of everything that I have. Info.plist I don't need to but I added all 3 keys into my project's info.plist to explain the reason why I need access to the user's location: NSLocationAlwaysAndWhenInUseUsageDescription NSLocationWhenInUseUsageDescription NSLocationAlwaysUsageDescription This was just to cover all basis. Requesting Permission After doing that I have a simple class that requests access to the users location. @Observable class LocationPermissionManager: NSObject { private let manager = CLLocationManager() override init() { super.init() manager.delegate = self } func requestAuthorisation() { manager.requestWhenInUseAuthorization() } } Nothing too wild just a simple class to ask for authorisation permission. When I create an instance of this class and call the function to request authorisation. I get the system dialogue to ask for permission and I'm able to select an option. The Problem The issue starts to happen after. When I go to the settings on the simulator the app doesn't show up or appear. But if I go to the settings on my actual iPhone the app does show up and appear and i'm able to change the different permissions you want to give the app. Requesting Permission Something weird I did find is a work around to make your app appear in the settings. And it involves you requesting permission for another API i.e ATT (App Tracking Transparency) this does work and you're able to see your app appear in the settings on the simulator and you'll see both the ATT & Location permission options as well. It's worth nothing that I'm using SwiftUI for this and this possible bug might be a big one since if someone doesn't have a physical iPhone they're not able to change the permissions for their location on the simulator. Could someone in Apple please investigate this issue?
1
1
1.2k
Nov ’23
Issues with "AR not supported in Simulator"
I am trying to implement Hand Tracking in a visionOS application I am developing. Initially, I encountered errors such as "Cannot find type 'ARAnchor' in scope." Upon investigation, I realized the error arose because "import ARKit" is required, which was already in the code. Digging a bit deeper, I discovered that ARKit is not compatible with the simulator, or at least that's what I believe. My ultimate understanding is: "ARKit requires the specific hardware of an actual iOS device to operate, as it relies on features like the device's camera and motion sensors." Having reached this point, I noticed in the "HappyBeam" application documentation for visionOS there was a function "#if !targetEnvironment(simulator)". Upon researching, it turns out that this compilation conditional is used so that the application can compile in the simulator (without ARKit functionality) and on a real device. After applying "#if !targetEnvironment(simulator)" it allowed me to compile, but now when I run the application in Simulator, I receive a message on the main window stating: "AR not supported in Simulator." My current question is: Can I simulate Hand Tracking in any way without using ARKit, or is it essential to run the application on a physical device? And if Hand Tracking can be simulated in "Simulator", how is it done? I haven't been able to find a way to do it.
1
1
447
Nov ’23
simulator not opening or booting after wasting a lot of money on data (no retry option )
Setting up my MacBook Pro 2018 has been quite a struggle. When I attempted to install Xcode, it prompted an update from Ventura to Sonoma, a process that turned out to be painstakingly slow. What's worse, if the download failed due to a poor network, there was no retry option, necessitating a complete reinstallation. After investing time and money to update my Mac, I finally managed to install Xcode. However, the next step was to download iOS 17 simulators. Unfortunately, the download failed at the 7GB mark, and to my dismay, there was no option to retry. This endeavor has been financially taxing due to the expenses on data. To compound matters, upon further attempts, I discovered that the simulator app I managed to download isn't functioning properly. It's disheartening to have devoted so much time and resources to this, only to encounter roadblocks at every turn. Any advice or assistance to resolve these issues would be immensely appreciated.
2
0
780
Oct ’23
ios17: simulator screenshots for iPhone 6/7/8+ wrong dimension for app store submission
I ran into issues submitting to the appstore related to the AppStore requirement to have screenshots for 5.5" screen size. As stated, the dimensions required are: 1242 x 2208 pixels (portrait): I tried the iPhone 8+ simulator on my machine, with iOS 17. The output dimensions taking a screenshot are: 1125 × 2436. Therefore the appstore does not accept it. And they are the incorrect aspect ratio to edit also. I had some testing done and it seems that iOS16 is fine and meets the requirement. Also did try choosing one of the other phone models, 7+, 6s+, but I cannot even create a simulator, as they do not accept iOS17. See video: Please advise
1
1
742
Oct ’23
Preferences on Simulator crash when accessing iCloud settings
As per the title, as soon as I try to open iCloud settings on the Simulator, a black screen appears and the Preferences app crashes (and a crash report shows up shortly thereafter). This is an issue in all of Xcode 17.0.0, XCode 17.0.1 and the Xcode 17.1 beta. I've tried all the simulator models from the SE to the 15. I think this may be something to do with the following two pop-ups that keep showing up on the Simulator but don't actually do anything when tapped: one says to accept new iCloud T&Cs. When I tap on it, nothing happens (and I can't find new T&Cs to accept in the web browser); and one that prompts me to re-enter the Apple ID password. When I input the password and confirm, nothing happens. This is causing major issues for testing a couple of my apps because Simulator sometimes radomly thinks that the user isn't signed into iCloud when they, in fact, are. For example, I've been getting the following error from GameKit: 'The requested operation could not be completed because you are not signed in to iCloud..' (the same function that throws the error does confim that the user is signed in just before throwing). I'd be very grateful for any thoughts. Been stuck on this for well over a week now...I've found various threads about the wider Preferences app crashing (and this being fixed in the latest beta) but nothing on the specific issue I'm having.
1
0
611
Oct ’23
Xcode 15 - can't select (installed) iOS 16.4 runtime destination
Problem: iOS 16.4 runtime targets are not available for selection, however the 16.4 simulator shows as installed under "Manage run destinations" Config: Xcode 15.0, Sonoma 14.0, M1 Mac-Mini Background: I write and maintain apps for my business unit. A co-worker dropped a phone on my desk and said 'The app doesn't work anymore, can you fix it'. Well, it turns out the phone is running iOS 16.6. The OS had been upgraded. This sent me down the path of upgrading Xcode on a development Mac, which also forced a MacOs upgrade on me. The end result is I now have XCode 15 on Sonoma, but have an iOS 16.6 device that I'm trying to target. Since I don't have any iOS 17 devices I didn't install the 17.0 runtime. To install the "16.6 runtime" I went to: "Xcode - Settings - Platforms" and hit the + in the lower left and under "Previously released simulators" I selected iOS. I selected iOS 16.4 as it was the closest I could see to 16.6 so I'm assuming it still works with 16.6. It took a few attempts to download correctly, but it now shows up in my platforms as "iOS 16.4 Simulator 6.18 GB on disk". If I select "Product - Destination - Manage Run Destinations" I can see simulators for 10 different iOS devices (from iPad 10th gen to iPhone SE) all running iOS 16.4. Great! I must be ready to develop and test for 16.6. Right? Nope. In the dropdown beside my App name the only option that is shown to me is "iOS 17" and the "Get" button beside it. I was expecting to my iOS 16.4 simulators as available target destinations, but there's nothing other than "iOS 17 - Get". This is an old App that I'm maintaining so its deployment target is not new. Selecting a different iOS Deployment target doesn't have an effect. I tried going into Manage Run Destinations and selected my iPhone 14 simulator on iOS 16.4 as "show run destination always". - no change Older iOS version do not show as destinations. Anyone else encounter this? Did you figure it out? Help? Thx
3
0
4.4k
Oct ’23
While trying to install .app on the Simulator, I get the following error.
Simulator device returned an error for the requested operation. Appex bundle at /Users/macosventura/Library/Developer/CoreSimulator/Devices/92380DFA-6A40-46D9-BB59-AC5454F68E34/data/Library/Caches/com.apple.mobile.installd.staging/temp.Ku4bKV/extracted/TestFlight.app/PlugIns/TestFlightServiceExtension.appex with id com.apple.TestFlight.ServiceExtension specifies a value (com.apple.appstored-services.testflight) for the NSExtensionPointIdentifier key in the NSExtension dictionary in its Info.plist that does not correspond to a known extension point.
0
0
355
Oct ’23
The APIs that I use are not working on the actual devices.
I'm building a custom keyboard using a keyboard extension. I have a task that calls the API(from openAI) from the keyboard, which works very well on the simulator. However, when I test it by connecting it to a real device or downloading it from the app store, the API doesn't work at all. In info.plist, I set "App Transport Security Settings" > "Allow Arbitrary Loads" > "Yes", but it doesn't work on the device at all. There's nothing wrong with my network.
0
0
273
Oct ’23
The APIs that I use not working on the actual device.
I'm building a custom keyboard using a keyboard extension. I have a task that calls the API from the keyboard, which works very well on the simulator. However, when I test it by connecting it to a real device or downloading it from the app store, the API doesn't work at all. In the info.plist, I set "App Transport Security Settings" > "Allow Arbitrary Loads" > "Yes", but it doesn't work on the device at all. There's nothing wrong with my network.
0
0
254
Oct ’23
12.9 inch iPad Simulator not presenting SpriteNodes correctly for Xcode
12.9 inch iPad Simulator not presenting SpriteNodes correctly for Xcode When I generate my SKScene, I use ourScene.scaleMode = .aspectFill I then display several SKShapeNodes, e.g., let roomWidth = UIScreen.main.bounds.width let roomHeight = UIScreen.main.bounds.height let circleRadius = 30.0 itsStatusNode = SKShapeNode(circleOfRadius: circleRadius) let circleOffsetX = 95.0 let circleOffsetY = 70.0 let circlePosX = roomWidth/2 - circleRadius - circleOffsetX let circlePosY = roomHeight/2 - circleRadius - circleOffsetY itsStatusNode.position = CGPoint(x: circlePosX, y: circlePosY) toScene.addChild(itsStatusNode) The above Code works for all Xcode Simulators: iPad (10th Generation) iPad Air (5th Generation) iPad Pro (11 inch) (4th Generation) iPad Mini (6th Generation) except the iPad (12.9 inch )(6th Generation) For example, these work for all except the 12.9" (landscape) circleOffsetX = 95.0 circleOffsetY = 70.0 (portrait) circleOffsetX = 70.0 circleOffsetY = 95.0 For just the 12.9" these work (landscape) circleOffsetX = 190.0 circleOffsetY = 145.0 (portrait) circleOffsetX = 150.0 circleOffsetY = 190.0 I have seen other reports that point other errors out for just the 12.9 inch Simulator. Or, is this one of many examples when I have to upload the App to a real Device such as my iPad or Apple TV? FWIW, I only have a iPad Mini, not the 12.9 inch version As always, thanks bunches for just reading this.
1
0
436
Oct ’23
Could not download iOS 17.0.1 Simulator (21A342).
I updated my MacBook to Sonoma which was a problematic task, presumably because the MacBook Pro sat unused for 10 months. Once it finally installed, Xcode needed to be updated to run. Once that finished, all of my devices/simulators are gone. When I attempt to download iOS 17.0.1 as it suggests, it downloads about 800MB of it and then fails with the error code below. I've also attempted to download previous versions of Xcode on the developer site and they also end the download prematurely. I cannot upload my app because I can't Build or Archive. There are dozens of similar complaints from previous Xcode updates with fixes. I've tried many of them to no avail. Could not download iOS 17.0.1 Simulator (21A342). Hardware Overview: Model Name: MacBook Pro Model Identifier: MacBookPro17,1 Model Number: MYDA2LL/A Chip: Apple M1 Total Number of Cores: 8 (4 performance and 4 efficiency) Memory: 8 GB System Firmware Version: 10151.1.1 OS Loader Version: 10151.1.1
9
3
6.3k
Nov ’23
Simulator device returned an error for the requested operation
Error: The application's Info.plist does not contain a valid CFBundleVersion. Ensure your bundle contains a valid CFBundleVersion. Hi all, I am new to app development, and all of a sudden after build successful, while launching the simulators (I have an app with iPhone and companion Watch app) the error appear. I have added the version and the versionShort into the info.plist file, however I have noticed that in the DerivedData folder, there is a info.plist file that is different from the one I have in the project. Please help.
3
1
3.9k
Oct ’23