Posts

Post not yet marked as solved
0 Replies
104 Views
I need to detect right-clicks / two-finger clicks with a trackpad or mouse on an iPad inside an action extension. I am finding that if I put a UITapGestureRecognizer in a view controller inside an action extension and set its allowedTouchTypes to UITouch.TouchType.indirectPointer, the gesture recognizer does not fire and none of the UIGestureRecognizerDelegate methods are ever called. The same code inside a standalone app works, just not in an action extension. This happens on both iPadOS 15.5 and iPadOS 16. I can filed FB10296917 regarding this, but it seems odd enough that I wanted to ask here whether I might be missing something.
Posted Last updated
.
Post not yet marked as solved
0 Replies
94 Views
Is there anything to watch out for or any steps one should take with regard to iCloud Backup and data in SQLite files? I am nervous about the fact that my sqlite databases each have a .sqlite file, a .sqlite-shm file, and a .sqlite-wal file – and wondering whether iCloud backup could end up restoring different versions of these files.
Posted Last updated
.
Post not yet marked as solved
0 Replies
145 Views
I am experimenting with Sign in with Apple and I have a few questions: First, regarding initial login: An ASAuthorizationAppleIDCredential includes both an authorizationCode so that the server can perform validation, and an identityToken with a signed JWT. If my server uses the authorizationCode to get credential information from appleid.apple.com, can I safely ignore the identityToken returned to the ASAuthorizationControllerDelegate? Or is there a reason I should verify that as well. If I do not verify the identityToken should I still set a nonce on the ASAuthorizationAppleIDRequest? Second, regarding notifications of Apple ID changes: It seems like getCredentialState, server-side token requests based on refresh tokens, and Server to Server notifications all serve the purpose of letting an app find out about changes to an Apple ID. Do I need to implement all three of these, or should any one be sufficient? Finally, I am not sure I need to know about Apple ID changes at all. Can I ignore all of these, and not worry about Apple ID status changes for users already logged into a device? I do not use the account name or email address at all, just the user identifier. Thanks. John
Posted Last updated
.
Post not yet marked as solved
5 Replies
2.1k Views
I want a widget to use the same custom fonts that the containing app uses. I do not want multiple copies of the font files in the app bundle. I put the font files into a framework shared by the app and the widget extension. I have code to register the fonts from the framework bundle using CTFontManagerRegisterGraphicsFont. That works from the app, but it does not work from the widget extension because it requires UIKit. (At least I think that's why it doesn't seem to work from my widget extension.) Widgets cannot run UIKit code. Is there a way to programmatically register the fonts in a widget? If not is there a way I can make a UIAppFonts Info.plist entry point to a framework?
Posted Last updated
.
Post not yet marked as solved
2 Replies
738 Views
I am looking for a way to apply custom fonts and colors to context menus. I was able to change UIAction text color with the appearance manager:[[[UILabel class] appearanceWhenContainedInInstancesOfClasses:@[NSClassFromString(@"_UIContextMenuActionView")]] setTextColor:[UIColor greenColor]];But doing the same with the font does not work for me:[[[UILabel class] appearanceWhenContainedInInstancesOfClasses:@[NSClassFromString(@"_UIContextMenuActionView")]] setFont:[UIFont systemFontOfSize:30]];Similarly I cannot find a way to apply custom colors to the separator lines between UIActions or inline UIMenus.Is there a way to do this?Thanks.John
Posted Last updated
.
Post not yet marked as solved
2 Replies
755 Views
I am running into a weird bug where videos embedded in WKWebViews do not appear. I get audio, but the screen goes black. A few notes: This happens on iOS 15 and the 15.1 beta, but not iOS 14.8. I have three WKWebViews in the view hierarchy. If I reduce the number of WebViews to one, I do not encounter this issue. When I encounter this issue with one WebView, playing the same video from another WebView will work. It seems to happen more often when in dark mode than in light mode. This might be an Apple bug, but I have not been successful in building a standalone app that can reproduce this.I know this isn’t a lot to go on, but if anyone has pointers or can suggest something to try I would appreciate it. Thanks. John
Posted Last updated
.
Post not yet marked as solved
0 Replies
303 Views
In earlier iPadOS betas I used the globe-Q keyboard shortcut to create a Quick Note. This no longer works for me, and I am not sure why. I do not see the keyboard shortcut listed if I hold down the globe key. Was the keyboard shortcut removed? Could the problem be that I have a Magic Keyboard (not designed specifically for an iPad) and have the function key mapped to the globe key? John
Posted Last updated
.
Post not yet marked as solved
0 Replies
297 Views
I have code to create a new window with UIApplication.shared.requestSceneSessionActivation. I now want that window to have the prominent presentation style (UIWindowScenePresentationStyleProminent) on iPadOS 15. But it is not clear to me how to get that presentation style when using requestSceneSessionActivation. What am I missing?
Posted Last updated
.
Post not yet marked as solved
0 Replies
563 Views
I have been having trouble submitting my app to App Store Connect after building it with Xcode 13. I figured out that if a project contains this Objective-C code, App Store Connect will reject the app claiming it to use NSConstantDictionary as a private API: NSDictionary *myDictionary = @{@"a":@"b", @"c":@"d" }; NSLog(@"myDictionary: %@", myDictionary); I suspect the same issue exists for NSArray, at least when written with @[@"a", @"b"] notation. I filed FB9188387 regarding this. It seems like a pretty big problem. The FB includes a very simple sample project that gets rejected with the error above. The same project archived and submitted by Xcode 12.5 is accepted. The FB also contains a copy of this sample project with the two lines above commented out. That is accepted and processed by App Store Connect. John
Posted Last updated
.
Post not yet marked as solved
0 Replies
238 Views
I understand that I cannot display attributed strings in SwiftUI, and therefore that I cannot display them in widgets. Am I right that there is also no ability to use Core Text to display formatted strings in widgets? It looks to me like my options for displaying text in widgets are Text views and images generated by my app. I just want to confirm that this is the case. Thanks.
Posted Last updated
.
Post not yet marked as solved
0 Replies
226 Views
Is there a way to calculate what the height of a VStack of Text views would be if added to a view, but to do so without necessarily adding it? I am trying to figure out if I need to use NSAttributedString code to calculate formatted string heights. Thanks. John
Posted Last updated
.
Post not yet marked as solved
0 Replies
322 Views
I am implementing support for hardware keyboard shortcuts in an iOS app. I am sometimes seeing issues where keyboard input (key commands or even just typing into text fields) is *only* going to my app. If I switch to Apple Mail, Apple Mail doesn't see my typing until I reboot the device. Even command-tab fails to bring up the app switcher.Other times I see keyboard input not working at all, with the exception of command-space bringing up the app switcher.Is this an iOS bug or could I be doing something to cause this?John
Posted Last updated
.
Post not yet marked as solved
0 Replies
550 Views
I can reproduce this bug in my app and in some other apps, including Apple Notes:1. Start with the app running on an iPad with a Bluetooth keyboard.2. Put Safari to the right of the app in split view.3. Make sure the app to the left is the active app and is responding to keyboard input.4. Move the split view divider all the way to the right, making the app on the left the only one on the screen.Result: The app remaining on the screen does not see keyboard commands until I touch the screen. Holding the command key does not bring up the list of keyboard shortcuts.I see this bug in a few apps, but not in all. It appears to me that the appropriate subview is the first responder, but it is not receiving UIKeyCommands.This code from a sample app demonstrates the problem. If I create a sample app with this view controller and go through the process above, when I return to the app I will not be able to scroll the webview with the Bluetooth keyboard.class ViewController: UIViewController { var webView: WKWebView? override func viewDidLoad() { super.viewDidLoad() let webView = WKWebView(frame: self.view.bounds) webView.translatesAutoresizingMaskIntoConstraints = false webView.load(URLRequest(url: URL(string: "https://www.goldenhillsoftware.com/unread/")!)) self.view.addSubview(webView) self.view.addConstraint(webView.leftAnchor.constraint(equalTo: self.view.leftAnchor)) self.view.addConstraint(webView.rightAnchor.constraint(equalTo: self.view.rightAnchor)) self.view.addConstraint(webView.topAnchor.constraint(equalTo: self.view.topAnchor)) self.view.addConstraint(webView.bottomAnchor.constraint(equalTo: self.view.bottomAnchor)) webView.becomeFirstResponder() self.webView = webView } }Any idea how I can avoid this in my app?Thanks.John
Posted Last updated
.