Hello,
I have an app in AppStore "Counter Widget". https://apps.apple.com/app/id1522170621
It allows you to add a widget to your homescreen/lockscreen to count anything.
Everything works fine except for one scenario. iOS 18+
I create 2 or more widgets for one counter. For example, medium and small widgets.
I click on the widget button to increase or decrease the value.
The button in the widget uses Button(intent: AppIntent) to update the value and calls WidgetCenter.shared.reloadAllTimelines() to update the second widget for the same counter.
For iOS 18 in this particular scenario, you don't even have to call the WidgetCenter.shared.reloadAllTimelines(). iOS already knows that there is a widget with the same INIntent settings and will update it itself.
Both widgets are updated and show the new value. Everything is correct.
Now on the homescreen I open the widget configuration for one of the widgets to change the INIntent for the widget. For example, i change the background to wallpaper. This is just a skin for the widget, and the widget is associated with the same counter value as before.
As in (2), I click the widget button to increase or decrease the value.
But now only one widget is updated. iOS ignores my call to WidgetCenter.shared.reloadAllTimelines() and does not update the second widget connected to the same counter.
As I found, iOS, when I call WidgetCenter.shared.reloadAllTimelines() from the widget itself, updates other widgets only if INIntent is absolutely equal for them.
Overriding isEqual for them did not help. That is, I cannot specify which fields from my INIntent can be ignored during such an update and consider that widgets are equal and need to be updated. Obviously iOS make this compare outside my code.
The main problem is that when the user adds a widget to the lock screen and increases and decreases the value there. After that, he opens the home screen and the widget there is not synchronized with the value from the widget on the lock screen.
How to solve this problem?
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.
Post
Replies
Boosts
Views
Activity
Triggered by Thread: 0
Thread 0 Crashed:
0 dyld 0x1a87922b0 lsl::PreallocatedAllocatorLayout<278528ull>::init(char const**, char const**, void*) + 436
1 dyld 0x1a878ba38 start + 1960
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x2010003030100000 x1: 0x0000000fffffc0d0 x2: 0x0000000000000004 x3: 0x00000001a87607a9
x4: 0x0000000000000000 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000
x8: 0x2010003030100000 x9: 0x2010003030100000 x10: 0x000000016d923dfd x11: 0x00000001a87ccf30
x12: 0x0000000000000050 x13: 0x0000000000000044 x14: 0x0000000000052010 x15: 0x0000000000000000
x16: 0x0000000000000000 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x00000001801d0000
x20: 0x000000016d923b50 x21: 0x000000016d923af8 x22: 0x00000001e6184050 x23: 0x000000016d9237d8
x24: 0x0000000fffffc10c x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x0000000000000000
x28: 0x0000000000000000 fp: 0x000000016d923870 lr: 0xb0228001a8792130
sp: 0x000000016d9237d0 pc: 0x00000001a87922b0 cpsr: 0x60001000
far: 0x00000001e61840e0 esr: 0x92000047 (Data Abort) byte write Translation fault
Binary Images:
0x1a8758000 - 0x1a87db693 dyld arm64e <77c1eed22ed7396aba34e770120d81d4> /usr/lib/dyld
0x1024dc000 - 0x10594ffff main_executable_path_missing arm64 /main_executable_path_missing
0x0 - 0xffffffffffffffff ??? unknown-arch <00000000000000000000000000000000> ???
Error Formulating Crash Report:
dyld_process_snapshot_get_shared_cache failed
EOF
crash.log
Hello, our app gets rejected as it crashes on launch. According to the logs, it happens because the app attempts to access private-sensitive data. We don't collect any of personal data, so it is probably done by Google Firebase embedded in the app (Core, Firestore, Auth). Maybe you have met similar cases and know any of Firebase settings that disable attempts of accessing privacy-sensitive data? We already set FirebaseDataCollectionDefaultEnabled to NO in info.plist, but it still not enough. Maybe error in facebook sdk? Before that it was written that there was an error when starting the ipad air 5
Log1
Log2
Log3
I am getting this error when trying to run the app on an actual IOS device using testFlight. It works well on simulators. I am using expo to build my app. I have done the following:
Added Sign in with Apple in Xcode for all the profiles ( i.e. debug and release)
Set expo.ios.usesAppleSignIn to true in my app.json ( I think due to this I see Synced capabilities: Enabled: Sign In with Apple while building my app using eas build. )
Make sure that the provision profile has Sign in with App capability.
What I am not able to understand is how option provided in provision profile works. Expo creates the profile with type "App Store". I think this is because I am building the expo app with production profile. Does this have to take anything with it? Does the profile with type "App Store" not work when I am testing the app using testFlight? I am so confused right now. Can someone help me figure out the actual issue?
I have seen almost all the posts regarding this error. None of those helped!
Thanks in advance!
Incident Identifier: 81AB2E74-1895-4DA4-9362-AE9E20B13847
Distributor ID: com.apple.AppStore
Hardware Model: iPhone16,2
Process: Uplus [16285]
Path: /private/var/containers/Bundle/Application/F737D7AC-B933-4204-926C-9149AD377F4B/Uplus.app/Uplus
Identifier: com.haier.uhome.Uplus
Version: 9.0.0 (2024091802)
AppStoreTools: 16A242b
AppVariant: 1:iPhone16,2:18
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.haier.uhome.Uplus [4813]
Date/Time: 2024-10-29 11:43:30.8727 +0800
Launch Time: 2024-10-29 11:43:30.8707 +0800
OS Version: iPhone OS 18.1 (22B5045g)
Release Type: Beta
Baseband Version: 2.20.02
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGKILL)
Exception Subtype: KERN_PROTECTION_FAILURE at 0x00000001e95280e0
Exception Codes: 0x0000000000000002, 0x00000001e95280e0
VM Region Info: 0x1e95280e0 is in 0x1e9528050-0x1e956c050; bytes after start: 144 bytes before end: 278383
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
mapped file 1e9528000-1e9528050 [ 80] r--/rw- SM=COW Object_id=f1de19db
---> __TPRO_CONST 1e9528050-1e956c050 [ 272K] r--/rw- SM=COW /usr/lib/dyld
mapped file 1e956c050-1e9570000 [ 16K] r--/rw- SM=COW Object_id=f1de19db
Termination Reason: <0x2A> 2
Triggered by Thread: 0
Thread 0 Crashed:
0 dyld 0x00000001ac079500 0x1ac03f000 + 238848
1 dyld 0x00000001ac072bcc 0x1ac03f000 + 211916
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x2010003030100000 x1: 0x0000000fffffc0d0 x2: 0x0000000000000004 x3: 0x00000001ac047829
x4: 0x0000000000000000 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000
x8: 0x2010003030100000 x9: 0x2010003030100000 x10: 0x000000016b917dfd x11: 0x00000001ac0b4240
x12: 0x0000000000000050 x13: 0x0000000000000044 x14: 0x0000000000052010 x15: 0x0000000000000000
x16: 0x0000000000000000 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000182bb0000
x20: 0x000000016b917b50 x21: 0x000000016b917af8 x22: 0x00000001e9528050 x23: 0x000000016b9177d8
x24: 0x0000000fffffc10c x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x0000000000000000
x28: 0x0000000000000000 fp: 0x000000016b917870 lr: 0x84028001ac079380
sp: 0x000000016b9177d0 pc: 0x00000001ac079500 cpsr: 0x60001000
esr: 0x92000047 (Data Abort) byte write Translation fault
Binary Images:
0x1044e8000 - 0x10795bfff main_executable_path_missing arm64 /main_executable_path_missing
0x1ac03f000 - 0x1ac0c29a3 dyld arm64e /usr/lib/dyld
EOF
18.1.crash
error: Error Domain=NSCocoaErrorDomain Code=256 "The application “Google Chrome” could not be launched because a miscellaneous error occurred." UserInfo={NSURL=file:///Applications/Google%20Chrome.app/, NSLocalizedDescription=The application “Google Chrome” could not be launched because a miscellaneous error occurred., NSUnderlyingError=0x6000038376c0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x6000038349f0 {Error Domain=OSLaunchdErrorDomain Code=112 "Could not find specified domain" UserInfo={NSLocalizedFailureReason=Could not find specified domain}}}}}
We are planning on renaming our app. The new name is not like the current name. It will be renamed in the App Store as well as the App display name. Yet, we still want new and existing users to be able to find the app by using the old name in search/spotlight under iOS. A great example of this is entering Twitter to find the X app and it shows up in the App section in the Spotlight search.
Are there any guidelines, settings, or tricks for doing this? Some have suggested adding a Spotlight search term but that will not have it show up in the App section I fear.
When my macOS app (currently in TestFlight and set for Mac App Store distribution) tries to terminate another app, both terminate() and forceTerminate() consistently return false. However, I can retrieve a list of all running applications so some related APIs do work.
I suspect this limitation is due to sandboxing. I have three questions:
Is there any permission or entitlement I can add in Xcode to allow my app to terminate other applications?
If no such permission exists, is there a way to guide users on how to launch my app (distributed through the Mac App Store) without sandboxing? For example, could they set it up to launch as a daemon or agent?
If unsandboxing is impossible, would I need to create a separate target specifically without sandboxing? In other words, my MacOS app would communicate with my unsandboxed daemon that would do all the terminate()-ing?
Hello fellow developers! I am interested in obtaining the following information regarding one of our Home Screen widgets:
Pull the following data about the "my_app_widget" homepage widget in total and by month for the last 12 months (Sep '23 - Sep '24):
Widget install events
Unique widget installs
Device type (iPad, iOS).
Thus far, I am using AWS Lambda and have the proper credentials within a Secrets Manager and I keep getting a 409 error from this code:
const AWS = require('aws-sdk');
const axios = require('axios');
const jose = require('jose');
const crypto = require('crypto');
const s3 = new AWS.S3();
const secretsManager = new AWS.SecretsManager();
const cloudwatchlogs = new AWS.CloudWatchLogs();
const logGroupName = '/aws/lambda/my_lambda_function';
const logStreamName = '2024/11/05/[$LATEST]XXXXXXXXXXXXXX';
const getSecret = async (secretName) => {
const secret = await secretsManager.getSecretValue({ SecretId: secretName }).promise();
return JSON.parse(secret.SecretString);
};
const logError = async (message) => {
const params = {
logGroupName,
logStreamName,
logEvents: [
{
message: JSON.stringify(message),
timestamp: Date.now()
}
]
};
try {
await cloudwatchlogs.putLogEvents(params).promise();
} catch (error) {
console.error('Failed to log to CloudWatch:', error);
}
};
const getJwtToken = async (keyId, issuerId, privateKeyPem) => {
try {
const privateKey = crypto.createPrivateKey({
key: privateKeyPem,
format: 'pem',
type: 'pkcs8'
});
const payload = {
iss: issuerId,
exp: Math.floor(Date.now() / 1000) + 20 * 60,
aud: 'appstoreconnect-v1'
};
const token = await new jose.SignJWT(payload)
.setProtectedHeader({ alg: 'ES256', kid: keyId })
.sign(privateKey);
return token;
} catch (error) {
await logError({ error: 'Error generating JWT', details: error });
throw new Error('JWT generation failed');
}
};
const fetchAndUploadReport = async (url, token, s3Key, isAnalytics = false, body = null) => {
try {
const headers = {
'Authorization': `Bearer ${token}`,
'Accept': isAnalytics ? 'application/json' : 'application/a-gzip',
'Content-Type': 'application/json'
};
const response = await axios({
method: isAnalytics ? 'post' : 'get',
url: url,
headers: headers,
data: body,
responseType: isAnalytics ? 'json' : 'stream'
});
if (response.status === 200) {
let bodyContent = isAnalytics ? JSON.stringify(response.data) : response.data;
await s3.upload({
Bucket: 'my_bucket_name',
Key: s3Key,
Body: bodyContent
}).promise();
return { statusCode: 200, body: `${s3Key} fetched and uploaded successfully` };
} else {
await logError({ error: 'API response error', status: response.status, statusText: response.statusText, url });
return { statusCode: response.status, body: response.statusText };
}
} catch (error) {
await logError({ error: 'Error fetching report', url, details: error });
return { statusCode: 500, body: JSON.stringify(`Error fetching ${s3Key}`) };
}
};
exports.handler = async (event) => {
const secretName = 'AppStoreConnectPrivateKey';
try {
const secretData = await getSecret(secretName);
const { keyId, issuerId, private_key: privateKeyPem } = secretData;
const token = await getJwtToken(keyId, issuerId, privateKeyPem);
const startDate = '2023-09-01';
const endDate = '2024-09-30';
const apiEndpoints = [
{
url: `https://api.appstoreconnect.apple.com/v1/analyticsReportRequests`, // Changed to request report
s3Key: 'my_folder/my_subfolder/unique_widget_installs.json',
isAnalytics: true,
body: {
"data": {
"type": "analyticsReportRequests",
"attributes": {
"accessType": "ONGOING",
"name": "Home Screen Widget Installs",
"category": "APP_USAGE"
},
"relationships": {
"app": {
"data": {
"type": "apps",
"id": "YYYYYYYYYYYY"
}
}
}
}
}
}
];
Returns the following error :
{
"error": "Error fetching report",
"url": "https://api.appstoreconnect.apple.com/v1/analyticsReportRequests",
"details": {
"message": "Request failed with status code 409",
"name": "AxiosError",
"stack": "AxiosError: Request failed with status code 409\n at settle (/var/task/node_modules/axios/dist/node/axios.cjs:2019:12)\n at IncomingMessage.handleStreamEnd (/var/task/node_modules/axios/dist/node/axios.cjs:3135:11)\n at IncomingMessage.emit (node:events:531:35)\n at IncomingMessage.emit (node:domain:488:12)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n at Axios.request (/var/task/node_modules/axios/dist/node/axios.cjs:4287:41)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async fetchAndUploadReport (/var/task/index.js:68:26)\n at async Promise.all (index 0)\n at async exports.handler (/var/task/index.js:174:25)",
"config": {
"transitional": {
"silentJSONParsing": true,
"forcedJSONParsing": true,
"clarifyTimeoutError": false
},
"adapter": [
"xhr",
"http",
"fetch"
],
"transformRequest": [
null
],
"transformResponse": [
null
],
"timeout": 0,
"xsrfCookieName": "XSRF-TOKEN",
"xsrfHeaderName": "X-XSRF-TOKEN",
"maxContentLength": -1,
"maxBodyLength": -1,
"env": {},
So I am not sure if the JSON body I am passing this URL endpoint are correct or if this is the correct API to be using to attempt to obtain this information. Please let me know when you have the chance and I look forward to hearing from you.
The app works on iPhone 16 Pro OS18.1 paired AW 10 OS11.0 but when the same iPhone paired with AW OS 11.1, I got the warning below and watch is not responsive
Could not get trait set for device Watch7,9 with version 11.1
ActivityCategoryPolicy.all(except: allowList) blocks all apps, even the ones that should be exempted
Hello fellow Screen Time developers!
I have bee experimenting with the ActivityCategoryPolicy.all(except: allowList) API of the ManagedSettings framework in order to provide a digital detox feature to my app, where ALL apps would be blocked, except some important ones (phone, messages, maps).
The apps to be exempted can be configured by the user via the FamilyActivitySelection().
However, I am experiencing a strange bug, where all apps are restricted / blocked, even the ones that are set to be exempted and are part of the allowList Set.
Instead of not restricting allowed apps at all, these apps are restricted with a generic shield (screenshot below) – a concrete shield is not requested for them from my ShieldConfigurationDataSource.
I have also filed a radar under this number, attached is a minimalistic sample project and video that shows how to reproduce this: FB15500605
(no response so far)
I have also seen other people report on this issue, but couldn't find any useful information there:
https://forums.developer.apple.com/forums/thread/750988
https://forums.developer.apple.com/forums/thread/762287
Thanks a lot for your help, and have a nice day!
Some of our users encounter an issue after updating their iPhone/iPad to iOS 17.5.1.
The tokens passed in the Shield Configuration extension don't match the tokens they selected in my app using the FamilyPicker before updating to iOS 17.5.1. It seems the tokens changed for no reason. My app can't match the token from the ShieldConfigurationDataSource to any tokens stored on my end, causing my shield screens to turn blank. The same applies to tokens in the Device Activity Report extension.
The only workaround I've found is to tell affected users to unselect and reselect apps and websites to block in my app. This gets them new tokens from the FamilyActivityPicker, which solves the issue. However, for some users, the bug reoccurs a few days later. Tokens seem to change again, causing the same issue in the Shield Configuration extension.
I am not able to reproduce the issue on my test devices so I have no sysdiagnose to attach. However, this issue is affecting other screen time apps:
https://developer.apple.com/forums/thread/732845
https://forums.developer.apple.com/forums/thread/756440
FB14082790
FB14111223
A change in iOS 17.5.1 must have triggered this behaviour. Could an Apple engineer give us any updates on this?
I'm integrating AdMob rewarded interstitial ads into my live iOS app using CocoaPods and package dependency management. The ads are working fine when I use the bundle identifier com.CreativeCub.ProgrammingHu, but when I use the correct identifier com.CreativeCub.ProgrammingHub, the ads stop working.
Here’s what I’ve tried:
Verified that the bundle identifier matches across Xcode and AdMob.
Double-checked the App ID and Ad Unit ID in the AdMob dashboard for com.CreativeCub.ProgrammingHub.
Reinstalled the AdMob SDK using CocoaPods.
Attempted to integrate AdMob using Swift Package Manager.
Created a test project to rule out potential issues with my existing project.
Despite these steps, ads only work when I use the shortened bundle identifier (com.CreativeCub.ProgrammingHu), which is not the correct one.
Contacted Google admob support for the same but did not worked
Tried running in different MacBook system
The app exits immediately on startup, there is no crash message, and I can't get any valuable diagnostic information. It doesn't even get to the main function. It feels like exit is being called somewhere, and then I used atexit to register the relevant handler. Finally, I found the following stack printout
It looks like it's a dynamic linking issue, so what's the best way to troubleshoot it. This problem only occurs in release versions.
To resolve this issue, please revise the app preview to only use video screen captures of the app. These may include narration and video or textual overlays for added clarity
PDFKit PDFPage.characterBounds(at: Int) is returning incorrect coordinates with iOS 18 beta 4 and later / Xcode 16 beta 4.
It worked fine in iOS 17 and earlier (after showing the same issue during the early iOS 17 beta cycle)
It breaks critical functionality that my app relies on.
I have filed feedback (FB14843671).
So far no changes in the latest betas. iOS release date is approaching fast!
Anybody having the same issue? Any workaround available?
Under Ventura, desktop wallpaper image names were stored in a sqlite database at ~/Library/Application Support/Dock/desktoppicture.db. This file is no longer being used under Sonoma.
I have a process I built that fetches the desktop image file names and displays them, either as a service, or on the desktop. I do this because I have many photos I've taken, and I like to know which one I'm viewing so I can make edits if necessary. I set these images across five spaces and have them randomly change every hour. I tried using AppleScript but it would not pull the file names.
A few people have pointed me to ~/Library/Application Support/com.apple.wallpaper/Store/Index.plist. However, on my system, this only reveals the source folder and not the image name itself. On one of my Macs, it shows 64 items, even though I have only five spaces!
Is there a way to fetch the image file names under Sonoma? Will Sequoia make this easier or harder?
@available(iOS 18.0, *)
@AssistantIntent(schema: .system.search)
struct SearchIntent: AppIntent {
static let title: LocalizedStringResource = "Search <app name redacted>"
static let searchScopes: [StringSearchScope] = [.general]
@Parameter(title: "Criteria")
var criteria: StringSearchCriteria
@MainActor
func perform() async throws -> some IntentResult {
MyDependencyManager.shared.performSearch(with: criteria.term)
return .result()
}
}
// In AppShortcutProvider
AppShortcut(
intent: SearchIntent(),
phrases: [
"Find \(\.$criteria) in \(.applicationName)",
"Search for \(\.$criteria) in \(.applicationName)",
],
shortTitle: "Search <app name redacted>",
systemImageName: "magnifyingglass"
)
The search works when using the Shortcuts app, but not when using Siri. For example if I ask Siri "Search for in " it just does a Google search or prompts me to install the app from the App Store (I am running a debug build via Xcode). I can't get this to work from Spotlight either.
I am using Xcode 16 and running the app on an iPhone 16 with OS 18.2 beta and Apple Intelligence turned on.
What am I doing wrong here? I cannot find any other information about this intent or how to properly set it up and use it.
Hello everyone,
I'm currently working on an App Intent for my iOS app, and I’ve encountered a frustrating issue related to how Siri prompts for a category selection. Here’s an overview of what I’m dealing with:
extension Category: AppEntity, @unchecked Sendable {
var displayRepresentation: DisplayRepresentation {
DisplayRepresentation(title: "\(name)")
}
static var typeDisplayRepresentation = TypeDisplayRepresentation(name: "Category")
typealias DefaultQueryType = ShortcutsCategoryQuery
static var defaultQuery: ShortcutsCategoryQuery = ShortcutsCategoryQuery()
}
struct ShortcutsCategoryQuery: EntityQuery {
func entities(for identifiers: [String]) async throws -> [Category] {
let context = await ModelContext(sharedModelContainer)
let categories = try CategoryDataProvider(context: context).getItems()
return categories.filter { identifiers.contains($0.id) }
}
func entities(matching string: String) async throws -> [Category] {
return try await suggestedEntities()
}
func suggestedEntities() async throws -> [Category] {
let context = await ModelContext(sharedModelContainer)
do {
let categories = try CategoryDataProvider(context: context).getItems()
if categories.isEmpty {
print("No categories found.")
}
return categories.map { category in
Category(
id: category.id,
name: category.name,
stringSymbol: category.stringSymbol,
symbol: category.symbol,
stringColor: category.stringColor,
color: category.color
)
}
} catch {
print(error)
return []
}
}
}
The issue arises when I use Siri to invoke the intent. Siri correctly asks me to select a category but does not display any options unless I said something that Siri recognized, like "Casa(House) or *****(Test)" in portuguese. Only then does it show the list of available categories.
I would like the categories to appear immediately when Siri asks for a selection. I've already tried refining the ShortcutsCategoryQuery and debugging various parts of my code, but nothing seems to fix this behavior.
Our context involves smart kitchen appliances, where cooking may be initiated by an app or directly by the device.
When the app is not running, we can only start a Live Activity through a remote push notification. However, an increasing number of users report issues where they cannot update or terminate the Live Activity.
While we can reproduce this issue in some cases, it is inconsistent and lacks a clear pattern.
I have a sample project and would like to confirm the following questions:
When the app is not running, does each pushToStartToken update wake the app and reliably trigger the callback below?
for await pushToken in Activity<DeviceAttributes>.pushToStartTokenUpdates {
}
When the app is not running, does each pushTokenUpdates update wake the app and reliably trigger the callback below?
Task {
for await activity in Activity<DeviceAttributes>.activityUpdates {
Task {
for try await tokenData in activity.pushTokenUpdates {
}
}
}
}
Must pushToStartTokenUpdates and pushTokenUpdates be placed directly in application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?), or can they be in another wrapper, such as an RxSwift wrapper?
If pushTokenUpdates is updated, but the received pushToken fails to synchronize to the server due to network issues, how should this be handled?
Alternatively, if you have any better suggestions, I would be very grateful to hear them.
Here is a simple example.