This is a dedicated space for developers to connect, share ideas, collaborate, and ask questions. Introduce yourself, network with other developers, and join us in fostering a supportive community.

All subtopics

Post

Replies

Boosts

Views

Activity

multidatepicker and saving multiple dates via swiftdata
Any help will be greatly appreciated. Trying to build a calendar/planner app for public school teachers. Classes are held on multiple dates so there is a need for swiftdata to save multiple dates. There are lots of tutorials demonstrating a multidatepicker but none of the tutorials or videos save the dates, via swiftdata. My goal is to save multiple dates. Step 1 is to initialize mockdata; this is done a class called ToDo. var dates:Set = [] Step 2 is the view containing a multidatepicker and other essential code Step 3 is to save multiple dates using swiftdata. Lots of tutorials, code snippets and help using a single date. But after almost 2 weeks of researching youtube tutorials, and google searches, I have not found an answer on how to save multiple dates via swiftdata. Also, I don't know how how to initialize the array of for the mockdata. Here are some code snippets used but the initialization of the array of DateComponenets doesnt work. And saving multiple dates doesn't work either @MainActor @Model class ToDo { var dates:Set<DateComponents> = [] init(dates: Set<DateComponents> = []) { self.dates = dates } } //view struct DetailView: View { @State var dates: Set<DateComponents> = [] @Environment(\.modelContext) var modelContext @State var toDo: ToDo @State private var dates: Set<DateComponents> = [] MultiDatePicker("Dates", selection: $dates) .frame(height: 100) .onAppear() { dates = toDo.dates } Button("Save") { //move data from local variables to ToDo object toDo.dates = dates //save data modelContext.insert(toDo) } } } #Preview { DetailView(toDo: ToDo()) .modelContainer(for: ToDo.self, inMemory: true) }
2
0
336
1w
SOS
Hi guys, I am looking for some help from anyone very desperate I am being hacked at the system level dealing with Malious 3rd party TVapp Exhibited ksophicisted container based persistence Possible Zero Day exploration Active Network connection to cloud infrastructure resistance to standard removal I did attempt to report to apple security and have not had an update but fear loss of account access even with 2fa since they have ability Currently I can't access internet/wifi(EVEN with ethernet cable) Honestly any help from anyone
2
0
328
1w
First App for Mac (Memory Pro) Node-Based Diagram
Greetings Apple Communithy, Caraveo here, I am attempting to create an node-based diagram app... this is my first app. I am want to create an app that will help me personally organize my career, ideas, and projects. Its a document based app.... that allows users to store files into a .memory extension. For example users will be able to create a file called "myBook.memory" I am attempting to create a work-flow where users can "clone" files into each node. PDFs, Documents, Audio, Video, Media, etc. They can then just work with their .memory file and share it, back it up, manage it... To me this is very important..... it will help me immensely... its a new super simple way to manage your ideas. Please learn more here.... MemoryProApp.com I need a co-coder, alpha testers, and anyone that is interested in working on this project. I am having issues with the file attachements and the documentation saving is failing on me for some reason. Thank you everyone!
0
0
220
1w
Why do I cant download my music?
A month ago I was listening to music in Apple Music but then I saw a song, not anything weird, then I wanted to download it but it took a longer than usual and then an error apeared, I cant upload the picture of the text but it says, "The Song Name / Album / Artist 0% - Stopped (err = -12884)", I uninstall the app and then install it and it fixes, but when i want to enable Lossless Audio, the error appears, the error still aprearing until today and Im tired of uninstalling and installing the app so much times, can anyone help me?
1
0
217
2w
Bundle Display Name Swift Playgrounds
I am attempting to use the AVSpeechSynthesizer to include text to speech in my Swift Playgrounds project, but when I attempt to use it on my IPhone i get the following errors: It works just fine on the simulator, but no audio is produced when I run it on-device. Is there a way to set this "bundle display name" within Swift Playgrounds, or are there any workarounds? My code: import AVFoundation class Speaker { let synthesizer = AVSpeechSynthesizer() func speak() { let utterance = AVSpeechUtterance(string: "Test, I am the speaker") synthesizer.speak(utterance) } }
1
1
249
2w
Playground app on MacOS
Hi! I have a concern for the SSC: I worked on the Playground app, but on MacOS. My app has been developped to be firstly used on a mac, as the playground app let you directly download your app on you mac and act as a real one. When i wanted to submit, I noticed there is nowhere to specify whether your app should be tested on iPad or on MacBook. I saw Playground apps would be tested on an iPad, does it mean I have to refactor my app to work on one, or i can mention on a comment that it is a MacOS app, and should therefore be tested on a mac? Thanks for your help on this
1
0
312
2w
Judge Time About Swift Student Challenge
I have learned that the Swift Student Challenge will be reviewed by judges within three minutes of interaction. What I want to know is whether the three-minute limit is strictly enforced or if there is some flexibility for an extension. This is because I am creating an interactive game with different scenarios, and I need to manage the duration of my game accordingly. I hope to receive your reply as soon as possible.
1
0
332
2w
POSIX 96
I’m having trouble downloading my yahoo emails. I use the Mail function for all my email accounts. The Comcast emails seem to be downloading fine. I get the posix96 error. Is there a fix for this yet??
1
0
223
2w
How to Get Incoming Call Notifications to Create a Phone App in iOS 18.2+?
I am trying to create a phone app that can receive incoming call notifications using CallKit, as described in Apple's CallKit documentation. Added the com.apple.developer.calling-app entitlement in my .entitlements file. Implemented CXProvider and set up the delegate methods (provider:perform: and providerDidReset). Added UIBackgroundModes with voip in Info.plist. Configured CXProviderConfiguration to support phone numbers. I expected to receive incoming call notifications when my app was set as the default calling app. However, I am not receiving any notifications when an incoming call arrives. How can I properly detect and handle incoming calls in my default calling app? Is there any additional configuration required for iOS 18.2+?
0
0
183
2w
Hello.
Dear Apple, I am sending this review to tell you that with my new update. I am not a fan of the photos set up. I find it very confusing and find myself getting irritated very often and giving up after searching for an image… which is frustrating for many reasons including I need my camera roll for work often. please make adjustments with the newest update… please. thank you, if anyone took the time to read this. Ashton, a very sad customer
1
0
216
2w
FocusState Issue with TextFields in ScrollView on iPad (iOS 18.0)
When using a VStack containing two TextFields inside a ScrollView on an iPad running iOS 18.0, the FocusState of the topmost TextField does not trigger, while the second TextField's FocusState works correctly. Adding an invisible TextField on top resolves the issue, but it appears to be a bug specifically in iOS 18.0 on iPads. This issue does not occur on iOS versions below or above 18.0 (including iOS 18.1). Code that is not working struct ContentView: View { @State var text: String = "" @FocusState private var focusState: Bool var body: some View { ScrollView(.vertical, content: { VStack(spacing: 0) { TextField(text: $text) { Text("Hello, World!") } .border(focusState ? Color.red : Color.gray) .focused($focusState) .onChange(of: focusState) { oldValue, newValue in print(newValue) } .onChange(of: text) { oldValue, newValue in focusState = true } } }) .padding() } } Code that is working struct ContentView: View { @State var text: String = "" @FocusState private var focusState: Bool var body: some View { ScrollView(.vertical, content: { VStack(spacing: 0) { // Invisible Text Field TextField("", text: .constant("")) .frame(height: 0) TextField(text: $text) { Text("Hello, World!") } .border(focusState ? Color.red : Color.gray) .focused($focusState) .onChange(of: focusState) { oldValue, newValue in print(newValue) } .onChange(of: text) { oldValue, newValue in focusState = true } } }) .padding() } }
0
0
222
2w
Issue with Developer
I am a startup founder based in India. Recently the iOS developer we were working with left the company in some what acrimonious circumstances. Post his departure from the company, he has made it clear that he will try to cause damage to our iOS app to the extent that it starts to crash. Even though we have removed his access, as a non tech founder, I am not sure what ways he can edit or hamper our iOS app and what measures we can take to protect the same. Please advise us with steps for us to secure our code and ensure no one can edit the same or hamper our iOS app on the app store. Thank you
1
0
156
2w
Bluetooth scan cycle problem
I have the following questions that need official answers: 1: Whether the Bluetooth scanning cycle can be controlled through the software level. If it can be controlled, please tell me how to control it. 2: Now the IOS mobile phone scanning strategy, how long is the scanning cycle, and what is the scanning duty cycle in this scanning cycle
0
0
171
2w
Regarding AR App Submission Built in Xcode - Swift Student Challenge submission
Hello guys, I have a question regarding the submission requirements. My app uses ARKit and requires Metal files for shaders, which are not supported by Swift Playgrounds. Therefore, I developed my app using Xcode. (swift playgrounds returning error for metal file) Since my app relies on a real device for proper functionality, I would like to know if, under these circumstances, the scene build is performed by Xcode. If the build were instead done by Swift Playgrounds, my scene would not function correctly. I'm asking that because of this note Thank you for your time and assistance.
1
0
342
2w