All Questions
2,418 questions
0
votes
0
answers
18
views
Multiple Product Names Breaking SwiftUI Canvas [closed]
I have a SwiftUI project set up with xcodegen with multiple schemas. After adding different product names to each of the schemas in the xcodegen project file, the SwiftUI canvas no longer works. The ...
0
votes
0
answers
53
views
Swift animation issue for creating a view pager
I have created a view pager and for showing a simple image banner but the issue is the animation is not working properly.
the issue is the transition b/w image 0 to image 1 is very fast without a ...
0
votes
1
answer
55
views
SwiftUI Text vertically centered on iPad & offset on iPhone
I’m using a LaunchScreen.storyboard with a centered label, where the text is vertically aligned to the center of the superview. I want to recreate the same layout in SwiftUI, so that after the launch ...
1
vote
0
answers
82
views
SwiftUI: The compiler throws generic error for every single syntax typo
Whenever I have a basic syntax typo in my SwiftUI code, I get this compiler error.
The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into ...
1
vote
2
answers
106
views
How do I conditionally compile swift based on swift version and target SDK?
I want to be able to conditionally compile blocks of swift code based on the version of the swift language and the version of the target SDK used by the build system. I have no control over the user's ...
0
votes
1
answer
57
views
How to avoid clipping of .popover content close to bottom screen edge?
I would like use .popover with .presentationCompactAdaptation(.popover) in an iPhone iOS 16+ app. This shows the popover not as sheet but as real popover not only on iPad but on iPhone as well.
While ...
1
vote
0
answers
62
views
SwiftUI Preview Fails to Load While Project Builds and Runs Fine: Alamofire Module Map Issue
I'm having an issue specifically with SwiftUI previews in my iOS project. The project builds and runs fine on devices and simulators (in Rosetta mode), but SwiftUI previews fail to load in both ...
0
votes
1
answer
43
views
Why is .transition not applied on SwiftUI Text view when text (and ID) change?
In the following example the text and with it the ID of the Text view changes, when the button is tapped. So SwiftUI should treat the Text view as new view due to the updated ID, should it? So why is ...
1
vote
1
answer
57
views
How to position SwiftUI view relative to other view
I would like to position a Text view horizontally centered in a VStack (easy, since this is the default) and then show another Text on the right side next to the first view. The .firstTextBaseline ...
0
votes
1
answer
41
views
CoreData in framework crash when using Preview
I have a project with 3 targets:
main application
an extension
framework (with coredata management for sharing with main app and extension)
I set App Groups for main app and extension.
When I trying ...
1
vote
1
answer
40
views
SwiftUI Localization of interpolated strings in a Framework with LocalizedStringResource
I'm working on a SwiftUI iOS app that uses a custom framework I have created to be able to share code with an app extension.
In that framework I've created a CustomError enum with a message parameter ...
-1
votes
1
answer
59
views
Why does every item create an new TabView? [duplicate]
Every element in my SwiftUI code becomes its own TabView. It is not on one side how i want it. Every item is spread on another TabView.
I tried asking Chatgpt. He thought i gave every item its own ...
0
votes
0
answers
34
views
HealthKit permissions always report "Not Authorized" and "Modifying state during view update" error
I'm working on an iOS SwiftUI app that uses HealthKit along with Firebase, Calendar, and other managers. However, I'm encountering issues when checking HealthKit permissions. My logs show that even ...
0
votes
0
answers
42
views
LPMetadataProvider causes crash when used in a Swift Package, but works fine in the main app
I am encountering an issue where using LPMetadataProvider in a Swift Package causes my app to crash. However, when I use the same code in the main app (where the @main attribute is), it works ...
0
votes
0
answers
59
views
Adding custom document icon for document based Mac OS 16 App
Starting with Mac OS 16, Document Icons can be generated by defining a background and a Foreground element (see Apple Documentation).
I've defined the mentioned elements in my Assets and in the info....