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?
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
HI Team!
"I had submitted an update for my game which was already live. I didn’t change any designs in the game, I just removed the bugs and added a 'Rate Us' button link. Still, my game is being flagged at 4.3, even though it was previously live and running fine on the app store."
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}}}}}
I'm experiencing a persistent issue with transparent WebM videos rendered via WKWebView in an iOS Capacitor app. The videos play normal, however, they display a black background frame, which does not occur in the web version of the app. I've tried:
Playing with the css setting,
Enabling experimental WKWebView features,
Adjusting meta tags for inline video playback and hardware acceleration.
That my code:
showThumbs={false}
showStatus={false}
showIndicators={true}
showArrows={false}
infiniteLoop={true}
autoPlay={true}
interval={5000} // Change slide every 5 seconds
onChange={(index) => {
if (playerRefs.current[index]) {
playerRefs.current[index]?.seekTo(0);
playerRefs.current[index]?.getInternalPlayer()?.play();
}
}}
>
{videos.map((video, index) => (
<div key={index} className="video-slide">
<ReactPlayer
ref={(player) => (playerRefs.current[index] = player)}
url={video.src}
playing={isLoaded[index]} // Play only when video is loaded
loop
muted
width="100%"
onReady={() => handleVideoReady(index)} // Set loaded state when video is ready
style={{ backgroundColor: 'transparent' }}
config={{
file: {
attributes: {
playsInline: true,
},
},
}}
/>
<p className="description">{video.description}</p>
</div>
))}
</Carousel>
Working with React, capacitor.
The videos work perfect when I test it on the web app, the problem occurs just on my ios app
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
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.
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
I created an intent for a configurable widget that lets users choose an option for a parameter called "domain."
I've successfully loaded the selectable items for this parameter using the following code:
import Intents
class IntentHandler: INExtension, ConfigChartIntentHandling {
func provideDomainOptionsCollection(for intent: ConfigChartIntent) async throws -> INObjectCollection<Domain> {
let prefs = UserDefaults(suiteName: "group.name")
let domains = prefs?.stringArray(forKey: "domains")
if let domains {
let optionsCollection = domains.map { Domain(identifier: $0, display: $0) }
return INObjectCollection(items: optionsCollection)
} else {
// If no options, provide an empty list or a default option
return INObjectCollection(items: [])
}
}
}
The issue occurs when I select a value for the "domain" parameter. Each time I select a value and then reopen the configuration modal, the field reverts back to "Choose." Here's a screenshot illustrating the behavior:
Additionally, the widget doesn’t refresh after I change the "domain" value. However, another parameter using an enum ("Stats Type") works as expected.
Is there something I might be missing?
My Environment:
MacOS Sonoma
XCode 15.4
I noticed that with iOS 18, when adding a widget to the Control Center, there is now some "grouping system". I'm interested in the Capture group, which contains native widgets from Apple as well as third party apps like Instagram and Blackmagic cam, widgets in this group open the camera. My widget also opens the camera in my app, how can I add it to this group?
Hello,
I'm trying to use CPBarButtons in trailingNavigationBarButtons and leadingNavigationBarButtons for a CPInformationTemplate, but the handler of the buttons is never called when the user presses them. Is this a known issue?
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.
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.
iOS Message Filter Extension - deferQueryRequestToNetwork(completion:) error
I made a test app using the iOS App template and added a target using the Message Filter Extension template which invokes deferQueryRequestToNetwork(completion:) when receiving an SMS.
The app and the extension have same "Associated Domains Capabilities" with "messagefilter" pointing to a server which receives query requests and returns proper responses. The extension has the "ILMessageFilterExtensionNetworkURL" key in Info.plist file which specifies the server URL.
deferQueryRequestToNetwork(completion:) throws a com.apple.calls.messagefilter error which reads "Extension's containing app (appID ) unauthorized to defer requests to host "
Hello,
My code calls a macOS system library which returns Foundation Date properties. I have a program that will run every night, and output the data via the Swift JSONEncoder and uses DateEncodingStrategy.iso8601. As you likely know, a DST shift happened over the weekend here in the US. In my output, every single Date changed by 1 hour, despite the fact that nothing in the underlying data changed overnight. Here is an example diff in the output. I see the "Z", which I think should not be affected by DST changes.
- "dateAdded" : "2003-12-15T17:02:56Z",
- "dateModified" : "2007-03-07T04:31:16Z",
+ "dateAdded" : "2003-12-15T18:02:56Z",
+ "dateModified" : "2007-03-07T05:31:16Z",
Here is a sample of the data:
public struct Track: Codable, Hashable {
var dateAdded: Date?
var dateModified: Date?
}
And the encoding is here:
extension Array where Element == Track {
public func jsonData() throws -> Data {
let encoder = JSONEncoder()
encoder.outputFormatting = [.prettyPrinted, .sortedKeys]
encoder.dateEncodingStrategy = .iso8601
return try encoder.encode(self)
}
}
Pretty basic stuff overall. So my questions are:
Am I correct in my assumption that .iso8601 is UTC, and that UTC is daylight savings shift agnostic?
Is this the right way to ensure the my JSON is encoded in UTC?
If the library I am calling is building its Date incorrectly, how may I work around the problem?
I'm not reporting the library name right now, in order to ensure that my code is doing the right thing without assumptions.
Thanks for any tips!
I have an app that's capable of playing podcasts via Siri requests, e.g. "Hey Siri, play [Podcast Name]". I’m using INPlayMediaIntentHandling, that is, the SiriKit domain intents, as opposed to the newer AppIntents framework for its ability to select my app for audio playback without the need to specify the name of the app in the user's request to Siri.
This works great overall for the many podcasts I’ve tested the app with, with the exception of one. There's a podcast called "The Headlines", and I when I test the app with the request "Hey Siri, play The Headlines", my app is never selected. Instead, Apple Podcasts begins playback of a show called "NPR News Now".
Oddly, if the Apple Podcasts app is deleted, my app will still not be selected by the system, and instead, Siri responds with "I don’t see an app for that. You’ll need to download one" with a button to open the App Store. Additionally, if I do add the app name to the request using this style of intent, Siri responds with "[App Name] hasn’t added support for that with Siri." However, I’d still like to accomplish this without requiring the app name in the Siri request.
There's nothing complex in my setup:
The target declares one supported intent, INPlayMediaIntent, with "Podcasts" selected as a supported media category.
The Siri entitlement is enabled.
My INSiriAuthorizationStatus is .authorized.
My intent handler is specified in my AppDelegate as follows:
func application(_ application: UIApplication,
handlerFor intent: INIntent) -> Any? {
return IntentHandler.shared
}
My intent handler is simple:
final class IntentHandler: NSObject, INPlayMediaIntentHandling {
static let shared = IntentHandler()
func handle(intent: INPlayMediaIntent) async -> INPlayMediaIntentResponse {
print("IntentHandler: processing intent: \(intent)")
/** code to start playback based on information found in `intent` **/
}
When requesting Siri to "Play The Headlines", my handler code is not called at all. For all other supported shows, the print statement executes, and playback begins as expected.
Is there any way I can get my app to be selected instead of Apple Podcasts for this request?
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.
I've an app running for some time in the Appstore now. Recently I had to renew my singing certficicates to be able to publish my app again.
I renewed the certificates, updated my provisioning profile and signed a new app version to publish only to find out that the app crashes during the splash screen.
I added new features to the app so my first thought was that there would be an issue there. To test that, I built the latest stable version of the app and signed it with the new profivisioning profile. The result was exactly the same crash as the new build.
My assumption is that the crash is caused by bad signing (?) but I am not sure because I'm lacking experience on that front.
I do have a crash report from testflight and logs from the device where the app crashed.
Testflight crash:
TestFlight crashlog
Device error logs:
Device error logs
Hope someone can help my out because I'm at a dead end :(
The data displayed about a child’s apps can be outdated (DeviceActivityReport), leading to misinformation for the user. When I access the “Screen Time” section (for child in the parent device) in the iPhone settings, I see there is an update functionality to force load the actual data.
I have tried various workarounds, such as attempting to force an update on the child’s device to call DeviceActivityReport and opening system settings, but none of these have been successful :(
How can I implement something similar? Is there a way to force update this data ?
iPhone mirroring is available from macOS 15.
When running an app with iPhone mirroring
Can I know whether the app currently being mirrored is running at the top of the Mac app or screen?
Or is there a way to know whether it is hidden by another app on the Mac or re-displayed?
If not, I hope it will be added in a future update.
And I hope there is an API that can tell whether the current app is connected to iPhone mirroring or not.