Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [swift]

Swift is a general-purpose programming language developed by Apple Inc first released in 2014 for its platforms and Linux. Swift is open-source. Use the tag only for questions about language features or requiring code in Swift. Use the tags [ios], [ipados], [macos], [watch-os], [tvos], [swiftui], [cocoa-touch], and [cocoa] for (language-agnostic) questions about the platforms or frameworks.

0 votes
0 answers
16 views

Lagging Video Feed Using VNGeneratePersonSegmentationRequest in macOS Camera Extension App

I'm developing a macOS application using Swift and a camera extension. I'm utilizing the Vision framework's VNGeneratePersonSegmentationRequest to apply a background blur effect. However, I'm ...
Yogeshwar Shelke's user avatar
0 votes
0 answers
39 views

Custom Scroll View Indicator does not animate correctly

I created a custom scrollview indicator that can be dragged but it doesn't work completely right and it's not smooth. It has a few problems: Scroll End does not fire when the scroll view stops so the ...
Ahmed Zaidan's user avatar
1 vote
0 answers
27 views

Swift faster way to retrieve exif data from PHAsset

I'm working on a photos app on iOS, where I have to extract the camera information of user's photos for displaying. The problem I am facing is that the process turns out to be extremely slow and ...
Mev's user avatar
  • 1,583
1 vote
1 answer
50 views

Update values in a dictionary based on changes made to another dictionary

I would like to know if there is a way to automatically update the value in a dictionary based on changes made to values in another dictionary. I have 2 dictionaries as follows: enum ...
Bob's user avatar
  • 192
1 vote
1 answer
44 views

Inheritance and Visibility in Swift

I'm confused about the content in the swift doc: Notice that the initializer for the EquilateralTriangle class has three different steps: Setting the value of properties that the subclass declares. ...
Chen Sam's user avatar
0 votes
1 answer
57 views

change in viewIndex should rerender the view but it does not [duplicate]

what am I missing? This change in viewIndex should trigger rerender of view but it does not. ViewIndex will change the index of user to use for profileView and it will trigger rerendering. import ...
Suh Dongbin's user avatar
-5 votes
2 answers
38 views

How to create a singleton class for amplitude?

I have the following amplitude code that initializes amplitude import AmplitudeSwift let amplitude = Amplitude( configuration: Configuration( apiKey: "YOUR-API-KEY" ) ) ...
Rue Vitale's user avatar
  • 1,767
0 votes
1 answer
31 views

How to generate SymmetricKey from password

I have the following code: public extension SymmetricKey { init?(base64Encoded base64EncodedKeyString: String) { guard let keyData = Data(base64Encoded: base64EncodedKeyString) else { ...
Andrew_STOP_RU_WAR_IN_UA's user avatar
1 vote
1 answer
51 views

Possible to have two different kinds of objects in a SwiftUI selectable List?

in a book club app I'm trying to write, I have a NavigationSplitView which displays a list of readers in a selectable List that gives the user access to each reader's comments on a given book. At the ...
Ser Pounce's user avatar
  • 14.4k
-1 votes
0 answers
18 views

How to only allow users with accounts to login to my app [duplicate]

I am very new to iOS coding and using firebase so sorry if this is a dumb question. I have an app that allows users to create accounts and save their info with firebase. A problem I face is that a ...
user26491948's user avatar
-2 votes
0 answers
14 views

Xcode NSHealthShareUsageDescription error

I keep getting this error but have updated my info.plist code. Help, please. *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'The string "" is an invalid ...
Josh Brooks's user avatar
0 votes
0 answers
67 views

App very buggy when updating published properties

My apps data workflow is causing the UI to be very buggy when fetching more data which causes me to wonder the best practice for storing/displaying/fetching data, the setup I have works as follow: The ...
Ahmed Zaidan's user avatar
-2 votes
1 answer
18 views

Xcode tests missing success/failure icons

I seem to have an odd bug in Xcode that I can't seem to fix. When I run tests, the tests seem to run (the console gives a report), but the test doesn't show the green success checkmark or red x ...
Martin's user avatar
  • 1,640
1 vote
0 answers
21 views

Setting Audio Input node for AVAudioEngine causes outside audio to stop

I'm building an app that will allow users to record voice notes. The functionality of all that is working great; I'm trying to now implement changes to the AudioSession to manage possible audio ...
narner's user avatar
  • 3,187
-2 votes
1 answer
66 views

Escaped Double Quote in Swift breaking JSONDecoder decode

If you open a play ground and paste this code, you'll notice that the decoded object is nil. The JSON object [{"transcript":"A person might say, \"Hello\"."}] passes any ...
Saamer's user avatar
  • 4,969

15 30 50 per page
1
3 4
5
6 7
13