I'm working with the Apple Watch's acceleration data and have referred to the document Identify the coordinate axes of the device. According to this document, the X-axis points to the right side of the watch, the Y-axis points towards the top side, and the Z-axis points towards the user.
However, when I place the watch on a flat surface and move it horizontally to the right, I observe that the X-axis acceleration is negative. Similarly, when I move the watch vertically upwards, the Y-axis acceleration also shows a negative value.
Is this expected behavior, or am I misunderstanding something about the coordinate system or acceleration readings?
General
RSS for tagDelve into the world of built-in app and system services available to developers. Discuss leveraging these services to enhance your app's functionality and user experience.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello, I am very new to programming with Xcode. I’ve been searching the forums and online but can’t seem to find an answer. My project is not displaying the triangle build button in the left corner, nor the status of the build. No issues with my code are apparent, yet it does not build and preview when I push build and clean in the product tab
Am showing daily screen-time of a user in my app in Device Activity Report Extension. The only way to get that is to sum up all the activityDuration of apps/categories/domains. But it differs a lot from phone's settings screen-time, why?
I have debugged in details and counted manually the time spent on each app and it turned out that the calculation is appearing correctly in my app but Phone settings showing quite less time on top (Day).
Hi there, I'm facing an issue when disconnecting CarPlay that the navigation session seems to be in some weird state where it is not properly finished. So when I reconnect CarPlay the "Metadata in instrument cluster or HUD" does not update anymore until I start another navigation session and stop that one.
You can see that the instruction to the left on this screen recording is not updating anymore after a reconnect.
https://www.youtube.com/watch?v=sncxyJULjQk
I have a modified the CostalRoad sample app to add support for the HUD cluster and to auto start a navigation simulation when CarPlay connects.
https://github.com/g4rb4g3/CoastalRoads
Can anyone tell me what I have to do when CarPlay disconnect so I can start a new navigation session on reconnect that has a working HUD cluster?
Fun fact is that Apple Maps handles this quite nice (https://www.youtube.com/watch?v=OpJEIyGcwdo), it somehow manages to finish the navigation session and brings up the HUD cluster just fine on reconnect.
I wonder how I can achieve the same, anyone having an idea on that?
A large number of crashes were detected in the background when users were using Object Capture
Crash TXT
I am a macOS software developer using Xcode and Objective-C. I have a wallpaper app on the App Store, and recently, a few users have asked if the app can be excluded from the ‘Screen Time’ statistics. Is there a way to allow users to choose whether or not the app should appear in the ‘Screen Time’ tracking? I have already set LSUIElement to YES in the info.plist, but the app is still being tracked in ‘Screen Time.
My app is available in TestFlight but has been rejected in App Review with the review feedback that the app clip "just shows a blank screen".
However, in the TestFlight app, the App Clip works as expected and brings up the clip. It also works correctly from Xcode testing.
Any ideas on what the problem could be? It is using the default App Clip link (appclip.apple.com)
is there documentation where we can find details for historical parameters / limitations - so far i've found that the days limit on single API calls days limit is 7. Any other similar specs would be good to have
Hi all.
Since upgrading to a new iPhone 16 pro, running 18.2 public beta, I'm having issue with my wallpaper/Lock Screen.
If AOD is turned OFF, my lock screen is almost too dim to read, and the chosen Lock Screen wallpaper has a blurred effect on it.
if AOD is ON, the screen is still too dim to read, and the wallpaper is just a faint shade of the colour of the image chosen.
Topic:
App & System Services
SubTopic:
General
Hello,
I'm creating an app that stores multiple Date objects: the users selects a date and a time and receives a notification at this time precisely.
The problem that happens is after saving a Date, if the device's timezone changes, the Date also changes - and that is not what's I'm expecting (just want the original time as is without depending on timezone).
I have inspected the TimeZone properties when I'm building the Date from DateComponents but nothing has worked.
Thank you for your answer.
Callerid name is not being updated in device recent calls when incoming call is received or outgoing call is initiated for a number stored in my app unless phone app is force quit and relaunched. Is there any way to sync or refresh the callerid to be displayed in recent calls even if phone app is in background ?
Topic:
App & System Services
SubTopic:
General
Hello Apple Developers,
I’m developing an iOS app that requires access to the user’s contacts. I understand that starting from iOS 14, Apple introduced two levels of contact permissions:
1️⃣ Full Access – The app can read all contacts.
2️⃣ Limited Access – The app can only access contacts selected by the user.
My Question:
If a user initially grants Limited Access, is it allowed by Apple’s guidelines to request Full Access later?
🔹 I understand that re-requesting permission immediately after the user denies it is against Apple’s policies.
🔹 However, if the user has already granted Limited Access, and we first show an explanation modal explaining why Full Access is beneficial, can we then prompt them to change their settings via openAppSettings()?
🔹 Alternatively, can we use Permission.contacts.request() again to re-prompt the user for Full Access, or will iOS prevent the permission prompt from appearing again?
How We Handle This in the App:
1️⃣ If a user selects Limited Access, we respect their choice and only access their selected contacts.
2️⃣ Later, if Full Access is necessary for an enhanced experience, we display a clear explanation modal explaining why the app needs Full Access.
3️⃣ If the user agrees, we attempt to guide them to openAppSettings(), allowing them to manually change the permission.
4️⃣ However, if Permission.contacts.request() can be used to directly request Full Access again, we would like to know if this is acceptable.
We want to ensure that our implementation follows Apple’s privacy guidelines while providing the best user experience.
Any official guidance or best practices on this matter would be greatly appreciated.
Thank you in advance!
Hello,
I am currently developing a call service using CallKit and VoIP push. Recently, I have encountered a very challenging issue. During testing, when a VoIP push is received, the incomingCall gets triggered continuously, but then it automatically terminates after about 1-2 seconds. I am checking this issue under the debug scheme, and even when switching to different commits, the same problem persists.
I suspect it might be an issue with the device, but I would like to confirm the cause and find a solution. Below are some characteristics I have noticed:
On this device, when a VoIP push is received, CallKit automatically terminates, but this does not occur when debugging.
The issue always occurs when not debugging.
Looking at the device console logs related to callservicesd, there are many logs with 'invalidate' appended.
For example:
Invalidating process assertion for bundle ID from timeout
All calls ended. Clearing system uplink muted cache
Invalidate callDurationUpdateTimer
InCallService has changed process state to 2
InCallService has been suspended; invalidating its XPC client connections.
[0x565544180] invalidated because the current process cancelled the connection by calling xpc_connection_cancel()
XPC connection invalidated from client
These logs appear although our server did not receive any incoming call request, so we did not terminate it on our end. I also checked if there was a crash, but there were no reports left on the device.
Could you please share any insights into the cause or solutions for this situation?
Thank you.
Hi,
I'm working on a game for the past few years using first Unreal Engine 4, and now Unreal Engine 5.4.4.
I'm experiencingan unusual crash on startup on some devices
. The crash is so fast that I'm barely able to see the launching screen sometimes because the app closes itself before that.
I got a EXC_CRASH (SIGABRT) so I know that it's a null pointer reference, but I can't quite wrap my head about the cause, I think that's something messed up in the packaging of the app, but here is where I'm blocked, I'm not that accustomed with apple devices.
If someone has some advise to give, please, any help will be very valuable. Many thanks.
Log :
Crash Log on Ipad
We are developing an iOS app to connect to vehicles and trigger predefined vehicle controls (door lock/unlock) via the Digital Key framework.
We are currently blocked on several aspects and would appreciate your expertise to clarify the following queries.
How can we list down connected vehicle information?
What is the method to retrieve connection status?
How can we perform vehicle control actions (e.g., door lock/unlock)?
STEPS TO REPRODUCE
Starting the CarKeyRemoteControlSession to Fetch Vehicle Reports
Currently, we are using the following API to start a CarKeyRemoteControlSession:
open class func start(
delegate: any CarKeyRemoteControlSessionDelegate,
subscriptionRange subscriptionFunctionIDRange: ClosedRange? = nil,
with delegateCallbackQueue: DispatchQueue? = nil
) async throws -> CarKeyRemoteControlSession
After successfully creating the session, we check for vehicle reports using the vehicleReports property of CarKeyRemoteControlSession:
public var vehicleReports: [VehicleReport] { get throws }
Topic:
App & System Services
SubTopic:
General
Is it possible to integrate a button in an app that displays advertisements to support charities -without offering any direct reward to the user?
We recently began getting reports that when posts are shared via Messages the rich preview will display an unrelated image from an altogether different post. The correct open graph image appears when sharing via every other platform we've tried (Slack, Whatsapp, Twitter/X) and the og:image tag refers to the appropriate image url.
The image Messages uses in the rich preview only appears in an unrelated metadata tag that includes data for multiple recent posts. Has anyone else encountered this?
Hi everyone,
i'm trying to request in a AppIntent an array of strings. But I want to give the user the chance to add more than one String.
Yet, I do it so:
import AppIntent
struct AddHomework: AppIntent {
// some Parameters
@Parameter(title: "Tasks")
var tasks: [String]?
@Parameter(title: "New Task") //Only for the special request
var input: String?
private func collectTasks() async throws -> [String] {
var collectedTasks: [String] = tasks ?? []
while true {
if !collectedTasks.isEmpty {
let addMore = try await $input.requestConfirmation(for: "Möchtest du noch eine Aufgabe hinzufügen?")
if !addMore {
break
}
}
let newTask = try await $input.requestValue("Please enter your task:")
collectedTasks.append(newTask)
}
return collectedTasks
}
@MainActor
func perform() async throws -> some IntentResult {
let finalTasks = try await collectTasks()
// some more code
return .result()
}
}
But this is not working. The Shortcut is ending without requesting anything. But it is not crashing.
I would thankfully for some help.
I currently create a AppIntent that contains a custom AppEntity, it shows like this
struct GetTimerIntent: AppIntent {
static let title: LocalizedStringResource = "Get Timer"
@Parameter(title: "Timer")
var timer: TimerEntity
func perform() async throws -> some IntentResult {
.result(value: timerText(timer.entity))
}
static var parameterSummary: some ParameterSummary {
Summary("Get time of \(\.$timer)")
}
func timerText(_ timer: ETimer) -> String {
// Implementation Folded
}
}
struct TimerEntity: AppEntity {
var entity: ETimer
static let defaultQuery: TimerQuery = .init()
static var typeDisplayRepresentation: TypeDisplayRepresentation {
TypeDisplayRepresentation(name: "Timer")
}
var id: UUID {
entity.identifier
}
var displayRepresentation: DisplayRepresentation {
DisplayRepresentation(title: "\(entity.title)")
}
}
To get the timers, I create a TimerQuery type to fetch them from SwiftData containers.
struct TimerQuery: EntityQuery, Sendable {
func entities(for identifiers: [UUID]) async throws -> [TimerEntity] {
print(identifiers)
let context = ModelContext(ModelMigration.sharedContainer)
let descriptor = FetchDescriptor<ETimer>(
predicate: #Predicate {
identifiers.contains($0.identifier)
},
sortBy: [.init(\.index)]
)
let timers = try context.fetch(descriptor)
print(timers.map(\.title))
return timers.map {
TimerEntity(entity: $0)
}
}
}
Everything looks make sense since I code it. When I'm testing, the console jump
No ConnectionContext found for 105553169752832 and I can't get my datas.
How can I solve this issue?
Hi,
I’m trying to get an array of strings from the user using AppIntents, but I’m encountering an issue. The shortcut ends without prompting the user for input or saving the value, though it doesn’t crash. I need to get the user to input multiple tasks in an array, but the current approach isn’t working as expected.
Here’s the current method I’m using:
// Short code snippet showing the current method
private func collectTasks() async throws -> [String] {
var collectedTasks: [String] = tasks ?? []
while true {
if !collectedTasks.isEmpty {
let addMore = try await $input.requestConfirmation("Would you like to add another task?")
if !addMore {
break
}
}
let newTask = try await $input.requestValue("Please enter a task:")
collectedTasks.append(newTask)
}
return collectedTasks
}
The Call
func perform() async throws -> some IntentResult {
let finalTasks = try await collectTasks()
// Some more Code
}
Any advice or suggestions would be appreciated. Thanks in advance!