The Swift Den

TSD

The Swift Den

The Discord server for Swift developers. Get tips and snippets for your projects!

Join

swift-development

javascript

python

rust

c-sharp

Need guidance on keyboard management

Hi everyone. Been hitting a dead end with keyboard avoidance issues. I have a view where the user can add a bunch of rows of text fields to the app to type in item names. However, the keyboard extends over it when I add the .ignoreSafeAreas(.keyboard) modifier. If I remove the modifier, everything gets squished into half the view size. I've tried a few other things like GeometryReader and hiding some of the UI elements behind a flag when the text fields focus isn't nil. This solution worked, bu...
No description

Test Driven Swift, anyone?

I just started learning Swift and one of the books I'm working with is related to Test Driven Development. In practice, do you follow a test driven approach? Is this big in the Swift development community or not as common? I'm a Ruby on Rails developer and TDD is expected since Ruby is dynamically typed. I appreciate any opinion, thanks!

Do you know a good SDL2 package for Swift

Do you use Swift with SDL2? If yes how to start?

AVFoundation take photos with camera aspect ratio 4:3

is anyone here who knows how to configure camera for taking pictures (I'm planning to add video capturing ability in a future) in aspect ratio 4:3? I don't wanna crop captured photo, but use camera format (e.g. 1080x1440) I tried setting different session's sessionPreset arguments but it didnt help me, anyway, my target is to capture high resolution photos....

Looking for SwiftUI dev

who can work with me ? I am looking for SwiftUI dev with fullstack experience...

Live activities doesnā€™t get notifications token

Hi everyone, Iā€™m currently learning Swift and Swift UI by myself for my master degree. Since yesterday Iā€™m building a little app to implement Live Activities and Dynamic Island notifications, because theyā€™re to cool to be ignored, but something goes wrong. ...

Volume Rendering in Metal

Hello, I am trying to volume render in metal and I get these artefacts. I suspect they are possibly due to gradient computation (finite difference method), but I've also tried using full 26 neighbors, sobel filter, and can't seem to get rid of these. Your help will be really appreciated....
No description

Swift Micro-Controller

Has anyone I stalled Swift for micro controllers and started using it with ESP32 RISC V or one of the listed supported developers boards. Or has anyone managed to set up Swift Micro controllers SDK to work with ESP32-S3 Development Boards yet ?

I need help !!

What do I do to fix this error
No description

Tracking Fb Meta Pixel in application that targets Kids application

I am trying to track fb pixel from an ios application which is coppa compliant but it is not tracking. Is there anything we can do to make it work

Supported Destination

Is there a way to have mac(designed for iPhone) while keeping iPad It automatically changes when add or remove ipad...
No description

Add a local backup system.

Hello I would like to add a local backup system, does anyone have a source or a site to recommend to me? Thanks...

If you need help, PM me & add me as a friend

Offering free help within reason, additional services relative to AI/ML as i am a NLP Researcher for various groups. I have extensive swift/uikit experience, feel free to pm me and we can work through your problem for a resolution.

Iphone 15 battery

I started using my iPhone 15(base model) in October 2023, and I checked today and saw that the maximal capacity in battery is 92%, I feel like that is very low after such a short time of owning my phone. Iā€™ve had 295 charging cycles. Is this normal? Is there anything that I can do? HelpšŸ˜€
No description

Unable to List Voice Folder

Iā€™m creating a AAC app, and to generate speech output Iā€™m using AV Speech Synthesizer, and Iā€™m brand new to coding. I grew up playing with Scratch and Iā€™ve been working on this for a few months so thatā€™s it, Iā€™m basically clueless. Ever since importing AV foundation and hooking up my speech synthesizer, I run the app on my iPad (Mini 6, iOS 17 something whatever), and get a little message saying ā€œunable to list voice folderā€ I can still generate the TTS, it still speaks my text, but I canā€™t set anything up in my app to make adjustments to the voice- canā€™t select the voice, adjust the rate, the pitch, whatever, it just defaults to what I have set up in my accessibility settings. So I donā€™t know what to do I donā€™t know where this issue is coming from, Iā€™ve tried to find it by googling, tried to get chat GPT to help, itā€™s not happeningā€¦ Iā€™m hoping someone here could help, or if my project sounds interesting enough to you I would love a coding partner so feel free to DM me for more info ...

need help

I wanna make all four characters do the fulFillOrder() function but it only works for one of them. Can anyone tell me how to fix this

Feeling Stuck | Xcode swiftUI Project.

I am building an application that can play two audio files at the same time. chatGPT and I have developed a working prototype. There is much more work to be done. However, as I learn the syntax of the language and understand how to structure data, I am concerned that what I have built thus far will be difficult to expand on later down the road. ...
Next