All Questions
60 questions
-2
votes
1
answer
78
views
SwiftUI Preview Error for "New build system required"
My Environment is:
Xcode 15.0
Swift5
Minimum Deployments: iOS 13
My project is UIKit, but when I use SwiftUI file, I get an error is "New build system required", how to fix it?
I can't find ...
0
votes
0
answers
37
views
Showing a View after the 'Button' is pressed
I am designing a simple iOS application that performs a few simple calculation then presents the results on a second View.
The views are:
ContentView
ResultsView
In the previous days of Xcode, one ...
0
votes
0
answers
150
views
Is it possible to update String Catalog file dynamically?
I am trying to localise my app using String Catalog, the problem I am facing is all the strings(label/button title) are downloaded from the server. For e.g their is a label which has the text "I ...
0
votes
1
answer
126
views
How do I reference a 'shared' static property from a non-isolated context?
I am working on a map app in Xcode 15.4.
Everything works except when I reference the @MainActor class LocationManager {} in the private var locationManager
I get the following error:
Main actor-...
1
vote
1
answer
235
views
Formatted strings with arguments in Xcode 15 String Catalogs
How can I use a formatted string with arguments in Xcode 15's string catalogs?
For example, if my string is showing a percentage "\() %%" (example rendering: "25 %") and I've given ...
1
vote
0
answers
58
views
SwiftUI: Close popover sheet return me to unexpected destination
I am developing an ios app using swift.I am on xcode 15.3 now
I have a problem with NavigationView
Let's say my app have 2 pages (page A,page B) and a popover sheet C
I wrapped my whole app with ...
1
vote
0
answers
112
views
Crashed: com.apple.network.connection EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000d25b5b890
i have strange crash on OS version: iPadOS 17.1.0 ,i can't reproduce.
Crashed: com.apple.network.connection-208
0 libobjc.A.dylib 0x3150 objc_retain_x23 + 16
1 Network ...
0
votes
1
answer
151
views
How to get snippets using Xcode Trailing Closure Syntax instead of parameters?
I've seen other posts in reddit and StackOverflow asking for the same, and accepted answers claim that pressing enter gets the job done, but I don't seem to get it working?
Xcode: Version 15.4 (15F31d)...
-1
votes
1
answer
113
views
How to move ZStack from bottom when View is presented SwiftUI iOS 17.4?
I'm trying to show ZStack with animation from bottom when View is presented on screen.
Code below doesn't work.
I'm new and I don't know what is wrong with this?
Where the withAnimation should be, and ...
1
vote
0
answers
308
views
How to remove bottom and top padding from SwiftUI List in Xcode15
I'm trying to remove the default padding top and bottom added by the list in SwiftUi. I have a list that shows the tasks to be completed. Padding top and bottom is added by default when i created the ...
0
votes
0
answers
31
views
NavigationLink not storing the previous state in SwiftUI (for mobile app)
I need to implement the below scenario:
When user is in mainPage view and types the input and clicks it, it calls the viewModel.selectItem function and that will in turn call the API from the backend ...
0
votes
2
answers
344
views
Confusion with correct way to call Observable?
I am seeing that there may be two ways to call a Class from other Views or Models.
The following is what I have created:
import Foundation
import Observation
@Observable
class User {
var ...
0
votes
1
answer
159
views
SwiftUI code runs in the simulator but app does not appear in the simulator's home screen
The following simple SwiftUI code runs in the Xcode simulator. As soon as it appears, I hit Shift-Command-H to go to the Home screen. The app (which I have named TestApp) does not appear in the Home ...
1
vote
0
answers
151
views
Core ML model class not getting generated in App Playground Xcode
I am trying to use the SqueezeNet coreML model, but it says that model is not part of any target and to add the model to a target to enable the model class generation. I can not add it to a target ...
0
votes
0
answers
164
views
The operation couldn’t be completed. User has denied activities for this target: What does this mean? (SwiftUI)
I'm trying to run Live Activities and Dynamic Island activities on my actual iPhone 15 Pro Max (Not the simulated iPhone). However, when I run the app, I get the error The operation couldn’t be ...