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
252
1w
Apple Enrolment Program
Hi team, I am trying to enroll my company, in the Apple Developer Program - I am repeatedly receiving a rejection from Apple’s system. It shows in review and when I continue to enrollment, nothing happens. It submits as a new request. I have: ✅ Verified my business name and address with D&B (matches exactly). ✅ Checked that my business is a legal entity (LLP). ✅ Ensured all details match across D&B, UPIK, and Apple’s lookup tool. ✅ Attempted re-submission multiple times without success. However, despite these steps, I am still unable to proceed. Please help.
0
1
191
4d
iOS 18.1-18.3 Bluetooth is not working (infinity restarting)
The Bluetooth on my iPhone 14 hasn’t been working for a week now. Everything was fine until, at some point, it started endlessly turning on and off by itself. I’ve tried resetting the settings, doing a hard reset, updating to iOS 18.3—none of these helped. I even deleted all VPN profiles just in case (I saw this suggested on forums), but that didn’t work either. According to forums, this bug has existed since September and affects thousands of people. The constant cycling causes the Bluetooth settings to freeze. Please help! My watch, headphones, car—everything has turned into a pumpkin!
1
0
508
Jan ’25
How to use donated users in your application and display Siri recommended users in Safari's system sharing
The following is my code, which runs successfully and is recommended to succeed, but it still does not show Siri's suggestion to users in the system sharing in Safari import AppIntents import Contacts import CoreSpotlight import Intents import UIKit class TestViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = UIColor.white DispatchQueue.global().async { self.donateMessageInteraction(recipientName: "张三", phoneNumber: "+8613812345678") } } func donateMessageInteraction(recipientName: String, phoneNumber: String) { INPreferences.requestSiriAuthorization { status in guard status == .authorized else { return } // 1. 创建接收者 let recipientHandle = INPersonHandle(value: phoneNumber, type: .phoneNumber) let recipient = INPerson( personHandle: recipientHandle, nameComponents: nil, displayName: recipientName, image: nil, contactIdentifier: nil, customIdentifier: "com.yourapp.recipient.\(phoneNumber)" ) // 2. 创建发送者(你的应用身份) let senderHandle = INPersonHandle(value: "15210639372@163.com", type: .emailAddress) let sender = INPerson( personHandle: senderHandle, nameComponents: nil, displayName: "我的应用", image: nil, contactIdentifier: nil, customIdentifier: "com.yourapp.sender" ) // 3. 创建消息意图 let intent = INSendMessageIntent( recipients: [recipient], outgoingMessageType: .outgoingMessageText, content: "最近怎么样?", // 常用消息内容 speakableGroupName: nil, // 群组名称(一对一设为nil) conversationIdentifier: "com.yourapp.conversation.\(phoneNumber)", // 唯一会话ID serviceName: "My Chat Service", // 你的消息服务名称 sender: sender, // 发送者身份 attachments: nil ) // 4. 配置意图参数 intent.setImage(INImage(named: "user0"), forParameterNamed: \.sender) // 5. 创建并捐赠交互 let interaction = INInteraction(intent: intent, response: nil) interaction.direction = .outgoing interaction.donate { error in error.map { print("捐赠失败: \($0)") } } print("捐赠代码执行完成") } } }
0
0
252
5d
iPhone 16 Pro boot loop with iOS 18.4 beta
I installed iOS 18.4 on Friday evening, all worked well during Saturday and Sunday, Monday morning the Phone rebooted and appeared to have installed an Update, I didn´t notice, I was about to answer a WhatsApp and the TestFlight beta didn´t start up, a renew of the App was not possible due to TestFlight not being available. So I thought a reboot would help, but I did a reset, since then BOOT LOOP. I brought in recovery mode, updated with the 18.4 ipsw, no change - BOOT LOOP
1
0
246
1w
Touch ID
Hi Apple.I‘m currently using iPhone SE2 and Today I damaged my Finger with which I’m using Touch ID and now I cannot get access to password even I cannot delete fingerprint because I need to use my finger to delete fingerprint. Please help
1
0
169
6d
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
304
1w
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
266
1w
Watch series 6 beta 11.4 issue
I updated my Apple Watch Series 6 before Apple withdrew beta 11.4 as an option. I see on forums that I am not alone with this issue. Many series 6 watches are now stuck in a boot loop. I hope Apple can resolve the issue for those of us that pushed the update to our watches before the issue was identified. Support were unable to assist.
0
0
235
1w
18.4 Beta sent iPhone 12 into boot loop
I installed the iOS 18.4 developer beta on my iPhone 12 last night, and it ended up sending my phone into a boot loop—at least that's what it looks like. Phone alternates between totally black screen and the Apple logo screen every 5 seconds or so. The phone isn't responding to force restart, isn't showing up in Finder to try to factory reset, etc. My guess is the update was corrupted in some way? Did this happen to anyone else? Any ideas about what's going on?
2
1
552
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
192
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
197
1w