Post

Replies

Boosts

Views

Activity

MKPeerConnectivity Framework test app not working
Just to see if I understand how to code everything properly, and to help illustrate the issue, I've been following this tutorial: https://www.ralfebert.de/ios/tutorials/multipeer-connectivity/ It's a good one to illustrate the problem because there's not much coding before the problem reveals itself. Of course, I immediately ran into the problem others have reported with the new requirements with iOS14, and I've added the required entries into the info.plist. This had the desired effect of eliminating the error message appearing in the debug window at run time, it also triggered a popup requesting access from the user, and the app appears in the settings, privacy, Local Network listing. So that is not the problem. The problem is that my service doesn't seem to be advertising even though I'm not getting any error messages. On the tutorial I link, there is a step, "Check that the service is advertised on the local network". The service is not appearing. Why? Is there something missing in that tutorial up to that point?
1
0
705
Jul ’21
Duplicating 24-hour format issue in simulator
On a device, If I have a string, say "04:00 PM" and convert it to a date using a dateformatter: let dateFormatter = DateFormatter() dateFormatter.format = "h:mm a" let d = dateFormatter.date(from: "04:00 PM") If the device is set to a 24 hour time format, then d is nil. On a simulator, the result is a date. What I want to do is to somehow set up the simulator to return a nil under this circumstance. How do I do that? Things I have tried: setting 24-hour format on the Mac, setting the region on the Mac, setting the region on the simulator, setting the locale in the simulator (maybe there's a locale setting I missed). For the Mac update settings, I reset the simulator afterward for the change to take effect. So far nothing I've tried works. The purpose of this is to allow automated tests to be able to detect these nils that will happen on actual devices.
3
0
2.4k
Jul ’21
Keyboard input no longer recognized in iPad Simulator
I've been working on an app where I had code to recognize keystrokes using override func pressesBegan(_ presses: Set<UIPress>, with event: UIPressesEvent?) Unless my memory is faulty, this was working in an iPad Pro 12.9" simulator but is not anymore. It does still work in the iPhone simulators I have tried. It also works if the build is targeted to my M1 Max Macbook, when that doesn't crash (Xcode crashing - not my app crashing). I reset the iPad simulator and also rebooted the computer, but the above-referenced method is not being called for iPad simulators. I'm on the shipped version of MacOS 12.0 and Xcode 13.1
0
1
462
Nov ’21
Universal App Not Resizable as Expected
I have an app that started out as an iPhone/iPad app and I added support for Mac. According to videos and documentation I've read online, one of the things you get for free is the ability to resize screens. It does, in fact, work that way when I build to MacOS from Xcode. However, when I upload the build to Testflight and run that version of the app, installed by Testflight, it doesn't resize. I should qualify that. I can drag a corner to switch it between portrait and landscape, but the size remains the same. I'm not sure what to look for, especially since resizing works when I build from Xcode. Any suggestions? I'm using SideMenu as the navigation controller for the app. The main view controller that instantiates Side Menu adds four view controllers as children. One of those is a portrait-only view controller. Since it works as expected when I build from Xcode, anything I try will have to be archived and uploaded to Testflight. So any suggestions of likely things to try would be greatly appreciated. I am NOT doing anything with windowScene size restrictions.
1
0
805
Nov ’21
Animation slowdown when building to M1 Mac
I have a simple app that lets a user navigate a maze. A token is moved around the maze in response to input by accelerometer, digital joystick, taps, or keyboard entry, depending upon settings and device capabilities. The view to the maze may be zoomed, in which case the maze pans to center the token. The main animations are to move the token, and to recenter the maze. An additional animation occurs if the token encounters certain prizes along the way. When that happens, the prize award is displayed over the token and then animated toward the center of the board. Randomly and rarely, the animation changes to be very slow, when running a build to the Mac. Unlike the iOS simulators, I know of no way to toggle the animation speed when building to the Mac. Is there a way to toggle this? Am I somehow toggling it accidentally? When I do a test run on the Mac, I'm almost always using keyboard input, which is the arrow keys. Unlike the iOS simulators, where halting and restarting after the animation has been slowed results in continued slow animations, if I halt the Mac build after the animation slows down and start again, it animates at normal speed.
4
0
1.3k
Dec ’21