iPadOS is the operating system for iPad.

Posts under iPadOS tag

185 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

parallax on iPadPro
Is apple still deciding what we can view, disabling parallax on websites (safari) or is there a workaround? I am a graphic designer and web developer with an iPad Pro. iPadPro uses "desktop" css not tablet (due to its larger size), so it looks like the desktop website but the beautiful features of parallax are missing. Not helpful with troubleshooting and editing websites on iPadPro after hours. Anyone know a way to force parallax to work?
1
0
604
Mar ’24
WKWebView fails to open .doc file
I'm currently using a WKWebView to load certain types of documents via loadRequest, but I've recently been running into an issue with .doc files doing this: static NSString *customScheme = @"customscheme"; @interface WordDocWKSchemeHandler : NSObject <WKURLSchemeHandler> @end @implementation WordDocWKSchemeHandler { NSData *_data; NSString *_mimeType; } - (instancetype)initWithData:(NSData*)data mimeType:(NSString*)mimeType{ self = [super init]; if (self) { _data = data; _mimeType = mimeType; } return self; } - (void)webView:(WKWebView *)webView startURLSchemeTask:(id<WKURLSchemeTask>)urlSchemeTask { NSURL *url = urlSchemeTask.request.URL; if (![url.scheme isEqualToString:customScheme]){ return; } NSURLResponse *response = [[NSURLResponse alloc] initWithURL:url MIMEType:_mimeType expectedContentLength:_data.length textEncodingName:@""]; [urlSchemeTask didReceiveResponse:response]; [urlSchemeTask didReceiveData:_data]; [urlSchemeTask didFinish]; } - (void)webView:(WKWebView *)webView stopURLSchemeTask:(id<WKURLSchemeTask>)urlSchemeTask{ //empty } @end - (void)_setupWebViewPropertiesAndConstraints{ _webView.navigationDelegate = self; _webView.hidden = YES; [self.view addConstrainedSubview:_webView]; [self.view addConstraints:[_webView constraintsForFillingSuperview]]; self.container.showsLoadingIndicator = YES; } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; WKWebViewConfiguration *docConfig = [WKWebViewConfiguration new]; WordDocWKSchemeHandler *schemeHanlder = [[WordDocWKSchemeHandler alloc] initWithData:_content.data mimeType:_content.contentType]; [docConfig setURLSchemeHandler:schemeHanlder forURLScheme:customScheme]; //Setup webview with custom config handler _webView = [[WKWebView alloc] initWithFrame:self.view.frame configuration:docConfig]; [self _setupWebViewPropertiesAndConstraints]; NSURL *customURL = [NSURL URLWithString:[NSString stringWithFormat:@"\%@:/",customScheme]]; [_webView loadRequest:[NSURLRequest requestWithURL:customURL]]; } The mimeType is correctly being resolved to "application/msword" but any time we try to load this the navigation fails: -(void)webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error { The error message here is OfficeImportErrorDomain Code=912. I've tried this on both a simulator and actual device on iOS 17 and 16 and this always fails. I've also tried turning the data into a base64 string and loading it that way and this also fails. Any advice here would be appreciated. It seems like this used to work at some point but no longer works.
0
0
592
Mar ’24
Show overflow menu (more menu) as disabled in iOS 16+
Hi! I'm moving my UINavigationBar and UINavigationItem to the iOS 16 style and having trouble with disabling buttons. Before: I'm defining rightBarButtonItems with a few barButtonItems plus a (custom) menuButtonItem (which has a menu with some more actions). After: I'm defining trailingItemGroups and let the system create an overflow menu dynamically, depending on space. I'm also defining some additionalOverflowItems. Here's the problem: How can I access the button/barButtonItem that is showing the overflow menu and call isEnabled = false? My UI, so far, has disabled all buttons during edit mode. I don't want to hide them, but have them grayed out, including the overflow menu button. class MyVC : UIViewController { // ... override func setEditing(_ editing: Bool, animated: Bool) {         super.setEditing(editing, animated: animated) // ... // This doesn't disable the overflow menu button         navigationItem .trailingItemGroups .forEach { $0.barButtonItems .forEach { $0.isEnabled = !isEditing } }     } }
1
0
455
Feb ’24
Crash in background for iOS 17.3.0 and later devices
We found crash reports from Xcode organizer about some crashes happening only in iOS and iPadOS version 17.3.0 and later across all our releases mostly in background state related to Network SDK. Unfortunately, we are unable to reproduce the issue. On the crashed thread, it seems to refer to process from Network SDK but we never import and use it directly in our project. Most of the functions found in the main thread in the crash report can't be accessed from the project, it seems to be internal framework calls in iOS SDK. The crash pointing to this line of code: nw_protocol_error Bug number: FB13661192 Somehow I cannot attach any crash report here, it always return error This post contains sensitive language. Please revise it in order to continue. whenever I try to submit it. If I remove it, I can submit the post.
4
0
1k
Mar ’24
iPad 10th generation top header text becomes invisible only in app initial launch.
I’m creating a hybrid app using Swift and Angular. Angular content is loading on top of the Native Swift WkWebView. Starting from iPad 10th generation only in the app initial launch header area become invisible(invisible means header text becomes white). But once I send the app to background and return to foreground header text becomes black and it will show without problem. I would really like to know whether this is a OS problem and if so is there any pro-grammatical solution for this? if anyone can guide me to proper way fix this much a appreciated!!! Environment: ・Device: iPad 10th generation ・OS:iPad OS 17.3.1 ・Native App : Swift 5
1
0
592
Feb ’24
onKeyPress not working on iOS/iPadOS 17.4 but fine on macOS
According to a post on hackingwithswift.com, this should work on iOS/iPadOS: import SwiftUI struct ContentView: View { @FocusState private var focused: Bool @State private var key = "" var body: some View { Text(key) .focusable() .focused($focused) .onKeyPress { press in key += press.characters return .handled } .onAppear { focused = true } } } It does not work for me using a hardware keyboard on an iPad running the latest iPadOS 17.4 beta but it does work on my Mac. FB13644182
1
0
572
Feb ’24
iPad attempting to import Journaling Suggestions
I am using #canImport(JournalingSuggestions), but something is going wrong and my app is attempting to import the framework on iPad, and crashing on launch. How can I ensure that it's properly filtered out from everything except iPhone? import SwiftUI #if canImport(JournalingSuggestions) import JournalingSuggestions #endif struct JournalingSuggestionsView: View { var body: some View { #if canImport(JournalingSuggestions) JournalingSuggestionsPicker { Text("Open Journaling Suggestions") } onCompletion: { suggestion in print(suggestion) } #else Text("Journaling suggestions not available on this platform.") #endif } } Error: dyld[8689]: Library not loaded: /System/Library/Frameworks/JournalingSuggestions.framework/JournalingSuggestions Referenced from: <A656E6BC-4883-3245-BE71-3F84C2F41119> /private/var/containers/Bundle/Application/C6C11F57-AFAA-442A-B726-7AADDDB50D79/Catalog.app/Catalog Reason: tried: '/System/Library/Frameworks/JournalingSuggestions.framework/JournalingSuggestions' (no such file), '/private/preboot/Cryptexes/OS/System/Library/Frameworks/JournalingSuggestions.framework/JournalingSuggestions' (no such file), '/System/Library/Frameworks/JournalingSuggestions.framework/JournalingSuggestions' (no such file, not in dyld cache) System info: Xcode 15.2 iPadOS 17.3.1
15
1
1.7k
4w
PKDrawing.image crashes on iOS 17 (EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000210)
In 2 days we have observed in Crashlytics over 50 crashes related to PKDrawing.image with EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000210 So far all on iPads with A10, A12 and A13; 100% on iOS 17 (17.1.1, 17.2, 17.3) (while in others the percent of iOS 17 was around 60-80%). Context: Images of the varying frame and scale resulting in screen resolution are being generated sequentially (in a background serial queue called almost one after another when requested), updating one CALayer.contents (and only after this update on Main Thread the next generation is allowed). One zoomable PKCanvasView is present on screen. The crashing line in code: let image = drawing.image(from: frame, scale: renderScale).cgImage The questions: Is there anything that can be done apart from throttling generation? Can the circumstances of the crash be determined – are there any indications accessible in code before calling PKDrawing.image that app might crash? The traces: 0 AGXMetalA12 AGX::BlitContext<AGX::G11::Encoders, AGX::G11::Classes, AGX::G11::ObjClasses>::copyTextureToBuffer(IOGPUMetalResource const*, unsigned long, unsigned long, unsigned long, AGXA12FamilyTexture*, unsigned int, unsigned int, MTLOrigin, MTLSize, unsigned long) + 96 9 PencilKit PKDrawing.image(from:scale:) + 28 0 AGXMetalA13 <redacted> + 96 9 PencilKit PKDrawing.image(from:scale:) + 28 0 AGXMetalA10 <redacted> + 72 9 PencilKit $s9PencilKit9PKDrawingV5image4from5scaleSo7UIImageCSo6CGRectV_12CoreGraphics7CGFloatVtF + 24
2
1
879
Feb ’24
QLSupportedContentTypes cannot contain system-supported types (UTIs)
Hi folks, My app is reading proprietary files with the file name extension .JPX - which is out of my control. In addition I’m providing QuickLook and Thumbnail extensions, used system-wide and in my app. Unfortunately iOS is assigning the JPEG-2000 file type (UTI „public.jpeg-2000“) to this file extension, and therefore - to work with associated files - my app is importing this UTI and both extensions are listing „public.jpeg-2000“ in their info.plist as QLSupportedContentTypes. This works to some extent in simulators and when debugging from Xcode on a device: Files with the file extension „.JPX“ are listed with thumbnails provided by my extension, although the preview seems to invoke the system-provided viewer and fails. Not perfect, but good enough as my app requires an icon preview (aka thumbnail) in its UIDocumentBrowserViewController. But when I try to submit my app incl. extensions to the Apple App Store / TestFlight asset validation is reporting an error: „Asset validation failed. Invalid Info.plist value. The value for the key ‚QLSupportedContentTypes‘ in bundle … is invalid. [public.jpeg-2000] are system-supported types.“ How to assign QuickLook / Thumbnail extensions to 3rd party files types whose extension is conflicting with a system-supported UTI? I just spent one of my TSIs for this question - as my Apple developer membership is renewed shortly - but maybe this community as some smart tip to share... Appreciate any help, Mattes
1
0
844
Feb ’24
How to prevent the NavigationSplitView from reseting the detail NavigationStack to it's root on selection change
I am currently investigating converting a large macOS, iOS, and iPadOS app from using AppKit and UIKit for the front end to using SwiftUI. This app uses a sidebar/source list style window on macOS and iPadOS. The content/detail portion of the window displays hierarchal information so you can drill in for details and back out to get an overview. In this application the selection in the sidebar changes how the information in the content/detail area is displayed but not what information is displayed. The included ContentView SwiftUI code shows an example of this. The sidebar lets you change the background color of the detail view and the content of detail view provides all of the "links" to navigate forward to see more data. To try and make this work I am using a NavigationSplitView with a List for the sidebar and a NavigationStack for the detail. The sidebar list takes a selection binding and the list contents uses tags to map the selection. It does not use NavigationLink and the selection state variable is not used in the NavigationStack of the detail view. With this setup, I would expect there to be no relationship between the sidebar and detail views. The problem is whenever the selection in the list in the sidebar changes the NavigationStack in the details backs up to its root view. I have included an example ContentView showing this behavior. Is there anyway to prevent this? Should I file a "feedback" to request this functionality? Thank you in advance for any help. @State var path: [ContentView.Step] = [] @State var color: Color? = .clear var body: some View { NavigationSplitView { List (selection: $color) { Text ("Clear").tag(Color.clear) Text ("White").tag(Color.white) Text ("Blue").tag(Color.blue) Text ("Green").tag(Color.green) } } detail: { NavigationStack (path: $path) { VStack { NavigationLink(value: ContentView.Step.a) { Text("Push A") } NavigationLink(value: ContentView.Step.b) { Text("Push B") } NavigationLink(value: ContentView.Step.c) { Text("Push C") } Image(systemName: "globe") .imageScale(.large) Text("Hello, world!") } .navigationDestination(for: ContentView.Step.self) { step in step.body .toolbar { ToolbarItemGroup(placement: .automatic) { Button { _ = path.popLast() } label: { Text("Back") } .disabled (path.count <= 0) } } } } .frame(maxWidth: .infinity, maxHeight: .infinity) .background(color) } } enum Step: Hashable { case a case b case c var body: some View { Group { switch self { case .a: VStack { Text ("A") NavigationLink(value: ContentView.Step.b) { Text("Push B") } NavigationLink(value: ContentView.Step.c) { Text("Push C") } Image(systemName: "globe") .imageScale(.large) .hidden() Text("Hello, world!") } case .b: VStack { NavigationLink(value: ContentView.Step.a) { Text("Push A") } Text ("B") NavigationLink(value: ContentView.Step.c) { Text("Push C") } Image(systemName: "globe") .imageScale(.large) Text("Hello, world!") .hidden() } case .c: VStack { NavigationLink(value: ContentView.Step.a) { Text("Push A") } NavigationLink(value: ContentView.Step.b) { Text("Push B") } Text ("C") Image(systemName: "globe") .imageScale(.large) .hidden() Text("Hello, world!") .hidden() } } } } } }
0
0
470
Jan ’24
Metal Issue on iPadOS with Xcode15
Hi, I'm using Whirlyglobe on iPad and iPhone and it worked fine so far until now. I upgraded to Xcode15, and now I have issues displaying the globe on my iPad. iPhone works without issues, but iPad throws the following error and doesn't display the globe anymore: "Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (00000004:kIOGPUCommandBufferCallbackErrorSubmissionsIgnored)" When I deploy with Xcode14.3.1, everything works fine. All systems MacOS and iPadOS, and iOS are updated to the latest versions, and I'm using MBP Max M1 any idea how to solve the issue? I guess it has to do with Metal... ?! thanks in advance, M.
0
0
519
Jan ’24
iOS 17 Update Causes App to Crash on Some Devices
When a user updates their device to iOS 17 (any version) on a device with MDM, our app crashes but only on some device, not all. The same app runs fine on iOS 16. We cannot recreate the issue in-house and even our customers cannot reliably recreate the crash as it only happens on some devices and not others. The crash we get is: SIGABRT: UICollectionView internal inconsistency: missing final attributes for cell Once the device gets this crash, the only way to fix it is to delete and reinstall the app and then everything works fine. Anyone having a similar issue with iOS 17 and MDM?
2
0
1.4k
Feb ’24
What to do with a visionOS (designed for iPad) app in App Store Connect?
My app has a destination "visionOS (designed for iPad)", not "visionOS". It works nicely in the Vision Pro simulator. Im confused with Apples documentation on how to prepare for the app store: https://developer.apple.com/documentation/visionos/making-your-app-compatible-with-visionos If the app uses a destination "visionOS (designed for iPad)" is it possible or required to provide Vision Pro screenshots in App Store Connect? In App Store Connect, it is possible to add a platform visionOS. Is my assumption correct, that this platform is only for destination "visionOS" and not for destination "visionOS (designed for iPad)"?
3
0
829
Jan ’24