Post

Replies

Boosts

Views

Activity

One embedded framework takes forever to sign when uploading
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?
2
0
1.1k
Jul ’22
Shortcut action that should return a file deletes the file instead
I have an app intent that returns a file from inside the Sandbox. With iOS 18 RC, the call to INFile results in the file being deleted, instead of the file being returned. intentResponse.file = INFile(fileURL: fileURL, filename: fileName, typeIdentifier: nil) This seems to happen if the file was created by an earlier Shortcut action that calls FileManager().copyItem(), but not for files created by other means. I haven't found a reference in the developer documentation about INFile resulting in the file being deleted. I can block FileManager() from deleting the file by setting its immutable attributes to true, but that prevents me from removing it later.
3
2
438
Sep ’24
Symbol not found from libc++ on iOS
Hi, I've had one user report that, when trying to dlopen() a dynamic library embedded inside a framework, they are hit by an error that a symbol from /usr/lib/libc++.1.dylib is not found. To the best of my knowledge, that's a single user being hit (let's say the event has a low probability). Here's the full error message from dlopen(): dlopen(clang.framework/clang, 0x0009): Symbol not found: ZNSt3122_libcppverbose_abortEPKcz Referenced from: <> /private/var/containers/Bundle/Application/<UUID>/a-Shell.app/Frameworks/clang.framework/clang Expected in: <UUID> /usr/lib/libc++.1.dylib How can I fix that? What could be the reason for libc++.1.dylib having a different content on a specific machine?
2
0
324
Aug ’24
Unable to open more than 2560 Pipe() (even if I close them)
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?
1
0
430
Apr ’24
"File not found error" for some users on iCloud Drive for iOS
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.
0
0
520
Feb ’24
contentTypesForRecentDocuments
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.
0
0
257
Jan ’24
Offloading issues, for an App that is mostly used for Shortcuts
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?
0
0
467
Oct ’23
JavaScriptCore / WkWebView JavaScript engine speed comparison
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?
1
0
1.5k
Apr ’23
WkWebView changes the string being pasted
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.
0
0
805
Apr ’23
How can I debug issues with Stage Manager and External Displays
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).
1
1
933
Dec ’22
Some users are unable to load dynamic libraries from frameworks
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?
12
0
1.4k
Oct ’22
Is there a way to know if a WkWebView is using scribble?
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.
0
0
850
Sep ’22
Shortcut app crashing when Intent parameter has multiple value
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?
1
0
1k
Oct ’21