Posts

Post not yet marked as solved
2 Replies
672 Views
Since Xcode 13.2.1 I get flooded with CVDisplayLink debug / warning messages. Like CVDisplayLink::start CVDisplayLink::stop 20 times a second or so. I think they may come from an WebView which runs an embedded version of the Ace editor. Does anybody know how to prevent the CVDisplayLink messages specifically ?
Posted Last updated
.
Post not yet marked as solved
0 Replies
452 Views
Hi, I would like to have in-app scripting support for my app and I am a bit uncertain what to use. I know there is a JS context available but JavaScript is a bit looked down upon when it comes to scripting solutions and I am also not the biggest fan. Is there any other scripting solution available which can be easily integrated with Swift and is a bit more modern and cooler ? Thanks
Posted Last updated
.
Post not yet marked as solved
1 Replies
881 Views
Hi, my app uses the multi-platform document based app template. All is fine on macOS, the user can manually initiate a save operation using menu or keyboard shortcuts. On iOS this is not possible, when the user clicks on the "<" symbol on the toolbar the changes in the document are lost. I guess I miss something here, am I supposed to create a save button myself ? But how ? EDIT: The default text based template works. I assume the TextEditor notifies the Document that the content changed ? On my custom document types this obviously does not work. Thanks for any feedback.
Posted Last updated
.
Post not yet marked as solved
3 Replies
1.1k Views
I installed the latest macOS Beta 10, but I cannot launch my apps from Xcode 12.2 beta 2 anymore because an instant crash: dyld`dylddebugger_notification Saw that Xcode 12.1 GM is out, downloaded it but the old problem I reported in Xcode 12 GM is back: Multiplatform apps gone from the New Project templates and existing Multiplatform apps cannot be compiled because of missing UniformTypeIdentifiers on OSX. This issue seems to only pop up in Xcode GMs but not in the betas. As Xcode 12.2 beta 2 does not work for me with Big Sur 11 beta 10 and I cannot reverse back to beta 9 my desktop setup seems to be wrecked for the moment.
Posted Last updated
.
Post not yet marked as solved
0 Replies
387 Views
Hi, is there an exhaustive list of the keywords of the Metal shading language available somewhere ? When writing syntax highlighting code it would really be nice to have one list available, instead of having to collect stuff bit by bit from all over the documentation. Thanks
Posted Last updated
.
Post marked as solved
7 Replies
2.1k Views
Support for Multiplatform apps (document based and normal) are gone from Xcode 12 GM and apps started with previous Xcode versions don't work anymore. So all the work on this in vain, including the WWDC 2020 sessions ?
Posted Last updated
.
Post not yet marked as solved
0 Replies
505 Views
When I create a class using the JSExport protocol @objc protocol Font_JSExports: JSExport { &#9;&#9; &#9;&#9;var name&#9;&#9;&#9;&#9;: String { get } } class Font&#9;&#9;&#9;&#9;&#9;: NSObject, Font_JSExports {&#9;&#9; &#9;&#9;var name&#9;&#9;&#9;&#9;: String &#9;&#9;var atlas&#9;&#9;&#9; : MTLTexture? &#9;&#9;init(name: String) &#9;&#9;{&#9; &#9;&#9;&#9;&#9;super.init() &#9;&#9;&#9;&#9;atlas = loadTexture( name ) &#9;&#9;} &#9;&#9; &#9;&#9;deinit { &#9;&#9;&#9;&#9;if let texture = atlas { &#9;&#9;&#9;&#9;&#9;&#9;texture.setPurgeableState(.empty) &#9;&#9;&#9;&#9;&#9;&#9;atlas = nil &#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;print("freeing font", name) &#9;&#9;} } And pass this class to the javascript context via a getFont() function &#9;&#9;class func getFont(_ name: String) -> Font &#9;&#9;{ &#9;&#9;&#9;&#9;let list = getFonts() &#9;&#9;&#9;&#9;for f in list { &#9;&#9;&#9;&#9;&#9;&#9;if f.name == name { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;return f &#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;return list[0] &#9;&#9;} And get a reference to the class from javascript class Test { &#9;&#9;constructor() &#9;&#9;{ &#9;&#9;&#9;&#9;this.font = System.getFont("Square") &#9;&#9;} } The deinit destructor of the font class will never get called when I delete the JSContext. How to pass object references to JavaScript which get deallocated when the JSContext gets destructed ?
Posted Last updated
.
Post not yet marked as solved
0 Replies
316 Views
I am using the new MultiPlatform SwiftUI Document template in Xcode 12 and I don't understand how to get access to the current FileDocument from within a menu item. My app code looks like this (straight from the template). @main struct MyApp: App { &#9;&#9;var body: some Scene { &#9;&#9;&#9;&#9;DocumentGroup(newDocument: MyDocument()) { file in &#9;&#9;&#9;&#9;&#9;&#9;ContentView(document: file.$document) &#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;.commands { &#9;&#9;&#9;&#9;&#9;&#9;CommandMenu("Utilities") { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;Button(action: { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;/*How to get access to the current FileDocument ?*/ &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}) { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;Text("Test") &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;} &#9;&#9;} }
Posted Last updated
.
Post not yet marked as solved
0 Replies
1.1k Views
In my app, I can uselet documentPicker: UIDocumentPickerViewController = UIDocumentPickerViewController(documentTypes: ["com.xxxx.yyyy.zzz"], in: UIDocumentPickerMode.import)Just fine to create a document picker. However when I try to export a document to iCloud (or anywhere else, but I just want to have a Dialog to save to the apps iCloud folder) using .exportToService:let documentPicker: UIDocumentPickerViewController = UIDocumentPickerViewController(url: URL(string: kUTTypeText as String)!, in: UIDocumentPickerMode.exportToService)to be able to export the data from my app, I get a stream of error messages:[DocumentManager] Failed to create FPSandboxingURLWrapper for public.text. Error Domain=NSPOSIXErrorDomain Code=1 "couldn't issue sandbox extension com.apple.app-sandbox.read for 'public.text': Operation not permitted" UserInfo={NSDescription=couldn't issue sandbox extension com.apple.app-sandbox.read for 'public.text': Operation not permitted}I am unsure which sandbox settings are wrong as I can directly write to files just fine with my app, just the UIDocumentPickerViewController is not working.
Posted Last updated
.