Apple Developers

RSS for tag

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

Learn More

Posts under Apple Developers subtopic

Post

Replies

Boosts

Views

Activity

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
378
Feb ’25
Payment for membership in the app
Hi!!! I can't publish the app as I have a paid membership through Stripe. I have a wordpress site and have a paid membership to access the content... The app is geared by a third party service and I can't put any code into it... What can I do? There is an idea that in the application to display a link to the site where to place the payment for membership... Please advise, I'm not the first to face this....
0
0
97
May ’25
RxSwift Driver got fatal error in Swift Testing because it is not called form main thread.
Hi, I'm trying the new Swift Testing instead of XCTest for my new project. I am using RxSwift+UIKit. And when I am trying to test my ViewModel that has a Driver in it, it crashes due to the driver is not being called form main thread. Thread 5: Fatal error: `drive*` family of methods can be only called from `MainThread`. Here is the test code: struct PlayerViewModelTest { @Test func testInit_shouldPopulateTable_withEmpty() async throws { // Arrange let disposeBag = DisposeBag() var expectedSongTableCellViewData: [SongTableCellViewData]? // Act let sut = PlayerViewModel(provideAllSongs: { return .just(mockSongList) }, provideSongByArtist: { _ in return .just(mockSongList) }, disposeBag: disposeBag) sut.populateTable .drive(onNext: { expectedSongTableCellViewData = $0 }) .disposed(by: disposeBag) // Assert #expect(expectedSongTableCellViewData != nil, "Should emit something so it should not be nil") #expect(expectedSongTableCellViewData!.isEmpty, "Should emit empty array") } } This never happen in XCTest. So I assume Swift Testing is not being run in the main thread? How do I fix this? Thanks
1
0
148
Mar ’25
ios 18.4.1 internet issues
I’ve recently updated to ios 18.4.1 and I have problems with the internet. Things download painfully slow, an application that used to download in 10 seconds is now downloading in 2 minutes. Videos tend to stop at some point and when i fast forward them it stops to load a little when on the previous version it would work fine. It feels like my internet aged 30 years in 10 minutes. I’ve tried on other phones (not iphones) and it works just fine. Is it from the update or is it just my internet?
1
0
130
Apr ’25
Feature duration
I will give some suggestions and action buttons about dynamic islands on iPhonesAfter dragging and dropping an application or file on dynamic islands, when I switch to any application or site, I can switch to that file or application by holding down the Dynamic Island As for the action button, we can assign features to the action button. A feature like this can come to it. When we press it twice, it will open the camera, when we press it once, it will open the flash. If such a feature comes, it will be easier to use
1
0
57
Mar ’25
Subscribed Calendar Issue
I'm running into issues with iOS respecting the HTTP 410 "Gone" response type. Setup: Using the native iOS Calendar app, add a new subscription calendar. "Add Subscription Calendar" Add the URL of a ICS calendar subscription that you control, e.g. https://mywebsite.com/userfeeds/23/cal.ics Make sure to select the "Account" option and choose "On My iPhone/iPad". Set the query amount to 15 mins. Calendar events show as expected, device queries the latest updates from the server every 15 minutes. Server returns HTTP 200 with the .ics contents. Now, assume there is a need for the feed to end - maybe the user unsubscribed to mywebsite.com. There is currently no way for the mywebsite.com server / response to tell the device the feed has ended and it should stop requesting. If the user forgets to go to calendar and manually unsubscribe the device will continually ping the server every 15 minutes indefinitely. It's turning into a virtual DoS for my platform. iOS should respect the HTTP 410 "Gone" header or something similar. If the server returns a HTTP 410 response code for https://mywebsite.com/userfeeds/23/cal.ics X amount of times, the feed should be automatically removed. I've opened several tickets over the last 3 years and have not even had a status change on the tickets. Does anyone know how to resolve this or a work around?
0
0
190
Apr ’25
Beta Channel Setting Prevents Ventura Security Updates on Older Macs
I discovered an issue where older Intel Macs (like my 2017 MacBook) enrolled in the macOS Sequoia Public Beta do not receive Ventura security updates, even though Sequoia is not compatible with the hardware. My system said “macOS is up to date” while stuck on Ventura 13.7.1, but after switching to the Ventura Public Beta channel, it immediately showed a new update available. This seems like a serious flaw—Apple should warn users or fall back to compatible OS versions when an enrolled beta is unsupported. Has anyone else experienced this? Could be a widespread issue for Intel Mac users still relying on Ventura.
0
0
66
Mar ’25
Apple Developer Enrollment
Hello, I am trying to enroll to apple developer program as solo developer. While trying to enroll via app my passport and drivers license are not validated. When trying to enroll via web, I fill in the details and try to make the payment, but payment itself is not deducted from my bank account. I receive email that payment is being processed, but nothing further happens.
0
0
145
Feb ’25
Edit Permissions | bootps.plist
Hi, I'm trying to figure out how to edit the bootps.plist which is in the system / library directory. I have an M4 MacBook running OS 15.3.2 and I've held down the power button to go into recovery mode, and in terminal entered the 'csrutil disable' command and have restarted but when I go back to 'get info - Sharing & Permissions' I can't change any of the permissions. I need to be able to edit this file to create DHCP server. How can I change edit permissions on the bootps.plist?
0
0
66
Mar ’25
Severe Keyboard Lag in Roblox on iOS 18.4 (Resolves When Low Power Mode is On)
Hi, I’m experiencing a serious keyboard lag issue on my iPhone 15 Pro Max running iOS 18.4. When playing games in Roblox, if I try to type in the in-game chat using the default iOS keyboard, the typing becomes extremely laggy and drops a lot of frames. However, if I turn on Low Power Mode, the issue disappears completely, and typing becomes smooth again. This suggests that the problem may be related to background optimization or system performance handling in iOS 18.4. Open Roblox and start any game with chat input and Try typing in the chat box using the iOS keyboard than Observe serious lag and frame drops and Enable Low Power Mode.The lag disappears instantly. • iPhone 15 Pro Max • iOS version: 18.4 • Keyboard: Default iOS keyboard • Issue only occurs when Low Power Mode is OFF Please investigate this behavior. It’s very disruptive during gameplay and seems linked to performance scaling or system optimization. Thanks! My English is not very good and these are the ones I edited using Google Translate.
1
0
132
May ’25
CoreData error: SQLCore dispatchRequest: no such table: ZAPPSETTINGS. I/O error opening
Issue with SwiftData: “no such table: ZAPPSETTINGS” and SQLite I/O error on app launch Hello, I’m encountering persistent errors with SwiftData in my SwiftUI app related to Core Data’s underlying SQLite database. Despite defining my models correctly, the app fails to initialize the persistent store, throwing the following error on startup: CoreData error: SQLCore dispatchRequest: no such table: ZAPPSETTINGS. I/O error opening database at /.../default.store. SQLite error code:1, NSSQLiteErrorDomain=1. File “default.store” couldn’t be opened. Context The error only appears concerning my AppSettings model. I have another model, LocationPoint, which appears correctly defined and used. I have tried deleting the app, resetting the device, and cleaning builds but the error persists. The error message suggests the database file is present but the table for ZAPPSETTINGS (the Core Data table for AppSettings) does not exist. Code Samples Main App Entry import SwiftData import SwiftUI @main struct Krow3_0App: App { @State private var userLocationManager = UserLocationManager() @State private var geocodingViewModel = GeocodingViewModel() @State private var locationSearchViewModel = LocationSearchViewModel() @State private var router = Router() var body: some Scene { WindowGroup { LaunchView() .environment(userLocationManager) .environment(geocodingViewModel) .environment(locationSearchViewModel) .environment(router) .modelContainer(for: [LocationPoint.self, AppSettings.self]) } } } AppSettings Model import Foundation import SwiftData @Model class AppSettings { var isMetric: Bool init(isMetric: Bool = false) { self.isMetric = isMetric } } What I’ve Tried Fully uninstalling and reinstalling the app on device and simulator. Resetting the simulator/device. Cleaning the Xcode build folder. Verifying the schema logs which correctly list both LocationPoint and AppSettings. Changing model names to avoid potential conflicts. Adding .modelContainer configuration with autosave enabled. Questions Is there a known bug or limitation with SwiftData concerning certain model setups or naming? Could this be related to how the data container initializes or migrates schemas? Are there recommended debugging or migration steps to resolve “no such table” SQLite errors with SwiftData? How can I safely reset or migrate the persistent store without corrupting the database? Any insights or suggestions would be greatly appreciated! Thank you!
1
0
113
May ’25
AR WorldMap Relocalization for Identical houses.
i have a specific requirement as below. i have apartments in which i have 4 units and each unit will be of same layout. furniture etc.. might change but not walls and layout as far as i know. Step1: Now i will enter into one unit, scan the entire unit and save it using RoomPlan Api and at the end of the scan i will be saving the worldmap as well. Step2: i want to use the previously saved worldmap and enter into another unit and want to relocalize with only walls because the furniture might be different. is that possible. if not is there any otherway to achieve this functionality? i really appreciate you valuable time. Thankyou.
5
0
232
Jun ’25
Porting Games Over to Apple Arcade
Hi all, I'm working for a publisher, and we're looking to bring some of our PC/console titles over to Apple Arcade - how viable is this? Is Unity or Unreal Engine easier to port from? Does anyone have any contacts with porting studios who have done this before? Thanks
0
0
50
Apr ’25
MacBook Pro M1 - 15.5 Kernel Panic when waking from sleep
Hi, EtreCheck I could really use some help with this, as I haven’t been able to find much concrete info. I mistakenly updated my MacBook to the 15.5 beta, and while I can’t say with 100% certainty that the issues started immediately after, I’ve been experiencing consistent kernel panics every time the machine wakes from sleep — it restarts completely and throws an error. I’m really hoping this isn’t a hardware issue. The MacBook is just over two years old, and I rely on it daily for work — replacing it right now isn’t an option. Unfortunately, I don’t have a Time Machine backup to roll back to. I’ve already wiped the machine and reinstalled macOS via recovery mode, and Apple Diagnostics isn’t showing any hardware problems. Just to rule it out: I’m not using any external devices — no docks, Thunderbolt accessories, or anything else plugged in. I came across EtreCheck as a recommended tool, and I’ve included the results below. If anyone is able to help interpret them or point me in the right direction, I’d really appreciate it. I’ve since unenrolled from the beta and turned off automatic updates — I’m just hoping this is a beta-related bug that resolves with the next stable release. Thanks in advance for any guidance.
0
0
485
Apr ’25
App Latest version from the App Store
i am using this code public static bool CheckForForceUpdate() { try { Version latestVersion = new(GetLatestVersion()); Version currentVersion = new(AppInfo.VersionString); if (latestVersion != null && currentVersion < latestVersion) { NSUserDefaults.StandardUserDefaults.SetBool(true, StorageKey.IsForceUpdate); return true; } else { NSUserDefaults.StandardUserDefaults.SetBool(false, StorageKey.IsForceUpdate); return false; } } catch (Exception ex) { Console.WriteLine("CheckForForceUpdate....." + ex.Message); return false; } } public static string GetLatestVersion() { try { string appId = "1586153397"; // Replace with your App Store app ID string url = $"https://itunes.apple.com/lookup?id={appId}"; using (HttpClient client = new HttpClient()) { var response = client.GetStringAsync(url).GetAwaiter().GetResult(); var json = JObject.Parse(response); var latestVersion = json["results"]?[0]?["version"]?.ToString(); return latestVersion; } } catch (Exception ex) { Console.WriteLine("GetLatestVersion..." + ex.Message); return null; } } The value of latestVersion should 2.1 in my production app i am not able to get this hence i am not able to achieve Force Update functionality
0
0
65
Apr ’25