Posts

Post not yet marked as solved
1 Replies
193 Views
Hi, I have an issue that I don't understand, and I need help. I am using Pipe() in Swift, and I found that if I create more than 2560 (more or less) pipes, I cannot create more. The call fails with Too many open files, even though I closed all the files associated with the pipes. This is a minimal code to reproduce the issue: for i in 0...1278 { NSLog("Testing: \(i)") let stdin_pipe = Pipe() let stdin_file = fdopen(stdin_pipe.fileHandleForReading.fileDescriptor, "r") var stdout_pipe = Pipe() var stdout_file = fdopen(stdout_pipe.fileHandleForWriting.fileDescriptor, "w") if (stdout_file == nil) { let errorString = String(cString: strerror(errno)) NSLog("Could not create an output stream. Error: \(errorString)") } do { // I'm really trying to close everything (but it doesn't matter): close(stdout_pipe.fileHandleForWriting.fileDescriptor) close(stdin_pipe.fileHandleForReading.fileDescriptor) try stdout_pipe.fileHandleForWriting.close() try stdin_pipe.fileHandleForReading.close() try stdout_pipe.fileHandleForReading.close() try stdin_pipe.fileHandleForWriting.close() } catch { NSLog("Error in closing pipes in MyExtension: \(error.localizedDescription)") } } It will work for i going to 0 to 1277, and fail for i == 1278. The error (obtained from strerror(errno) is Too many files open, even though there are around 6 file descriptors opened (I checked). What am I doing wrong?
Posted Last updated
.
Post not yet marked as solved
0 Replies
230 Views
I have an iOS app, based on the Documents Browser. That app has an iCloud folder, following all the instructions (NSUbiquitousContainers dict in Info.plist, and so on). As far as I can tell, it works for most of the users. But some users report that, after creating a file in the document browser window, they meet a "file not found" error and the app does not load the file. As far as I can tell: the files are created (the counter is incremented, I've see error with "Untitled 3: file not found"). FileManager() sees the files in question. somewhere inside the app, opening this file fails. How can I fix this? I'm not sure about the prevalence, but it seems to be rare but very annoying for the affected users.
Posted Last updated
.
Post not yet marked as solved
0 Replies
132 Views
Hi everyone, I have an iOS app that uses a DocumentBrowserViewController. According to the documentation, I should be able to set the contentTypesForRecentDocuments so that when the document browser shows "Recent", it only shows a certain type of documents (a subset of the types of documents that the app can open). Also according to the documentation, "You can define a subset of these types using the UIDocumentBrowserRecentDocumentContentTypes key in the app’s Info.plist file." I have tried several ways of setting the UIDocumentBrowserRecentDocumentContentTypes key in the app's Info.plist file, but I could not see any changes in the behaviour of the document browser. Alternatively, is there any way to tell the DocumentBrowserViewController to not start with "Recents"? It's extremely confusing for new users.
Posted Last updated
.
Post not yet marked as solved
0 Replies
309 Views
Hi, I have an app that is used by several Shortcuts. In many cases, users download the Shortcut, install the app, and only use the App through the Shortcut, and only through the in-extension Intent. They might never open the app. I've received complaints from users that the app keeps disappearing: apparently, because the app itself is never opened (only the in-extension Intent is), it doesn't count as an actual usage for offloading, and so the app gets offloaded. What can I do?
Posted Last updated
.
Post not yet marked as solved
1 Replies
1k Views
I ran a series of CPU-intensive tests, with code written in JavaScript on my iPad. I can execute the JavaScript code using either JavaScriptCore, or by using a WkWebView and making it load and execute the JavaScript. I found that JavaScriptCore is 12 to 15 times slower than WKWebView (18.3 s instead of 1.1 s). That seems huge. Is there any way to speed it up? Is there any reason why it's so slow? While we're at it, are there differences between the WebAssembly engine in JavaScriptCore and the one in WkWebView?
Posted Last updated
.
Post not yet marked as solved
0 Replies
674 Views
Hi, I just noticed something strange. When I call: webView?.paste("a://../../../123") (where webView is a WkWebView), the string that is pasted (that arrives in the JavaScript onPaste event handler) is: "a://../123". I think it has something to do with URL parsing. I would like to understand what is happening, and how to fix it.
Posted Last updated
.
Post not yet marked as solved
1 Replies
719 Views
Hello, I am getting reports from some users that one of my apps is behaving weirdly when: Stage Manager is enabled with an external display connected (presumably with app windows on the external display). I would like to debug this issue. However, I do not have an iPad compatible with Stage Manager. On the Simulator in Xcode, I can run an iPad with Stage Manager (good) and pretend to connect an external display (good), but I cannot move windows to the external display, so I cannot reproduce the issue. What can I do? (the app uses SwiftUI and UIScene. It does work with multiple windows on standard iPads, it does work with StageManager on the iPad simulator).
Posted Last updated
.
Post not yet marked as solved
12 Replies
1k Views
I have apps that depend on loading dynamic libraries at runtime. It works for most users, but a small number of users are reporting issues. The dlopen() call fails with the following error message: Failed loading awk from awk.framework/awk, cause = dlopen(awk.framework/awk, 0x0009): tried: '/private/var/containers/Bundle/Application/84E2C6C9-CCF1-4E92-9B4E-29557B0F9E 9E/a-Shell.app/Frameworks/awk.framework/awk' (could not register fairplay decryption, mremap_encrypted() => -1) From the error message, dlopen() has found the dynamic library (awk.framework/awk), but failed to open it because of an issue with fairplay or mremap_encrypted(). I haven't found any documentation on the issue. Do you have any idea what is happening?
Posted Last updated
.
Post not yet marked as solved
0 Replies
747 Views
I have a WkWebView that I use to run a text editor. It works fine with scribble, and I can enter text with the stylus. However, I would like to disable scrolling with the stylus while scribble is enabled (otherwise, the view moves around when the user writes). But I'd like to keep the scrolling ability if the user is not using scribble. Hence the question: is there a way to know when scribble has been enabled, or if it's been enabled for this specific WkWebView? It's actually a webView, using SwiftUI; I don't know if it changes something.
Posted Last updated
.
Post not yet marked as solved
1 Replies
829 Views
Hello, I have an iOS app with a lot of embedded frameworks. It works well when I start it from Xcode, it works well once it is on the AppStore or in TestFlight. My only problem is when uploading it using Xcode 13. At the "Processing symbols for ....framework" stage, when reaching a specific framework, it keeps going forever (I've tried letting it run for a night, and it did not move). I can upload with Xcode 12 without problems, but not with any version of Xcode 13 or 14. Since it keeps going forever, I do not have an error message that could help me in identifying the issue. The issue seems to be with a specific framework, but I cannot identify anything that this framework has that is different from the other frameworks (they've all been compiled from C code, using a Makefile and the same CFLAGS and LDFLAGS options). I couldn't find any similar issues on the forum. Do any of you guys have a suggestion on how to fix the issue?
Posted Last updated
.
Post not yet marked as solved
1 Replies
858 Views
Hi, I have an app that provides Shortcut actions. One of these actions can take as input an array of String, so I checked the "Supports multiple values" checkbox in Intents definition. Since iOS 15, I have this strange behaviour when creating a new Shortcut: if the action is the first to be added, I can add new strings as I want. if there is a node present before and the array is empty, then adding a string will crash the Shortcut app. (if there is a node present and the array is not empty, then I can add new strings, and even remove all the strings I added before and replace them) Running the Intents through Xcode debugger tells me the crash appens when initializing a multiple value parameter: 2021-10-16 09:26:37.209264+0200 Shortcuts[2431:41261] *** Assertion failure in -[WFMultipleValueParameterState initWithValue:], WFVariableSubstitutableParameterState.m:49 2021-10-16 09:26:37.209968+0200 Shortcuts[2431:41261] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: value' Am I the only one experiencing this? (a quick search through the forum says yes) How can I fix it?
Posted Last updated
.