RD
RD
TSDThe Swift Den
Created by Te >.< on 1/22/2024 in #swift-development
Questions about structuring xcode projects
Since Xcode uses virtual file structure, for a long time the convention was "dump everything under the sources folder and assign groups in project up to your liking". Other obvious rules are: - follow bundle structure - keep view/viewcontroller/xib together - put sources one level down so the supporting files are easy to find at the top level
2 replies
TSDThe Swift Den
Created by evolv on 1/10/2024 in #swift-development
Xcode XML problem
If it's a file issue - revert using git If it's a view issue - right click -> view as -> your choice
2 replies
TSDThe Swift Den
Created by Gabecompsci on 12/31/2023 in #swift-development
i can’t type into my xcode console #cplusplus
It also might be the case you're not requesting an input the correct way. If the solution above didn't work, it would help to see some code
7 replies
TSDThe Swift Den
Created by Gabecompsci on 12/31/2023 in #swift-development
i can’t type into my xcode console #cplusplus
You can turn input on (it should be on by default though) or make your app run in proper "smart" terminal (instead of xcode console) by adjusting your scheme name of your project on the top -> edit scheme -> options : console (at the bottom)
7 replies
TSDThe Swift Den
Created by Rohith on 1/10/2024 in #swift-development
how to fetch data for every 5 seconds?
To make your code run repeatedly with intervals you can use any kind of timer (Timer, DispatchSourceTimer, or even for with Task.sleep) To make your app run in background you can use background tasks (https://developer.apple.com/documentation/uikit/uiapplication/1623031-beginbackgroundtask) Note that running in the background indefinitely is only allowed for certain kinds of apps with certain purposes, and monitoring user activity usually not considered a worthy purpose. Also note that waking up the device and starting making an internet request every 5 seconds will probably affect battery you're measuring
3 replies