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

<unknown>:0: error: could not load the swift standard library

Hello, I am trying to get started on swift with windows 10, and I had downloaded the windows development pack and am using VS code. ```swift import Swift ...

WatchConnectivity won't work. Unreachable

The app is installed on both iOS and watchOS, but it won't show session.isReachable = true even after I activate. I've tried what feels like everything including running a number of solutions folks have posted online and on github.

MusicKit systemMusicPlayer.nowPlayingItem always nil?

I've already made sure to add the privacy requirements to Info.plist and have checked my phone's settings to ensure that the app has access to Media and Music libraries. Anyone have any experience solving this?...

I need help :(

Hello, I'm new to Swift and I have a problem. When I press the button it is supposed to show a search bar which contains a list but from "ContainView" it shows me nothing
No description

Clipped and small List in Sidebar

Hello, all. I made a SplitView with a List in the sidebar, but the List is TINY in the sidebar for some reason (see attached image). Why is the List not taking up the full size of the sidebar area? Why is it so small? Thank you! ``` struct ContentView: View { let assets = Assets(textures: [.init(id: "ColorMap", width: 1024, height: 1024, format: "png")]) ...
No description

Metered Paywall in SwiftUI

I am trying to implement a metered paywall in SwiftUI with the help of StoreKit How can I do that? Any suggestion?...

WWDC 23 Object Capture Framework Error

Hi, was wondering if anyone had tried running the object capture code from the previous WWDC event from "https://developer.apple.com/videos/play/wwdc2023/10191/#:~:text=To%20capture%20all%20the%20details,your%20object%20from%20all%20angles." I tried but keep running into a framework linking error during runtime, dyld[1164]: Symbol not found: _$s21DeveloperToolsSupport15PreviewRegistryPAAE7previewAA0D0VvgZ Referenced from: <9D4B3941-AF10-3958-8EAD-5BB02CC40CA2> /private/var/containers/Bundle/Application/CDF2A484-0A6B-49D4-B6D2-061EA4124AAB/ObjectCapture.app/ObjectCapture Expected in: <0BD6AC59-17BF-3B07-8C7F-6D9D25E0F3AD> /System/Library/Frameworks/DeveloperToolsSupport.framework/DeveloperToolsSupport. SETUP: ...
No description

Cordova ios plugin in swift (FFmpeg)

Guys, So I have to add ffmpeg to my cordova plugin project as for android part was easy and done. Now I have two problems, First, how do I really add it to my project in plugin.xml as using framrwork with podspec shows error and as deprecated. ...

BottomSheet Problems

I am working on a bottom sheet for my code using the built in functionality of .sheet. Is there a way for you to disable the initial animation where it comes from the bottom and just have appear on screen when you open up the view. The video I have attached in the description better highlights my question. When I open up the view, there is a second or so delay before you see the bottomsheet, I want the sheet to appear instantly when i open up the view and when I hit the back arrow, I want the bottomsheet to disappear. @State public var isSheetPresented = true...

Custom Label and OOP

I added a photo as an example of "how we can initialize and assign properties" so I wonder If can do the same thing for Labels to assign their value by myself?...
No description

I'm having a stroke with CGEvents and simulated input - please help

Anyone here happened to mess with the Quartz Event Services API ? I'm having a hard time trying to simulate input to a particular app. My goal is to achieve a simulated click input at any coordinates in a target app's window, if possible even if it is in the background (not foremost). The purpose of this is to have an automated custom routine running on an app in the background without hindering mouse movements and clicks. ...

NavigationStack with path initializer giving me "No exact matches in call to initializer "

My code: ```swift struct ListView: View { @State private var presentedViews: [DayView] = [DayView(date: "March 23")] ...

market demand/supply

Is there more demand for swift developers and not as much supply? I’m a web dev with mainly MERN trying to make myself more competitive in the market so I was thinking native iOS is a good route anyone here in the field and have first hand experience with hiring practices etc?...

Cannot show Automatic Strong Passwords for app bundleID: io.blinqpay.blinqpost

i did a firebase user authentication and got the above error in the console, i have enabled keychain but the error is still showing. Kindly see the attached screenshots.
No description

Xcode 14 Archive Failed with "Command SetOwnerAndGroup Failed with a nnonzero exit code"

Hello guys, I'm developing the Driverkit on Macos 13 with Xcode 14. As Apple new terms to distribute the applications, I think that I have to archive my project with Development profile and notarize it. I can Build it successfully but always archive failed with the same error code, even if I use command to change owner group or mod 777. How to deal with it ? I'm totally no idea 😦 Or some how to distribute Driverkit Application with Develope ID application profile in Xcode14 later. Thanks....
No description

help in animating table view once

Hey guys I am trying a fade animation on table view, the table view rows are supposed to render one after the other while fading in ```swift func animate( cell: UITableViewCell, index: Int) { cell.alpha = 0...

Custom Font not working

I added a custom font named Lemon-Regular, its a ttf file and I made sure that the project is checked in the font's target ownership and that it also occurs in the resources in build phases. The code doesnt throw up any error but the font itself is not being rendered. This is my code ```swift Text(text) .font(.custom("Lemon-Regular", size: 24)) .frame(width: 200, height: 50)...

init(coordinateRegion... was deprecated in iOS 17.0: Use Map initializers

i'm doing the basic SwiftUI tutorial https://developer.apple.com/tutorials/swiftui/creating-and-combining-views#Use-SwiftUI-Views-From-Other-Frameworks, and I got this error: 'init(coordinateRegion:interactionModes:showsUserLocation:userTrackingMode:)' was deprecated in iOS 17.0: Use Map initializers that take a MapContentBuilder instead. What should I do? I don't know how to use Map initializers...
No description

resources

Anyone have any recommendations for courses of YouTuber to follow to pick up swift?

Swift compiler error

Hi devs, The minimum deployment target set in my project is ios 14.1. I am trying to run it on xcode 13.2. When I run the project, I get this error during build time. Module compiled with Swift 5.4.2 cannot be imported by the Swift 5.5.2 compiler.....