Post

Replies

Boosts

Views

Activity

Forced Orientation + iOS 26?
Hello, I have an app which is a full screen app. Since updating xcode, the force-landscape and force-portrait modes are broken. I am looking for a way to have a full-screen app in landscape, or a full-screen app in portrait. The previous process that I found, which worked was the following: setNeedsUpdateOfSupportedInterfaceOrientations() UIWindowScene.requestGeometryUpdate(.landscape) Then returning the correct value on uiviewcontroller override var supportedInterfaceOrientations : UIInterfaceOrientationMask { return [.portrait, .portraitUpsideDown, .landscapeLeft, .landscapeRight] } This is going to destroy 2 full years of development, the entire app hinges on being able to use portrait OR landscape mode. There are portrait scenes and landscape scenes. When you setup a scene, you can rotate the device. Once the scene is setup, it needs to be fixed into one orientation and run full-screen. Please let me know best practices for this use case. I look to the monks, jedis, ninjas, and warriors to guide me through this swamp of sorrows. Thanks!
Topic: UI Frameworks SubTopic: UIKit
2
0
138
Sep ’25
Actor URLSession Warning?
Non-sendable type '(any URLSessionTaskDelegate)?' exiting actor-isolated context in call to non-isolated instance method 'data(from:delegate:)' cannot cross actor boundary Please help, I am 1000% stuck on this issue in particular. Using strict asynchronous warnings, how can I make this work without warning? I can convert NetworkManager into a struct, but I prefer to keep it as an actor so that it is Sendable by default.
4
0
2.7k
Dec ’23
Have 2 Task with for loops run concurrently?
Say I want to run a Task, with a for loop. Then have another Task with a for loop. And have these both run concurrently. Is there a way? I tried doing this: func stepAsyncStep(id: String, number: Int) async { if number % 10000 == 0 { print("chirp \(id) @ \(number)") } } func somethingAsync(id: String) async { for i in 0...100_000 { await stepAsyncStep(id: id, number: i) } } Task.detached { print("task a begin") await somethingAsync(id: "a") print("task a end") } Task.detached { print("task b begin") await somethingAsync(id: "b") print("task b end") } task a begin chirp a @ 0 chirp a @ 10000 chirp a @ 20000 chirp a @ 30000 chirp a @ 40000 chirp a @ 50000 chirp a @ 60000 chirp a @ 70000 chirp a @ 80000 chirp a @ 90000 chirp a @ 100000 task a end task b begin chirp b @ 0 chirp b @ 10000 chirp b @ 20000 chirp b @ 30000 chirp b @ 40000 chirp b @ 50000 chirp b @ 60000 chirp b @ 70000 chirp b @ 80000 chirp b @ 90000 chirp b @ 100000 task b end The only way I can make these run in parallel is to add sleeps into the loops. Is there any way to make then run concurrently without Task.sleep ? I also tried a TaskGroup, this doesn't work either. Crying for help here.
2
0
604
Mar ’23