Category "swift"

Code Signing issue when Archiving using Fastlane in Github actions

Recently we have migrated all of our iOS projects from GitLab to GitHub. However when we are trying to build the code using GitHub Actions(Fastlane) In our self

Expand SwiftUI button tap area over the button frame

I read a similar question about that issue. But that only expand the button size use .padding(). The red region in the snapshot is the tappable area. The trai

How to enable iOS time-sensitive notifications switch in app settings?

I am working on changing types of notifications in my app to time-sensitive and active on iOS 15+. I noticed that if I go to iPhone settings -> Notifications

Evaluate String expression in Swift just like javascript eval

I am getting dynamic conditions through API to apply in the application. It could be any logical expression. The task is to run all the condition received in mo

Convert [String: Any] to [String: String] in swift

How to convert a [String: Any] to [String: String] in Swift. I've tried to cast like this, but it didn't help: for (key, value) in dictionary { dictionary[

Beginner in Realm Swift - How to instantiate a new Realm in SwiftUI

I have a class DataEntry that I want to store instances of in a Realm database, but i'm having issue instantiating a Realm. Here is my DataEntry class: class Da

iOS MapBox fit camera to multiple coordinates [latitude and longitude] or annotations

in MapBox documentation for android there is LatLngBounds, but for iOS there are nothing, is there any way todo it for iOS

Why there's no Int Index for Set struct in Swift?

I know that Strings in Swift don't have Int indices as Swift supports Grapheme Clusters. But, when coming to Collections in Swift, Array supports Int indices bu

EXC_BREAKPOINT with very large line number value in crashlytics swift/ios

I am getting a worrying amount of EXC_BREAKPOINT crashes in crashlytics for my iOS swift app. I tried fixing the bug by looking at the method 'populate(user:wi

Swift String variable

//First way var myVar: String = " Hello" print(myVar) //Second way var str = "Hello" print(str) I get the same output no matter which of the two I use. What's

Swift to Arduino using serial

For my school project, i want to create a MacOS application that communicates with my Arduino using a serial connection. I tried 2 different library (SwiftSeria

Comparing non-optional value of type 'Bool' to 'nil' always returns true

I have an if-else statement where I am checking if the value coming from user defaults is nil or not like this: if defaults.bool(forKey: "abcd") != nil{

Circle in SwiftUI doesn't show in my iPhone

I have two Circles to show a circle progress bar, one of these is the progress the another one is the background, but the progress circle doesn't show in my iPh

Session sharing is not enabled | Swift

I am currently trying to show Routes in my app, but I get [UserSession] maps short session requested but session sharing is not enabled in the console. I separa

SwiftUI - is it possible to get didSet to fire when changing a @Published struct?

I have just updated to XCode 11.4 and some of my code has stopped working. I have some @Published struct variables in an ObservableObject. Previously, when I up

SwiftUI Binding default value (Argument labels '(wrappedValue:)' do not match any available overloads)

In Swift you can define default values on a struct that can be overwritten on initialization: struct myStruct { var a: Int = 1 } var instance1 = myStruct()

SwiftUI Drag and Drop files

I am trying to add a "Drag and Drop" gesture / function to my SwiftUI Mac application. I want to drop files from my System/ Desktop into my Application. It is

Can I use actors in Swift to always call a function on the main thread?

I recently saw that Swift had introduced concurrency support with the Actor model in Swift 5.5. This model enables safe concurrent code to avoid data races when

FirebaseMLNLTranslation model files not found

I am adding a translate text feature to my app. I have the text and run the initial setup, but this error keeps coming up. error: Error Domain=com.firebase.ml

SwiftUI List inside ScrollView

I want to make my List inside a ScrollView so that I can scroll List rows and headers together. But I found that List inside ScrollView isn't working. It shows