Post

Replies

Boosts

Views

Activity

Reply to Black frames in recorded videos
I had a similar problem in recording video from the camera. I had to add the AVCaptureMovieFileOutput to the capture session right after setting up the AVCaptureDevice. When the user pressed the record button at a later time it worked without black frames. But when I did set up the AVCaptureMovieFileOutput only after the user pressed record I got black frames at the start of the recorded movie. Does anyone know what is the problem here?
Topic: UI Frameworks SubTopic: UIKit Tags:
Jun ’24
Reply to Make background of VideoPlayer clear
Perhaps I misunderstand your question, but the way I see it: There is nothing „silly“ about this behaviour, because the "background" is part of and encoded into the video. Is there even a standard for "transparent video“? How should the video player know which part of the video you consider "background". If you meant to remove the "black bars" of letterboxed widescreen videos they may also be part of the video or if not, make sure you size the video player to the correct aspect ratio to prevent it from padding your video. (I have not tested this).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’24
Reply to Swift Playgrounds Incompatibility with Xcode 16 Files and Swift Versions
Any news about Support for Swift 6.2 and iPadOS 26? Is Swift Playgrounds still supported?
Replies
Boosts
Views
Activity
Oct ’25
Reply to How to implement thread-safe property wrapper notifications across different contexts in Swift?
You could perhaps check if the following open source library written by two very renowned swift developers meets your needs or get some inspiration from their code?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to AVPlayerItem step(byCount:) callback or notification
Precise stepping and seeking with AVFoundation is - in my experience - a very difficult to solve problem. I had to use AVSampleCursor to build a table of frame times and seek(to:toleranceBefore:toleranceAfter:) to get working results.
Topic: Media Technologies SubTopic: Video Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to Swift Playgrounds Incompatibility with Xcode 16 Files and Swift Versions
Thanks! Finally some info about the future of Swift Playgrounds on iPad. I was starting to get worried!
Replies
Boosts
Views
Activity
Jan ’25
Reply to Running out of memory analyzing images with ImageRequestHandler
Could this be a problem with the ARC memory management of Swift? Most probable you have to use a @autoreleasepool at the right level to get rid of of autoreleased objects during your loop.
Replies
Boosts
Views
Activity
Dec ’24
Reply to Seriously? I can't deploy my demo to iPad cus swift 6?
Apple still needs to Update Swift Playgrounds App to Swift 6 and iPadOS 18 APIs. And it is about time!
Replies
Boosts
Views
Activity
Oct ’24
Reply to Considering Alternatives to SwiftUI for a Complex App
It is particularly important to them to drive all navigation from state as described here: https://swiftpackageindex.com/pointfreeco/swiftui-navigation/main/documentation/swiftuinavigation/whatisnavigation#State-driven-navigation
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Considering Alternatives to SwiftUI for a Complex App
Have you considered the navigation library from the people at point.free? https://github.com/pointfreeco/swiftui-navigation They have corresponding videos about the subject https://www.pointfree.co/collections/swiftui/navigation some of them are free: https://www.pointfree.co/episodes/free
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Issues with @preconcurrency and AVFoundation in Swift 6 on Xcode 16.1/iOS 18 (Worked fine in Swift 5)
Leave the @preconcurrency attribute in and ignore the warning (for now). I heard it is a bug in some version if the compiler betas. Have you tried the same with Xcode 16.0 Release Candidate (Sep 9th)? It should aready have a newer compiler than Xcode 16.1 (Aug 12th).
Replies
Boosts
Views
Activity
Sep ’24
Reply to Handling Main Actor-Isolated Values with `PHPhotoLibrary` in Swift 6
This works in my code: try await PHPhotoLibrary.shared().performChanges{@Sendable in ... } but be sure to only capture sendable values in the closure.
Replies
Boosts
Views
Activity
Sep ’24
Reply to Runtime race condition warning when calling PHPhotoLibrary.shared().performChanges async
If someone later finds this, the following worked for me performChanges{@Sendable in ... } I had the same problem again later with PHImageManager.requestAVAsset{}, the solution is the same.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’24
Reply to Black frames in recorded videos
I had a similar problem in recording video from the camera. I had to add the AVCaptureMovieFileOutput to the capture session right after setting up the AVCaptureDevice. When the user pressed the record button at a later time it worked without black frames. But when I did set up the AVCaptureMovieFileOutput only after the user pressed record I got black frames at the start of the recorded movie. Does anyone know what is the problem here?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to Data update issue when both parent and child views are @State in SwiftUI
This is „expected behaviour“: https://samwize.com/2024/05/08/do-not-init-state-externally-in-swiftui-view/
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to ShareLink does not offer "save to files" when sharing "Transferable" items
This still does not seem to work in iPadOS 18 beta 1. What am I doing wrong?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to Make background of VideoPlayer clear
Perhaps I misunderstand your question, but the way I see it: There is nothing „silly“ about this behaviour, because the "background" is part of and encoded into the video. Is there even a standard for "transparent video“? How should the video player know which part of the video you consider "background". If you meant to remove the "black bars" of letterboxed widescreen videos they may also be part of the video or if not, make sure you size the video player to the correct aspect ratio to prevent it from padding your video. (I have not tested this).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24