Category "swift"

How to programmatically segue after successful authentication with Firebase?

I'm just starting to code with Swift and I need help! I have authentication with firebase with email, I would like that after this login to show another view co

How to resolve expected declaration error in swift?

I am new to swift and am trying to build an app. I am receiving "Expected Declaration" error on Xcode when I type the following code. .edgesIgnoring

realm swift - filter objects with a property that starts with a string included in a list

I have a list of strings filterList = ['x0', 'x1', 'x2'] My object is as follows: class Item: Object { @Persisted var name: String? } I want to get all obj

xcode does't generate .h file for swift framework project?

I created a framework writting on pure swift , but I cant find any .h file of public class . shouldn't Xcode generate .h file automaticly? here is project struc

NumberFormatter and unsigned with UInt64.max

I'm trying to create a string representing UInt64.max using NumberFormatter. Here's the code: let formatter = NumberFormatter() formatter.usesGroupingSepar

SwiftUI - How to center a component in a horizontal ScrollView when tapped?

I have a horizontal ScrollView, and within it an HStack. It contains multiple Subviews, rendered by a ForEach. I want to make it so that when these Subviews are

SwiftUI toolbar text size changes on appear

Related to this I am trying to make an app based on Notes app. I set my iPhone text size to the smallest, and when the view changes, the texts on new view's to

How to use UserDefaults inside a swift package that can fetch data from main Swift codebase?

I have a package (say, "PackageDemo") that is imported inside my application (say, "ApplicationDemo"). I have some methods in PackageDemo that needs data to be

How to use UserDefaults inside a swift package that can fetch data from main Swift codebase?

I have a package (say, "PackageDemo") that is imported inside my application (say, "ApplicationDemo"). I have some methods in PackageDemo that needs data to be

Problem with Firebase Firestore when calling on App Delegate swift

I want to make a firestore call every time the app launches. but the line of accessing firestore or the completion is not being executed. class MoodAnalysisFire

Change default StackView animation

Forgive me if explanation is not excellent. Basically, the video below shows the standard animation for hiding labels in a stack view. Notice it looks like the

How to load image from photos using new PHPicker in iOS programmatically?

I want to select an image from photos using new PHPickerViewController and I want to open PHPicker directly when my controller is load. Like this import UIKit

Is an Apple OS airdrop bot possible?

Is it possible to create an Airdrop bot that sends a picture automatically to nearby Apple devices? Like I choose the picture, turn on the bot, and go to a publ

Why Mapbox Navigation Map is showing black in iOS app?

I am using Mapbox Navigation SDK for iOS in my app but it is showing black. I have no idea why it is happening so. Can anybody give any idea please? Map doc ref

Twitch login | Swift

i need to implement the Twitch login in swift app with implicit-grant-flow I think i should use this Authenticating a User Through a Web Service from apple for

UICollectionView compositional layout supplementary crash

I want to add separators on list-like collection view built with compositional layout. I know there is a solution in iOS 14, but I support iOS 13. I try to add

SceneKit – Two SCNFloor in a single scene

I have made two mirrors using SCNFloor in SceneKit. But when I run the code, only one of the two mirrors work randomly. Why is that so? Hope someone can enlight

self is not available in swift project

I am trying to run an image comparison in swift. However i am getting an error that states Cannot use instance member 'featureprintObservationForImage' within p

Parse external JSON using Firebase Functions

I just started using Firebase a couple of days ago for my mobile app, so I’m sorry if this might come off as a stupid question, I’m still learning :

View is not updated when the data is changed with ForEach

I want to change rate parameter and display in ForEach. // ViewModel.swift @MainActor final class ViewModel: ObservableObject { let serviceContainer: Servi