func handle(intent: INSendPaymentIntent, completion: @escaping (INSendPaymentIntentResponse) -> Void) {
if let _ = intent.payee, let currencyAmount = intent.currencyAmount {
let userActivity = NSUserActivity(activityType: "com.rapipay.nye.test.failure")
userActivity.userInfo = ["amount": Int(truncating: currencyAmount.amount!)]
completion(INSendPaymentIntentResponse(code: .failureRequiringAppLaunch, userActivity: userActivity ))
return
}
}
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([any UIUserActivityRestoring]?) -> Void) -> Bool {
print("ddddd")
return true
}
this code is perfectly working on simulator and even i fi user userActivity as nil, continue userActivity is called, but on device it is not called
Siri is working, asking for name and amount and handler is also called and opens app but does not pass intent or userActivity
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
This message only to know your feeling on my project. Not to discuss what is feasible or not. Just on the interest of the functionality.
I use 5 Focus profiles, Do Not Disturb, Holiday, Work, Personal and Sleep. I find that the native solutions for changing modes are not powerful enough.
I'd like an app to configure automatically when each Focus profile should be activated.
Eg :
-Holiday : when holiday is found in my calendar
-Work : when I'm not on holiday, when we are not on the weekend, and after 7ham but before 7pm.
Personal : when I'm not on holiday when we are on the weekend of after 7pm
-Dot Not Disturb: When I'm not in holiday, only on the working week when I have an event in my agenda with the status accepted".
These are just some examples. the idea is that everything will be configurable. (my app is almost finished.)
What do you think?
I have a dedicated render thread with a run loop that has a CADisplayLink added to it (that's the only input source attached). The render thread has this loop in it:
while (_continueRunLoop)
{
[runLoop runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];
}
I have some code to stop the render thread that sets _continueRunLoop to false in a block, and then does a pthread_join on the render thread:
[_renderThreadRunLoop performBlock:^{
self->_continueRunLoop = NO;
}];
pthread_join(_renderThread, NULL);
I have noticed recently (iOS 18?) that if the Display Link is paused or invalidated before trying to stop the loop then the pthread_join blocks forever and the render thread is still sitting in the runMode:beforeDate: method. If the display link is still active then it does exit the loop, but only after one more turn of the display link callback.
The most likely explanation I can think of is there has been a behaviour change to performBlock - I believe this used to "consume" a turn of the run loop, and exit the runMode:beforeDate call but now it happens without leaving that function.
I can't find specific mention in the docs of the expected behaviour for performBlock - just that other RunLoop input sources cause the run method to exit, and timer sources do not. Is it possible that the behaviour has changed here?
(Also have a case ID, 9879068)
We have an app that user use to check in/out from work for example. We have a button in-app do do this. Now I'm trying to add buttons to our widgets and our new live activity so that users don't have to open the app.
It's crucial that the live activity and widgets always show the exact same state.
Otherwise it'll look pretty bad if a user has both a live activity and a widget showin at the same time.
However, we have noticed that sometimes, pressing the button in the live activity, running the app intent, will not always make the widget update (we call reloadAllTimelines()). The other way around, i.e. press the button on widget to update live activity always works. (they both call the same app intent)
When running it in debug mode on a phone from Xcode, it always works, but when running it just on the phone it's unreliable.
My first thought was, of course, that's related to the widget "budget", but according to the docs HERE, it should not be applied when interacting with a widget, calling an app intent.
My question: HOW can I make my widget reliably refresh using an app intent invoked from a live activity??
I have a ready small project with simple buttons and trace labels that display this issue that I'm happy to supply to someone.
I'm working on an app that uses EventKit to access calendar events. For users with external calendars like Google Calendar, they can sync these by adding the account through iOS Calendar settings. Once added, the events appear in my app as expected.
However, if a user adds a new event in Google Calendar, there’s often a delay before it appears in my app, since the iOS Calendar doesn't sync with external sources like Google in real time.
Currently, users can manually trigger a sync by opening the Apple Calendar app and using the pull-to-refresh feature under the "Calendars" tab. This works reliably but isn’t an ideal solution.
I tried using the EventKit method refreshSourcesIfNecessary() to minimize the delay, as it claims to "[Pull] new data from remote sources, if necessary" (link to docs). I trigger this method when the app returns to the foreground. But, I'm not seeing the expected results. Here’s a typical sequence:
Open my app and send it to the background.
Add an event in Google Calendar.
Return to my app.
Despite invoking refreshSourcesIfNecessary(), the new event doesn’t appear in Apple Calendar (or accordingly in my app), until some random delay (30 seconds to several minutes). In contrast, the Apple Calendar app’s pull-to-refresh fetches the event immediately, every time.
Am I misinterpreting how refreshSourcesIfNecessary() is intended to work? Or is there another way to achieve a faster sync with external calendars?
We are experiencing an infrequent issue with the handoff between our Siri intent, our iOS app, and our CarPlay extension. Siri correctly understands the request, and the
handler(for intent: INIntent)
method is called. In the final step, we respond using:
INStartCallIntentResponse(code: .continueInApp, userActivity: userActivity)
with an instance of NSUserActivity initialized as:
NSUserActivity(activityType: "our.unique.StartCallIntent")
This "our.unique.StartCallIntent" type is included in the app’s NSUserActivityTypes attribute within the Info.plist.
The callback is handled in the main view of the app through:
view.onContinueUserActivity("our.unique.StartCallIntent", perform: handleSiriIntent)
Additionally, we handle the callback in the CarPlay extension using:
func scene(_: UIScene, continue userActivity: NSUserActivity)
This is necessary because when Siri is invoked while CarPlay is active, the CarPlay extension should receive the callback.
Most of the time, both callbacks are triggered as expected. However, on rare occasions, the handoff fails, and neither onContinueUserActivity nor scene(_: UIScene, continue userActivity:) receives a callback from the Siri intent.
Is this a known issue? If so, are there any guidelines or best practices for ensuring that our Siri intent handoff consistently triggers the callbacks?
I am really hoping somebody can help. I in the process of having our app relaunched with CarPlay and a few other features. However, after nearly 4 weeks I've still not had confirmation of Carplay being accepted. I've submitted several times without any response. When I've contacted Apple Support I simply get a generic reply (see below)
Hello Gareth,
CarPlay apps are editorially selected, you will be contacted if your app is selected to proceed.
If you have already submitted your request to have your app support CarPlay, there is no actions needed. Estimates and status updates are not available.
Please let us know if you have any questions or need further assistance.
WWDC videos suggest that existing apps should continue using the old SiriKit domains, such as INPlayMediaIntent. But what about new apps for playing audio? Should we implement Siri functionality for audio playback using the old SiriKit domains, or should we create our own AppEntities and trigger them via custom AudioPlaybackIntent implementations?
Interactive widgets require an AppIntent and don’t support the old INPlayMediaIntent. To achieve the same functionality as the Music app widgets, it seems logical to adopt the new AudioPlaybackIntent. However, I can't find any information about this in the documentation.
Hello, I'm currently configuring Universal Links and I'm getting error SWCERR00201 from Apple CDN.
$ curl -I -v https://app-site-association.cdn-apple.com/a/v1/pamestoixima.gr
...
< Apple-Failure-Details: {"location":"http://www.pamestoixima.gr/.well-known/apple-app-site-association/"}
Apple-Failure-Details: {"location":"http://www.pamestoixima.gr/.well-known/apple-app-site-association/"}
< Apple-Failure-Reason: SWCERR00201 Insecure (non-https) redirects forbidden
Apple-Failure-Reason: SWCERR00201 Insecure (non-https) redirects forbidden
< Apple-From: https://pamestoixima.gr/.well-known/apple-app-site-association
Apple-From: https://pamestoixima.gr/.well-known/apple-app-site-association
...
I cannot understand why it is mentioning http as the AASA is hosted at pamestoixima.gr that uses https, not http. I can get it via accessing https://www.pamestoixima.gr/.well-known/apple-app-site-association/.
I would greatly appreciate any help on this.
Thank you
The background asset keys (BAEssentiaMaxInstallSize/BAMaxInstallSize) referenced in the app's Info.plist will be displayed to users on the App Store, as outlined in the WWDC video and supported by Apple’s documentation.
Could you please clarify where exactly on the App Store's product page these values will be visible?
Is the size displayed on the App Store a sum of the app bundle size and the size specified in these keys within the Info.plist?
I was testing SFSpeechRecognition on my real device running ios 18.2 beta, and found that the result's "final" field is true, the result itself does not contain entire conversation's transcription. I came across some blog posts saying it's fixed in a 18.1 beta, is this not the case for 18.2 beta?
Example code:
recognitionTask = recognizer.recognitionTask(with: request) { [weak self] result, error in
guard let self = self else { return }
if let error = error {
DispatchQueue.main.async {
self.errorMessage = "Transcription failed: \(error.localizedDescription)"
self.isTranscribing = false
}
} else if let result = result, result.isFinal {
// HERE!
}
}
We are a carrier in the US and would want documentation on implementing the native eSIM creation on the native app and install it on the device directly through the app. Core Telephony framework is available (https://developer.apple.com/documentation/coretelephony) to do that but I did not find any documentation on how to implement it by step by step process. Also we would want to understand how we can read the IMEI of the phone as we already have the carrier privileges on our developer account.
I keep getting this crash and I have no idea what is causing it. This is the stack trace:
2024-11-16_00-45-54.7074_+0100-8d446e9a50eb0be6cc826ff71526731dcb4430bc.crash
Any help would be appreciated.
Thank you
In my iOS app, I know that adding words to kMDItemKeywords in the Info.plist allows them to appear in Spotlight search. However, I want specific keywords to make my app appear in the App Library search.
Where should I add these keywords to enable this functionality?
After building my app with Xcode 16 beta 6 I'm getting this warning in my AppIntents.
Encountered a non-optional type for parameter: computer. Conformance to the following AppIntent protocols requires all parameter types to be optional: AppIntents.WidgetConfigurationIntent, AppIntents.ControlConfigurationIntent
The intent looks something like this
struct WakeUp: AppIntent, WidgetConfigurationIntent, PredictableIntent {
@Parameter(title: "intent.param.computer", requestValueDialog:"intent.param.request_dialog.computer")
var computer: ComputerEntity
init(computer: ComputerEntity) {
self.computer = computer
}
init() {
}
public static var parameterSummary: some ParameterSummary {
Summary("Wake Up \(\.$computer)")
}
static var predictionConfiguration: some IntentPredictionConfiguration {
IntentPrediction(parameters: (\.$computer)) { computer in
DisplayRepresentation(
title: "Wake Up \(computer)"
)
}
}
@MainActor
func perform() async throws -> some IntentResult & ProvidesDialog {
}
}
According to the docs though specifying optional is how we say if the value is required or not. https://developer.apple.com/documentation/appintents/adding-parameters-to-an-app-intent#Make-a-parameter-optional-or-required
So is this warning accurate? If so, how do I specify that a parameter is required by the intent now?
Imagine we have an Xcode workspace containing two projects:
MyLibrary.xcodeproj holding a framework target
MyShortcutsApp.xcodeproj holding an app target which consumes MyLibrary framework
Both targets define App Intents and the ones from MyLibrary are exposed via AppIntentsPackage accordingly.
When trying to wrap the App Intent from framework as App Shortcut and passing localized AppShortcutPhrases I do see the following compile error:
".../Resources/de.lproj/AppShortcuts.strings:11:1: error: This AppShortcut does not map to a known action (MyLibraryIntent specified). (in target 'MyShortcutsApp' from project 'MyShortcutsApp')"
If I use the same localized App Shortcut phrases for an App Intent which is locally defined in the app target, everything works fine and also if I use the framework-provided App Intent in and App Shortcut without passing any localized phrases.
This is happening with Xcode 16.0 (16A242d), with 16.1 (16B40) and with 16.2 beta 2 (16C5013f).
I already raised this issue via FB15701779 which contains a sample project to reproduce and to further analyze the issue.
Thanks for any hint on how to solve that.
Frank
Hi,
I have developed iOS app using Cordova platform, now I am trying to open the upi app which is not happening. Can anyone guide me how to do this.
From my app i am hitting the below URL
location.href='phonepe://'
We are facing a serious issue affecting the Live Activity of the our app. If the app is built with Xcode 16 (16A242) the Live Activity does not appear on devices running iOS 17. The live activity does appear on devices running iOS 18 RC.
If we build the code with Xcode 15, the Live Activity appears on iOS 17 as expected.
To investigate this we also prepared a demo bare-bones project to make sure the Live Activity presence is not affected by part of the existing code. Again the issue appears even of the demo app.
Is this a known issue with Xcode16/iOS 18?
Hi!
Instead of using username/password authentication, I wanted to use a magic link to authenticate users of my app to simplify the process.
However, on the app review, it got rejected because of the magic link:
Guideline 2.1 - Performance - App Completeness
Issue Description
The app exhibited one or more bugs that would negatively impact App Store users.
Bug description: The Magic Link failed to open the installed app.
Review device details:
- Device type: iPad Air (5th generation)
- OS version: iPadOS 18.1
Next Steps
Test the app on supported devices to identify and resolve bugs and stability issues before submitting for review.
If the bug cannot be reproduced, try the following:
- For new apps, uninstall all previous versions of the app from a device, then install and follow the steps to reproduce.
- For app updates, install the new version as an update to the previous version, then follow the steps to reproduce.
Resources
- For information about testing apps and preparing them for review, see Testing a Release Build.
- To learn about troubleshooting networking issues, see Networking Overview.
I had no luck to reproduce this.
The magic links trigger my application on all my testing devices.
I also had external testers using TestFlight and it works for all of them as well.
The only time where I can see it failing is if I archive the IPA and install it on an external service like AWS Device Farm or BrowserStack App Live. But here it is very hard to debug because I think I cannot get the sysdiagnose file and I don't know if it is even supposed to work in this case because those devices are not associated with my developer account.
I read countless links, tutorials and discussions on this topic but it did not really help.
https://developer.apple.com/documentation/technotes/tn3155-debugging-universal-links
https://developer.apple.com/documentation/xcode/allowing-apps-and-websites-to-link-to-your-content
Here is my set-up:
I added the Associated Domains capability to my app.
There under Domains I put applinks:subdomain.domain.com
Under https://subdomain.domain.com/apple-app-site-association and https://subdomain.domain.com/.well-known/apple-app-site-association I host this file with JSON content header:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "<TEAM>.<TestAppIdentifier>",
"paths": [
"/magiclink/*",
"/activate/*"
]
},
{
"appID": "<TEAM>.<Identifier>",
"paths": [
"/magiclink/*",
"/activate/*"
]
}
]
}
}
My main entry point of the app has a
.onOpenURL { url in
handleOpenURL(url)
}
on the ContentView()
If I go to https://app-site-association.cdn-apple.com/a/v1/subdomain.domain.com, I see the file correctly as I specified it above.
If I go on my development phone to Settings > Developers > Universal Links > Diagnostics and I enter one of the "magic links" into the field, it says with a checkmark Opens Installed Application.
https://getuniversal.link/ says my AASA file is valid.
Any suggestion on what I could do to further debug or resolve this is highly appreciated.
Wouldn’t it be nice to have a folder of apps specifically tied to the use of your focus?
For instance, I work for a delivery company and we have about 3 apps for it. My s/o has about 5 to 8 apps for her job as well.
It would be nice to to have them all in a centralized spot when in “Work“ Focus.
What do you think?