Posts

Post not yet marked as solved
2 Replies
233 Views
What I want: I'm learning developing by building a document-based todos app and just want my code to run. What I get: My app went stuck every time I open a document So I create a new project and moved all of my code there Nothing changes I think that's because I added Touch Bar support so I clear Touch Bar code off Still nothing changes, but in the LLDB console there's a message: 2022-06-06 09:17:14.098990+0800 Todos[5747:307926] [default] Failed to get state for list identifier com.apple.LSSharedFileList.ApplicationRecentDocuments Error: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (Access to list denied) UserInfo={NSDebugDescription=Access to list denied} And I think there's sth to do with App Sandbox, and I added some File Access configuration. Nothing changes Then I realized I forgot to add a development team in the new project Nothing ALSO1: when I changed the Signing Certificate to Development The message in the LLDB console disappeared. I couldn't find any reference on it. ANY HELP IS GREATLY APPRECIATED!!!!!!
Posted Last updated
.
Post marked as solved
1 Replies
126 Views
Is it legal if I distribute Ventura 13.0 beta 1 to a beta tester?
Posted Last updated
.
Post not yet marked as solved
0 Replies
113 Views
I know this is a strange and easy question. but JUST CANT FIND ANY REFERENCE aaaaaaaa I'm using SwiftUI and wants to export to PDF (best I can find Creating PDFs on MacOS without UIKit) export to image export to HTML export to everything possible etc BONUS print the page I can only find UIKit support and they are all outdated. AND IF POSSIBLE how to integrate ShareLink to share these(PDF, Image, HTML, etc) and write them onto disk using NSSavePane? even better how to do this on a of the platforms (I know I'm greedy😂) Thanks for any help🙏
Posted Last updated
.
Post marked as solved
1 Replies
179 Views
I'm trying out weather kit and I'm using swiftUI I have a view that accepts a CurrentWeather type value in initailizer I cannot find a way to initialize a CurrentWeather How can I preview It? This won't work: // forecaster and forecast is defined by me struct WeatherView_Previews: PreviewProvider {     static var previews: some View { // <- static WeatherView(weather: await forecaster.forcast(latitude: 0, longtitude: 0)) // <- concurrency     } }
Posted Last updated
.
Post not yet marked as solved
1 Replies
115 Views
OK after I'm done with my last issue I came across some weird UI layout this is really a serious issue because afterward it looks like this😂 why? I've never met this kind of issue before in my same code before upgrading to Ventura code: List { ...                 Section {                     ForEach(data) { datum in                         TableRow(data: datum)                             .swipeActions {                             Button(role: .destructive) {                                 data.delete(datum)                             } label: {                                 Label("Delete", systemImage: "trash")                             }                         }                     }                 } ... }
Posted Last updated
.
Post marked as solved
1 Replies
111 Views
I'm trying out Swift Charts and I'm pretty messed up After I deleted all of my items, I couldn't add items anymore import SwiftUI extension Array where Element == ChartsData {     mutating func delete(_ item: ChartsData) {         self.removeAll {             $0 == item         }     } } struct ContentView: View {     var ofType: ChartsType     @State var data: [ChartsData] = []     var body: some View {         List {             VStack {                 HStack {                     Spacer() // MARK - add button                     Button {                         data.append(ChartsData(item: "item"))                     } label: {                         Image(systemName: "plus").imageScale(.large)                     }.buttonStyle(.plain).padding()                 }                                  List {                     ForEach(data) { datum in                         TableRow(data: datum).swipeActions {                             Button(role: .destructive) {                                 data.delete(datum)                             } label: {                                 Label("Delete", systemImage: "trash")                             }                         }                     }                 }                 NavigationLink{                     ChartsView(ofType: .BarChart, data: data)                 } label: {                     Text("Generate").font(.largeTitle).foregroundStyle(.linearGradient(colors: [.orange, .yellow, .blue, .purple], startPoint: .topTrailing, endPoint: .bottomLeading))                 }.padding()             }         }     } } struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView(ofType: .BarChart, data: [             ChartsData(item: "testItem1", value: 10),             ChartsData(item: "testItem2", value: 20)         ])     } }
Posted Last updated
.
Post not yet marked as solved
1 Replies
142 Views
I know how to use Virtualization now But I don't know how to write interface in AppKit So I should find a way to embed a NSView(the VM's UI) in a SwiftUI View However I couldn't find any reference on how except NSViewRepresentable which, of course, will not work I know there must be a easy way to do this But I'm just can't find it... any help is appreciated
Posted Last updated
.
Post marked as solved
1 Replies
84 Views
I know this is really easy I want to get the absolute path for the current app And I can achieve using String(reflecting: Bundle.main.bundleURL) But what outputs isn't like /User/***/..... but file:///User/xx/... so what can I do to get a absolute path in /***/***/*** format? thanks
Posted Last updated
.
Post marked as solved
1 Replies
170 Views
I remembered there's a message that says that you cannot modify this video or whatever at the end of every session. So, if I trim the video and send it to my friend, is it allowed? Bonus: where can I find the background music for every daily debrief video (if I can)?
Posted Last updated
.
Post not yet marked as solved
0 Replies
134 Views
2022-06-09 08:51:30.793789+0800 MyAppName[4651:447798] [aqme]        MEMixerChannel.cpp:1629  client <AudioQueueObject@0x7fc09a04f400; [0]; play> got error 2003332927 while sending format information I use .mp3
Posted Last updated
.
Post marked as solved
2 Replies
145 Views
The requested version of macOS is not available. Please check if your Mac is compatible with this software.
Posted Last updated
.
Post not yet marked as solved
1 Replies
134 Views
How can I make it work? jsonString = """ ["foo", "bar"] """ let decoder = JSONDecoder var whatIWant = decoder.decode(Array<String>.self, jsonString) for i in whatIWant { print(i) } EDIT: Minor syntax mistake ignore this thread sorry everyone
Posted Last updated
.
Post marked as solved
1 Replies
166 Views
I'm in China, and if I sign up for a digital lounge or lab, It's either me or Apple staying up all night. So, what's the case to activities for areas not in the same time zone as USA?
Posted Last updated
.
Post not yet marked as solved
0 Replies
108 Views
How could I create an icon with an alpha/beta/dev badge? like this⬇️
Posted Last updated
.