Hello.
Here is my AASA file (my appID changed):
{
"applinks": {
"apps": [],
"details": [
{
"appIDs": [ "A123B4567C.app.myapp.tool" ],
"components": [
{ "/": "/en", "exclude": true },
{ "/": "/en/*", "exclude": true },
{ "/": "/workspace/*", "exclude": true },
{ "/": "*" }
],
"paths": [ "NOT /en", "NOT /en/*", "NOT /workspace/*", "*" ]
}
]
}
}
I need to open all links with my app except those with excluded flag.
When I open 'right' links, my app opens them (that's great).
When I open excluded link (e.g. https://myapp.app/workspace/personal) Safari opens it (that's great) but then the app is launched (that's what not expected).
What I already checked:
added the old "paths" property (it wasn't there originally)
rebooted my device
reinstalled my app from the TestFlight then from the AppStore
asked ChatGPT
used AASA validator (branch.io one)
cleared Safari cache
checked my links for redirects
What else can I check? Thanks.
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
I have a tracking issung with the latest beta 17.4 and want to know if anyone encountered the same problem.
My app is using the pause=false functionality for multiroom that apple provided to let the ARSession run in the background:
roomCaptureView?.captureSession.stop(pauseARSession: false)
When resuming the scan/scanning the next room I initialize a new RoomCaptureView with the running ARSession:
let roomCaptureView = RoomCaptureView(frame: rcvc.view.bounds, arSession: arSession!)
This worked fine on all previous versions and different devices. Since the update to 17.4 I noticed that the tracking will be lost after initializing the next scan which feels like the pauseARSession is not working (the ARSession has still the same ID)
Devices:
This behaviour/error does not occur on devices with 17.3 or lower: 15 Pro Max, 14 Pro Max, 13 Pro
This behaviour/error occures on devices with 17.4: 15 Pro Max, 14 Pro Max
If anyone has noticed the same issue I would like to know that I'm not the only one. Thanks.
I woke up this morning to all of our app clips showing "App Clip Unavailable" on the app clip card with no change on our side to the app or app clips. What's weird is that the app clip card shows up fine if you have our app installed, otherwise it shows the error message on the app clip card.
My leading theory is it could be an issue with apple's system (wouldn't be the first time we've had issues that were magically broken then fixed with nothing being changed), anybody else seeing issues or have ideas?
Have verified the apple-app-site-association files have not changed and that the Associated Domains in any recent app releases all are the same.
One of our client has contacted us with the following error :
Task .<3> request https:URL is NOT allowed to set HSTS for main doc (null)
Th request is sent from our SDK. According to the client it happens only on Vision Pro.
All our requests to the server on the SDK side are https.
The serve has the following header: X-Content-Type-Options X-Frame-Options Strict-Transport-Security
Can somebody share some insight?
Hello all,
Is there any best practice how it's possible to add native visionOS support for existing app, that already includes WidgetKit extension, where both targets should share some files?
"Your target is built for visionOS but contains embedded content built for the iOS platform (WidgetsExtension.appex), which is not allowed"
Thanks a lot!
At 11:37 in this video - https://developer.apple.com/videos/play/wwdc2021/10123/ - Nolan instantiates MyModel() in swiftui view file. And then at 12:02 he just uses MyModel from extension.
I have the exact same code and when I try to build my project, it fails with error that MyModel() could not be found.
I shared my MyModel.swift file between extension target and main app. Now it builds. However, it seems there are two separate instances of MyModel.
What is proper way for DeviceActivityMonitor extension to pass data to main app? I simply want to increment counter from extension every minute and let the main app to know that.
Or even better, - is there a way to use SwiftData from Device Activity Monitor extension?
We have an app that allows users to fetch historical weather data for their selected locations. We are seeing users report failures for specific latitudes and longitudes that come back as
WeatherDaemon.WDSClient<WeatherDaemon.WeatherResource>.Errors.responseFailed
For example, this request always fails:
https://weather-data.apple.com/v3/weather/en-US/33.797/-111.775?timezone=America/Phoenix&dataSets=forecastDaily&dailyStart=2023-12-29T07:00:00Z&dailyEnd=2023-12-31T07:00:00Z&country=US&deviceLanguages=en-US&clientMetadata=<REDACTED>
Another example for another location:
https://weather-data.apple.com/v3/weather/en-AU/40.717/-74.000?timezone=America/New_York&dataSets=forecastDaily&dailyStart=2023-12-29T05:00:00Z&dailyEnd=2023-12-30T05:00:00Z&country=US&deviceLanguages=en-AU,es-AU&clientMetadata=<REDACTED>
Both example involve queries at the end of December 2023.
I have filed this as FB13608710 with example code that replicates this as it is being used in our app.
I've just started tinkering with @Observable and have run into a question... What is the best practice for observing an Observable object outside of SwiftUI? For example:
@Observable
class CountingService {
public var count: Int = 0
}
@Observable
class ObservableViewModel {
public var service: CountingService
init(service: CountingService) {
self.service = service
// how to bind to value changes on service?
}
// suggestion I've seen that doesn't smell right
func checkCount() {
_ = withObservationTracking {
service.count
} onChange: {
DispatchQueue.main.async {
print("count: \(service.count)")
checkCount()
}
}
}
}
Historically using ObservableObject I'd have used Combine to monitor changes to service. That doesn't seem possible with @Observable and I don't know that I've come across an accepted / elegant solution? Perhaps there isn't one? There's no particular reason that CountingService has to be @Observable -- it's just nice and clean.
Any suggestions would be appreciated!
Hello,
We are working with Nearby Interaction (UWB) technology to provide high-accurate location use cases to our customers.
According to Apple's documentation, in order to enable background sessions starting iOS16, the two devices need to be paired. The accessory needs to implement Nearby service and mandated encrypted characteristic.
https://developer.apple.com/documentation/nearbyinteraction/ninearbyaccessoryconfiguration
So far we tested this with "PIN-based" secure pairing and everything works fine.
Can you confirm if "Just works" PIN-less pairing is expected to work as well here? The documentation is not clear on this respect. We would basically indicate IoNone local capabitilities for the accessory gap parameters if this is expected to work.
Thanks in advance!
Regards.
I'll preface this to say that I'm not 100% sure this is all accurate, but I wanted to share this problem I was seeing developing a widget for a SwiftUI app in case it helps someone else get to a solution faster.
Two weeks ago I released a version of an app which contained a brand new widget. For the kind property of the widget's configuration I just used something generic: AppWidget.
Last week we wanted to add an additional widget into the app and I realized that I ought to make the kind be a little more specific. So I renamed the first kind from AppWidget to DailyPromptWidget ... and made the second widget use a kind named DailyCheckInWidget.
Then, we started seeing issues where the widget wasn't responding to taps and would eventually go blank. I could add in a new widget to the home screen and that'd work fine. Searching the Internet for ideas yielded nothing.
I connected my iPhone to my Mac and launched the Console app and then started tapping on the non-responsive widget. I discovered a few output messages like this:
Timeline[my.bundle.id::my.bundle.id.widgetid:AppWidget:systemMedium::338.00/158.00/21.60:(null)]--CD0C49416486::0xc46382000) Unable to create CHUISWidgetLaunchRequest without a effectiveContainerBundleIdentifier
I was able to reproduce the issue by renaming the bundle ID of the widget (and leaving the working widget on the home screen). Tapping it gave the same exact error.
Another error, which clued me in more:
Content load failed: unable to find or unarchive file for key: [my.bundle.id.widgetid:AppWidget:systemMedium::338.00/158.00/21.60:(null)] on no host. The session may still produce one shortly. Error: Using url `file:///private/var/mobile/Containers/Data/PluginKitPlugin/012DB9D2-07F7-4383-9CCE-B040652B7999/SystemData/com.apple.chrono/placeholders/AppWidget/systemMedium----338.00w--158.00h--21.60r--0f--0.00t-0.00l-0.00b0.00t.chrono-timeline` ... Error Domain=NSCocoaErrorDomain Code=4 "The file "systemMedium----338.00w--158.00h--21.60r--0f--0.00t-0.00l-0.00b0.00t.chrono-timeline" doesn't exist." UserInfo={NSFilePath=/private/var/mobile/Containers/Data/PluginKitPlugin/012DB9D2-07F7-4383-9CCE-B040652B7999/SystemData/com.apple.chrono/placeholders/AppWidget/systemMedium----338.00w--158.00h--21.60r--0f--0.00t-0.00l-0.00b0.00t.chrono-timeline, NSUnderlyingError=0x3025a1d10 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
So, I tried finding those files in the simulator data on my Mac. Inside the placeholders/ directory are directories with the names of all the widget kind I had used (the old and the new). Inside those named kind directories are, what look to be, files representing each timeline entry.
It appears that if you change the kind string in your widget's configuration, the widget you've added to your home screen does not get updated and will continue looking for the old timeline entry files in the original kind directory.
The solution? Either don't rename the kind once you've released it on the App Store, or instruct customers to remove the widget and add it back after they've installed your app update.
It'd be nice if an app update would also update the kind directory name.
I have a demo AppClip which does Passkey registration and assertion in a wizard style page collection. Very often, the assertion would fail with the error "Couldn't communicate with a helper application". Retrying it few times will eventually work.
Full error:
Connection to agent service interrupted with error: Error Domain=NSCocoaErrorDomain Code=4097 "Couldn’t communicate with a helper application."
I don't know exactly what's causing this and how to prevent it? It only seems to happen during assertion, not registration.
I'm using RoomPlan to create a 2-d layout of a room. Because it's just a single room, I want to present it 'squared' up, see my picture
First off, is there any options in the ARView that was used with the scan to sort of zero out the orientation so that it creates a room layout that is not on an angle?
If not...
Is there a well known mathematical formula to snap this to the closest 90 degrees? I tried just changing the rotation of each wall to snap to the nearest 90 degrees, but it wasn't quite good enough as they no longer joined together cleanly. Perhaps there's an algorithm for doing this while preserving the relative locations of everything?
I show some content in LiveActivity Dynamic Island and added a button. As buttons work with App Intent I created an Intent. When the button is clicked I get the following error
Could not find an intent with identifier MyIntent, mangledTypeName: Optional("19LiveWidgetExtension10MyIntentV")
MyIntent.swift
import Foundation
import AppIntents
struct MyIntent: LiveActivityIntent {
public init() { }
func perform() async throws -> some IntentResult {
print("click")
return .result()
}
}
MyLiveActivity.swift
...
DynamicIslandExpandedRegion(.bottom) {
HStack(alignment: .top) {
Button(intent: MyIntent()) {
Image(systemName: "bolt.fill")
}
}
.tint(.white)
.padding()
}
....
The Intent is added to all targets. Any ideas?
I'm developing an iOS app that uses ScreenTime API.
Locally, everything works as expected - I have two physical devices in one Apple Family, and calling AuthorizationCenter.shared.requestAuthorization(for: .child) on a child device shows standard authorization dialog.
Currently the app is in a review by Apple, and they are saying they can't authorize as a child. From logs, and a screenshots provided by them, I see that on AuthorizationCenter.shared.requestAuthorization(for: .child) call, FamilyControlsError.restricted error is being thrown.
I didn't encounter this error once during development and can't simulate this issue now either. Tried everything - authorization on account that is not a child, not in a family, tried restricting everything possible for a child's device from ScreenTime settings. This specific error is never triggered.
Does anyone have idea why this error could happen? My last guess is the review team is using an enterprise account and that somehow intercepts with ScreenTime settings. But I don't have an enterprise account to test this theory.
I'm currently experimenting with the latest Xcode beta 15.3 (15E5194e) and attempting to integrate FinanceKit](https://developer.apple.com/documentation/financekit) into my project. However, I've encountered a persistent issue where the app crashes upon attempting to read or request authorization, accompanied by the following error message:
FinanceKit/FinanceStore+FinancialDataAuthorization.swift:52: Fatal error: Process is not entitled
Upon investigation, I've found no evident entitlements for FinanceKit, despite exploring options like Apple Wallet. Furthermore, I thoroughly examined the info.plist for relevant privacy values but found nothing pertinent.
Here's the code snippet that triggers the fatal error, whether it's the request or read function:
I don't see anything in entitlements for FinanceKit (I tried Apple Wallet and that didn't make a difference). Additionally, I checked for relevant privacy values for the info.plist but again didn't see anything relevant.
Here is the code to reproduce the error (note calling either function will result in the same fatal error):
import FinanceKit
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
requestFinancePermission()
// readFinancePermission()
}
private func requestFinancePermission() {
Task {
do {
let status = try await FinanceStore.shared.requestAuthorization()
} catch {
print("Error: \(error)")
}
}
}
private func readFinancePermission() {
Task {
do {
let status = try await FinanceStore.shared.authorizationStatus()
} catch {
print("Error: \(error)")
}
}
}
}
I'm seeking clarification on whether FinanceKit is currently usable or if there are additional steps needed for proper integration. Any insights or suggestions would be greatly appreciated. Thank you!
Our app has a share extension. And we recently noticed something with iOS 17.3.1.
From Safari, when we receive the plist and try to load it, we are seeing exceptions for classes not allowed to be unarchived.
[itemProvider loadItemForTypeIdentifier:[UTTypePropertyList identifier] options:nil completionHandler:^(NSDictionary *jsDict, NSError *error) {
}
We see these exceptions:
value for key 'NS.keys' was of unexpected class 'NSString' (0x1ee7d2970) [/System/Library/Frameworks/Foundation.framework].
Allowed classes are:
{(
"'NSDictionary' (0x1ee7cad38) [/System/Library/Frameworks/CoreFoundation.framework]"
)}
(null)
Our preprocessing javascript file is basic, and only passes a title and URL as part of the payload.
arguments.completionFunction({
"URL": document.URL
"title": document.title,
});
Here's my codes:
extension NSMutableString {
func clear() {
replaceCharacters(in: NSRange(location: 0, length: length), with: String(data: Data.init(repeating: 0, count: length), encoding: .utf8)!)
replaceCharacters(in: NSRange(location: 0, length: length), with: "")
}
}
My app receive some random rare crash report on the line: replaceCharacters(in: NSRange(location: 0, length: length), with: String(data: Data.init(repeating: 0, count: length), encoding: .utf8)!)
Crash logs:
Last Exception Backtrace:
0 CoreFoundation 0x19f228870 __exceptionPreprocess + 164 (NSException.m:249)
1 libobjc.A.dylib 0x197543c00 objc_exception_throw + 60 (objc-exception.mm:356)
2 CoreFoundation 0x19f2f0d10 _CFThrowFormattedException + 108 (CFObject.m:2245)
3 CoreFoundation 0x19f26094c mutateError + 96 (CFObject.m:599)
4 CoreFoundation 0x19f185770 -[__NSCFString replaceCharactersInRange:withString:] + 72 (CFObject.m:608)
5 MyApp 0x10122c67c NSMutableString.clear() + 224 (NSMutableString.swift:22)
6 MyApp 0x1012974f4 UserData.loggedOut() + 56 (UserData.swift:58)
7 MyApp 0x100fac7dc AuthenticationManager.didLogout(isSessionExpired:preventAutoLoginByFaceID:) + 60 (AuthenticationManager.swift:200)
The thing is I couldn't reproduce it and the crash is rare so I run out of idea, and would hope to receive some suggestions from the forum. Thank you.
FeedbackID: FB13636921
I'm using /usr/sbin/screencapture -v -x -C -k -R 0,0,500,500 /path/to/a/movfile/in/a/folder/in/my/apps/sandbox/Group/Container in my app to allow users to capture screenshots and recordings.
Screenshots keep working fine on macOS Sonoma 14.4b23E5196e, but video recordings no longer work.
I'm guessing the following log output has something to do with it:
default 15:01:53.151819+0100 screencapture sampleBuffer: start recording time: 3123.604833 target: 3123.474266, overshot: 0.130568
error 15:01:53.185179+0100 screencapture <private>:246:<private> Not writable url (null).!folderIsWritable == true
error 15:01:53.185236+0100 screencapture <private>:50:<private> We could not create a byte stream!
error 15:01:53.185252+0100 screencapture <private>:87:<private> NULL byte stream.
error 15:01:53.185298+0100 screencapture <private>:3479:<private> ### Err -45,
error 15:01:53.185312+0100 screencapture <private>:3814:<private> ### Err -45,
error 15:01:53.185334+0100 screencapture <<<< AVCaptureMovieFileOutput >>>> Fig assert: "status == 0 " at (AVCaptureMovieFileOutput.m:2522) - CMIOFileWritingControlTokenStartWriting (err=-45)
error 15:01:53.185374+0100 screencapture <private>:1885:<private> ### Err -67452,
error 15:01:53.185388+0100 screencapture <private>:303:<private> FigMovieFormatFileWriter::PostProcessMovie: WriteMovie() errored!!! -67452
error 15:01:53.185476+0100 screencapture <private>:4687:<private> consolidate movie fragments err : -17913
default 15:01:53.185610+0100 screencapture <<<< AVError >>>> AVLocalizedErrorWithUnderlyingOSStatus: Returning error (AVFoundationErrorDomain / -11800) status (-45)
default 15:01:53.186201+0100 screencapture didFinishRecording: No trim finish. duration: 0.000000s size: 0, error: Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={AVErrorRecordingSuccessfullyFinishedKey=false, NSLocalizedDescription=The operation could not be completed, NSLocalizedFailureReason=An unknown error occurred (-45), NSURL=file:///Users/eternalstorms/Library/Group%20Containers/group.com.apple.screencapture/ScreenRecordings/3ED15EE7-A814-47A7-A398-29D5A6AD03C1.mov, NSUnderlyingError=0x6000031d80c0 {Error Domain=NSOSStatusErrorDomain Code=-45 "fLckdErr: file is locked"}}
error 15:01:53.186290+0100 screencapture recording failed. The operation could not be completed
Are there new entitlements we need for this in our apps starting with macOS Sonoma 14.4? Or is it a bug? Calling it directly from Terminal works.
Thank you,
Matthias
Apple has a QR code-like pattern called App Clips, which is circular. It only displays corresponding information when scanned with an iPhone camera. There are detailed official documents explaining how to create this pattern, available at: https://developer.apple.com/documentation/app_clips/creating_app_clip_codes/creating_app_clip_codes_with_the_app_clip_code_generator
However, there is no official documentation on how third parties can scan and recognize the information in App Clips. Like QR codes, there are many third-party applications that can read the information in QR codes, but there is no instruction on how to retrieve information from App Clips patterns.
App Clips image:
my app intent is to read the pasteboard and save data to app with swiftData.
it worked very well on Simulator, but didn't work on my device