Post

Replies

Boosts

Views

Activity

iOS 13 UITableViewCell drops layout constraint changes
I've got a table view whose cells are configured with autolayout constraints to handle a couple of slightly different layouts depending on their contents. I make the changes by setting the active property on the constraints that I want to activate or deactivate. This works fine until I put the app into the background and return to it. When I do this, it looks like my changes are lost and the cells' layout constraints return to the state they originally had in their nib file.This only occurs when running on iOS 13 with a build from Xcode 11. If I run on iOS 12 with a build from Xcode 10.3 or Xcode 11 I do not see this issue. If I run on iOS 13 with a build from Xcode 10.3 I do not see this issue.I've tried putting a symbolic breakpoint at -[NSLayoutConstraint setActive:] but it does not get hit when putting the app into the background or returning it to the foreground.Has anybody else run into an issue like this? Any hints? Thanks!
7
0
2.7k
Oct ’19
Can I specify the web site used for in-app password autofill?
My app is associated with multiple web sites (e.g. myapp.com, myappbonus.com, *.myappbonus.com), and depending on the user's account setup they may use a different web site to manage their account. I'd like to have password autofill save the correct web site with their account info. Currently, all accounts appear to be getting saved by password autofill associated with myappbonus.com. Is there any way to control which web site is saved with an account? My app's lists "myapp.com" and "*.myappbonus.com" in the associated domains entitlement, and myapp.com, myappbonus.com, and every subdomain of myappbonus.com all return the .well-known/apple-app-site-association file with the "webcredentials" key specified. myappbonus.com and its subdomains also include the "applinks" key, and have been for a while. I don't know how the app's behavior will be affected by specifying both "webcredentials" and "applinks" keys. Thanks for any assistance.
0
0
328
Mar ’21
How can I access audio attachment from INSendMessageIntent
I'm trying to add Siri support to my app for sending voice messages. I've implemented INSendMessageIntentHandling in my main app target. It looks like it's getting as far as recording the voice message and passing my intent handler an INSendMessageIntent with an audio attachment, but I'm not able to read the attachment file. func handle( intent: INSendMessageIntent, completion: @escaping (INSendMessageIntentResponse) -> Void ) { if let attachment = intent.attachments?.first, let audioFile = attachment.audioMessageFile, let fileURL = audioFile.fileURL { // This branch runs // fileURL is "file:///var/mobile/tmp/SiriMessages/89F738F7-6092-439A-B4FA-2DD9A99F0EED.caf" let result = processMessageAudio(url: fileURL) completion(result) return } // This line isn't reached completion(.init(code: .failure, userActivity: nil)) } private func processMessageAudio(url: URL) -> INSendMessageIntentResponse { var fileRef: ExtAudioFileRef? if url.startAccessingSecurityScopedResource() { logDebug("File access allowed") } else { // This branch runs logDebug("File access not allowed") } defer { url.stopAccessingSecurityScopedResource() } let openStatus = ExtAudioFileOpenURL(url as CFURL, &fileRef) // openStatus is -54 (kAudio_FilePermissionError) return INSendMessageIntentResponse(code: .failure, userActivity: nil) } I'm not sure what I'm missing. It looks like there should be an audio file, and Siri shows a preview of the audio for confirmation.
2
0
226
Oct ’24