Post

Replies

Boosts

Views

Activity

WidgetKit crash on iOS Simulator
I'm trying to add a widget to my SwiftUI Application. I've made a Widget Extension in my App. Upon running the target in the simulator, this error appears in the console: ClipperWidgetExtension[7343:594354] Fatal error: PlatformViewRepresentableAdaptor&lt;ListRepresentable<SystemListDataSource<Never&gt;, SelectionManagerBox&lt;Never&gt;>>: file /Library/Caches/com.apple.xbs/Sources/Chrono_Sim/Chrono-63.5/WidgetKit/SPI/WidgetViewArchive.swift, line 254 The line that Xcode brings my attention to is this: completion(Timeline(entries: [SimpleEntry()], policy: .never)) The whole code for my timeline provider and entry: struct Provider: TimelineProvider {     public typealias Entry = SimpleEntry     public func snapshot(with context: Context, completion: @escaping (SimpleEntry) -> ()) {         let entry = SimpleEntry()         completion(entry)     }     public func timeline(with context: Context, completion: @escaping (Timeline&lt;Entry&gt;) -> ()) {         completion(Timeline(entries: [SimpleEntry()], policy: .never))     } } struct SimpleEntry: TimelineEntry {     var date: Date = Date() } Any help would be appreciated :)
2
1
2.1k
Mar ’22
Communicating with a non sandboxed process inside the App Sandbox via IPC
A similar form of this question has been asked a few times on this forum, but the answers varied a lot, and things have changed since previous posts.* My application is inside the 'App Sandbox', I want to communicate with another application which is not inside the sandbox at all. The non-sandboxed application has an IPC file which is present in the following location: /var/folders/0x/h5vjdg1s1gb3s__gfr5mmx040000gn/T/discord-ipc-0 cbyrne@Conors-Air in ~ ❯ echo $TMPDIR /var/folders/0x/h5vjdg1s1gb3s__gfr5mmx040000gn/T/ My application can't see that file, and when I try to give it permission to see that file by using the NSOpenPanel dialog, swift-nio is unable to establish a connection to the socket: connect(descriptor:addr:size:): Operation not permitted (errno: 1) However, if I let my app out of the 'App Sandbox': <key>com.apple.security.app-sandbox</key> <false/> It works fine, and my app is able to communicate with the non-sandboxed app. So, can sandboxed apps not communicate with other non-sandboxed apps via IPC at all?
1
0
831
Feb ’22