Post

Replies

Boosts

Views

Activity

Reply to AppleID Login failing in virtualized OS
@eskimo Hi! Thanks so much. What is this new download? Is it related to this problem? Do we install it on the VM or in the host? https://developer.apple.com/download/ Regardless, I tried on the host and the VM w/o success. How do we update our VM running macOS 14 beta 1 to beta 2? Thanks! Device Support for macOS 14 beta 2 Install Device Support for macOS 14 beta 2 if installing the macOS Seed in a virtual Machine fails on a host Mac. Released June 21, 2023 Build 1700B21 Download Device Support Image Device Support for macOS 14 beta 2 1700B21
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’23
Reply to Universal Links Issues
My app is on macOS too. By reading the transcripts of https://developer.apple.com/videos/play/wwdc2020/10098/, I found swcutil. Here is its output of sudo swcutil show --verbose. I have not denied it. Service: applinks App ID: D3F44CA7F4.gdb.SiteApp App Version: 1.0 App PI: <LSPersistentIdentifier 0x11f61dd80> { v = 0, t = 0x8, u = 0x7134, db = 2183ADB1-C496-48F1-B7FF-1301111FE8A7, {length = 8, bytes = 0x3471000000000000} } Domain: www.bolsinga.com User Approval: unspecified Site/Fmwk Approval: denied Flags: Last Checked: 2023-06-12 21:37:13 +0000 Next Check: 2023-06-17 21:09:09 +0000 I found openul: $ sudo swcutil --verbose openul -u https://www.bolsinga/com/dates/sh624.html NSOSStatusErrorDomain -10814 { _LSLine: "763", _LSFunction: "+[LSAppLink(Internal) _openWithAppLink:state:completionHandler:]" }
Topic: App & System Services SubTopic: General Tags:
Jun ’23
Reply to xcodebuild and swift package dependencies
I just created a new macOS SwiftUI Project, and imported another SwiftUI library (using File → Swift Packages → Add Package Dependency). In the simple app's ContentView, I imported the module and added the new random SwiftUI view. I did Command-R, which is a Debug configuration by default, and it builds and runs, and shows the library UI. If I then xcodebuild -verbose -configuration Debug it has the same problem. It has the same problem if I remove -configuration Debug. When compiling app Swift code, the compiler cannot find the module defined by the swift package manager. /Users/bolsinga/Desktop/SPMText/SPMText/ContentView.swift:9:8: error: no such module 'MovingNumbersView' import MovingNumbersView        ^ How do I "inspect" a swift module? I may be able to learn it is being built incorrectly. How do I inspect where the swift compiler is "looking" for swift modules? I may be able to learn why it isn't looking in the right places. Thanks for any tips! Perhaps there is a better place to ask this question?
Jan ’23
Reply to NavigationSplitView does not run .task for each detail view instance
I re-watched the Demystifying SwiftUI and Data Essentials in SwiftUI WWDC sessions. I basically learned that the LoadingState I have above needs to be "extracted" from CategoryDetail and maintained in the CategoryNavigation*View as a [Category:LoadingState] dictionary. This way the state is persisted and associated with the Category. I also used the modifier .task(id:) so that it would execute when the selection changed. It's also still tricky to understand the best way to show "this hasn't ever started loading yet". enum Category: CaseIterable, Hashable, Identifiable {   case first   case second   var id: Self {     self   } } struct CategoryRow: View {   let category: Category   var body: some View {     Text("Row: \(String(describing: category))")   } } extension Binding {   public func defaultValue<T>(_ value: T) -> Binding<T> where Value == T? {     Binding<T> {       wrappedValue ?? value     } set: {       wrappedValue = $0     }   } } struct CategoryDetail: View {   enum LoadingState {     case none     case loading     case loaded     case error   }   @Binding var category: Category?   @Binding var loadingState: LoadingState   var body: some View {     Group {       if category == nil {         Text("Select A Category")       } else {         VStack {           Text("Category: \(String(describing: category))")           Text("LoadingState: \(String(describing: loadingState))")         }       }     }.task(id: category) {       guard let category else {         debugPrint("nothing selected")         return       }       guard loadingState == CategoryDetail.LoadingState.none else {         debugPrint("Early Exit \(String(describing: category)): \(String(describing: loadingState))")         return       }       loadingState = .loading       do {         try await Task.sleep(for: .seconds(2))         loadingState = .loaded       } catch {         loadingState = .error       }     }   } } struct CategoryNavigationSplitView: View {   @State var selectedCategory: Category?   @State var loadingStates : [Category : CategoryDetail.LoadingState] = [:]   var body: some View {     NavigationSplitView {       List(Category.allCases, selection: $selectedCategory) { category in         NavigationLink(value: category) { CategoryRow(category: category) }       }     } detail: {       CategoryDetail(category: $selectedCategory,                      loadingState: (selectedCategory != nil) ?                             $loadingStates[selectedCategory!].defaultValue(.none) :                       .constant(.none))     }   } } struct CategoryNavigationView: View {   @State var selectedCategory: Category?   @State var loadingStates : [Category : CategoryDetail.LoadingState] = [:]   var body: some View {     NavigationView {       List(Category.allCases, selection: $selectedCategory) { category in         NavigationLink {           CategoryDetail(category: $selectedCategory,                          loadingState: (selectedCategory != nil) ?                                 $loadingStates[selectedCategory!].defaultValue(.none) :                           .constant(.none))         } label: {           CategoryRow(category: category)         }       }     }     Text("Select a Category")   } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’23
Reply to launchd and git
Aha. My shell script is sandboxed. Not sure if I can add permissions to a shell script. I am going to try to create a Swift command line tool that uses Process to invoke git. Updates to come.
Replies
Boosts
Views
Activity
Mar ’24
Reply to Issue with SceneStorage in ViewModifer, but not in View
I'm sorry; I see the message. I do not understand why the ViewModifier (which knows the View) is different in this manner than the View itself. Thanks.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’24
Reply to Can you publish an unlisted app for tvOS? How to install it?
I assume they must install your app via TestFlight.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’23
Reply to xcstrings in a Swift Package building via swift build fails
See https://github.com/apple/swift-package-manager/issues/6993 At least I found a workaround. xcstrings no longer need the "en.lproj" directory, and it appears maybe SPM is looking for that. If I add a "fake" file in that directory it will build!
Replies
Boosts
Views
Activity
Oct ’23
Reply to TN3155: Debugging universal links
Thanks! This is terrific.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to Universal Links Issues
It works great now that the CDN has caught up. Thanks again!
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to AppleID Login failing in virtualized OS
@eskimo Hi! Thanks so much. What is this new download? Is it related to this problem? Do we install it on the VM or in the host? https://developer.apple.com/download/ Regardless, I tried on the host and the VM w/o success. How do we update our VM running macOS 14 beta 1 to beta 2? Thanks! Device Support for macOS 14 beta 2 Install Device Support for macOS 14 beta 2 if installing the macOS Seed in a virtual Machine fails on a host Mac. Released June 21, 2023 Build 1700B21 Download Device Support Image Device Support for macOS 14 beta 2 1700B21
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to Universal Links Issues
#wwdc20-10098
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to Universal Links Issues
My app is on macOS too. By reading the transcripts of https://developer.apple.com/videos/play/wwdc2020/10098/, I found swcutil. Here is its output of sudo swcutil show --verbose. I have not denied it. Service: applinks App ID: D3F44CA7F4.gdb.SiteApp App Version: 1.0 App PI: <LSPersistentIdentifier 0x11f61dd80> { v = 0, t = 0x8, u = 0x7134, db = 2183ADB1-C496-48F1-B7FF-1301111FE8A7, {length = 8, bytes = 0x3471000000000000} } Domain: www.bolsinga.com User Approval: unspecified Site/Fmwk Approval: denied Flags: Last Checked: 2023-06-12 21:37:13 +0000 Next Check: 2023-06-17 21:09:09 +0000 I found openul: $ sudo swcutil --verbose openul -u https://www.bolsinga/com/dates/sh624.html NSOSStatusErrorDomain -10814 { _LSLine: "763", _LSFunction: "+[LSAppLink(Internal) _openWithAppLink:state:completionHandler:]" }
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to Universal Links Issues
FWIW My app is a full SwiftUI lifecycle app, so it is using onOpenURL.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to xcodebuild and swift package dependencies
Thanks to the GitHub issue, I learned that SPM and legacy builds (which I think is the -configuration) do not work together. The trick is to xcodebuild -list, gather the scheme name you want to build, and then use xcodebuild -scheme <name-of-scheme>.
Replies
Boosts
Views
Activity
Jan ’23
Reply to xcodebuild and swift package dependencies
I've also tried here: https://github.com/apple/swift-package-manager/issues/6074
Replies
Boosts
Views
Activity
Jan ’23
Reply to xcodebuild and swift package dependencies
I just created a new macOS SwiftUI Project, and imported another SwiftUI library (using File → Swift Packages → Add Package Dependency). In the simple app's ContentView, I imported the module and added the new random SwiftUI view. I did Command-R, which is a Debug configuration by default, and it builds and runs, and shows the library UI. If I then xcodebuild -verbose -configuration Debug it has the same problem. It has the same problem if I remove -configuration Debug. When compiling app Swift code, the compiler cannot find the module defined by the swift package manager. /Users/bolsinga/Desktop/SPMText/SPMText/ContentView.swift:9:8: error: no such module 'MovingNumbersView' import MovingNumbersView        ^ How do I "inspect" a swift module? I may be able to learn it is being built incorrectly. How do I inspect where the swift compiler is "looking" for swift modules? I may be able to learn why it isn't looking in the right places. Thanks for any tips! Perhaps there is a better place to ask this question?
Replies
Boosts
Views
Activity
Jan ’23
Reply to NavigationSplitView does not run .task for each detail view instance
I re-watched the Demystifying SwiftUI and Data Essentials in SwiftUI WWDC sessions. I basically learned that the LoadingState I have above needs to be "extracted" from CategoryDetail and maintained in the CategoryNavigation*View as a [Category:LoadingState] dictionary. This way the state is persisted and associated with the Category. I also used the modifier .task(id:) so that it would execute when the selection changed. It's also still tricky to understand the best way to show "this hasn't ever started loading yet". enum Category: CaseIterable, Hashable, Identifiable {   case first   case second   var id: Self {     self   } } struct CategoryRow: View {   let category: Category   var body: some View {     Text("Row: \(String(describing: category))")   } } extension Binding {   public func defaultValue<T>(_ value: T) -> Binding<T> where Value == T? {     Binding<T> {       wrappedValue ?? value     } set: {       wrappedValue = $0     }   } } struct CategoryDetail: View {   enum LoadingState {     case none     case loading     case loaded     case error   }   @Binding var category: Category?   @Binding var loadingState: LoadingState   var body: some View {     Group {       if category == nil {         Text("Select A Category")       } else {         VStack {           Text("Category: \(String(describing: category))")           Text("LoadingState: \(String(describing: loadingState))")         }       }     }.task(id: category) {       guard let category else {         debugPrint("nothing selected")         return       }       guard loadingState == CategoryDetail.LoadingState.none else {         debugPrint("Early Exit \(String(describing: category)): \(String(describing: loadingState))")         return       }       loadingState = .loading       do {         try await Task.sleep(for: .seconds(2))         loadingState = .loaded       } catch {         loadingState = .error       }     }   } } struct CategoryNavigationSplitView: View {   @State var selectedCategory: Category?   @State var loadingStates : [Category : CategoryDetail.LoadingState] = [:]   var body: some View {     NavigationSplitView {       List(Category.allCases, selection: $selectedCategory) { category in         NavigationLink(value: category) { CategoryRow(category: category) }       }     } detail: {       CategoryDetail(category: $selectedCategory,                      loadingState: (selectedCategory != nil) ?                             $loadingStates[selectedCategory!].defaultValue(.none) :                       .constant(.none))     }   } } struct CategoryNavigationView: View {   @State var selectedCategory: Category?   @State var loadingStates : [Category : CategoryDetail.LoadingState] = [:]   var body: some View {     NavigationView {       List(Category.allCases, selection: $selectedCategory) { category in         NavigationLink {           CategoryDetail(category: $selectedCategory,                          loadingState: (selectedCategory != nil) ?                                 $loadingStates[selectedCategory!].defaultValue(.none) :                           .constant(.none))         } label: {           CategoryRow(category: category)         }       }     }     Text("Select a Category")   } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’23
Reply to NavigationSplitView does not run .task for each detail view instance
Looks like this is related: https://stackoverflow.com/questions/73267638/how-to-run-task-or-onappear-on-navigationsplitview-detail-for-every-selectio
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’23