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.
swift
334,735
questions
0
votes
0
answers
6
views
Limitations about Indexed Items for Spotlight with CSSearchableIndex and Performance?
Is there a limit for number of items (CSSearchableItem) in Core Spotlight CSSearchableIndex in iOS 9?
According to this topic, the number of indexes I can add is 32767.
Won't there be performance ...
0
votes
0
answers
17
views
An iOS application crashed or was closed, how do know which screen was last viewed by the user?
An iOS application crashed or was closed by the user or closed because the device has no battery, how I retrieve the information for which screen was last viewed by the user?
I want to save this ...
1
vote
0
answers
10
views
Issue with Dequeuing Custom Cells in Main Storyboard
I'm encountering an NSInternalInconsistencyException when trying to dequeue custom cells designed in XIB files in my main storyboard. The error message is:
unable to dequeue a cell with identifier ...
-1
votes
0
answers
15
views
How should SwiftUI accessibiltyActions be announced in VoiceOver?
I'm trying to add accessibilityActions to specific views in an app I'm working on for a client.
I'm using the accessibilityAction(named:) viewModifier. I can't share the client code, but it's ...
0
votes
0
answers
13
views
OSLog sometimes shows error instead of including string
Logger().fault("Example: \(myStr, privacy: .public)")
Why do I get the following instead of the contents of myStr sometimes? myStr looks fine in the debugger and not like this.
Example: <...
2
votes
1
answer
26
views
How can I identify and delete dead code in Xcode Swift
Is there a way to get Xcode to show a warning/error for unused functions and properties?
I have some dead dummy code left over from refactoring but no way to easily identify and delete it.
I'm in a ...
-1
votes
0
answers
12
views
I want to create a feature on my ipa which allows people to go onto the files of the ipa and import their own .json file which appears in the app
I don't know how to do this
I have not tried anything yet, I don't even know where to start to be honest I am new to coding and was curious to see how this would work, if someone can put me in the ...
0
votes
0
answers
37
views
View in infinite creation loop
In my app, the navigation should be ArmyListView -> ArmyListDetailsView -> IncludedUnitScreenView
My ArmyListView screen creates a NavigationStack and moving on to the ArmyListDetailsView works ...
0
votes
0
answers
9
views
Keyboard Extension Input Field Not Working
I've been working on a custom keyboard extension and encountering an issue where I can't input text into the Custom TextField. Even when the TextField is selected (indicator is on), the input still ...
0
votes
1
answer
24
views
Get the bounds of overflowing objects to shrink to parent view
I'm making a representation of the unit circle and I have the point labels arranged in a circle. I know the origin of the labels are at the center, so they overflow the parent.
Whats the best way to ...
0
votes
0
answers
13
views
After adding Notification Extension, my apple pay and push notifications for fastlane stopped working
I am using fastlane to create and submit an application to testflight. Everything worked until I added Notification Content Extension and Notification Service Extension. Now apple pay and push ...
0
votes
0
answers
11
views
Live Activity not workin on Simulator
Live Activity isn't working on the iOS 17.5 Simulator but works on a physical device. When I first close the app, it updates once, but then nothing updates anymore.
Supports Live Activities - YES
...
0
votes
0
answers
11
views
CMAC with Swift OpenSSL 3 fails at init
I'm trying to compute a CMAC using OpenSSL 3 EVP_MAC APIs in Swift, and I am stuck at the EVP_MAC_init call, which always fails. I've tried many different combinations, without success.
If anyone ...
0
votes
2
answers
52
views
Swift not using initialiser when creating a view
I have a specific SwiftUI View that I am using to add and edit variables. When I add the variable, I call the view using this:
Button(action: {
showingDeviceManager.toggle()
}, label: {
Text(&...
-1
votes
1
answer
25
views
Gradient layer on UiView
I am trying to provide gradient layer to the View on created XIB. I have to give gradient colors with combination of 5 colors. But unfortunately gradient is not working.
These are colors array:-
let ...