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<ListRepresentable<SystemListDataSource<Never>, SelectionManagerBox<Never>>>: 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<Entry>) -> ()) {
completion(Timeline(entries: [SimpleEntry()], policy: .never))
}
}
struct SimpleEntry: TimelineEntry {
var date: Date = Date()
}
Any help would be appreciated :)
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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?