Post

Replies

Boosts

Views

Activity

Reply to Preview Update Error: HumanReadableSwiftError CancellationError: CancellationError()
Ok, it sound like a Voodoo trick, but I always using my iphone device connected to Xcode during my preview (something with cable sometime wireless) . Restarting Xcode didn't work So what i did was: Disconnect my iphone physically from my Mac also turn off wifi. from Xcode i selected Ipad as a new target device After a while Preview started to reload and now it works again.
May ’24
Reply to Xcode 15 Preview not working with generic nested view
Namespaces (which is not SwiftUI @Namespace property wrapper) in their basic form are a way to group related areas of code in the form of dot separated syntax. The given benefit of that is the capability to distinguish between code blocks that share same name in a different path (e.g. UI.CoordinatorScreen.Fragment vs UI.ScannerScreen.Fragment). This mechanic is naturally enabled when u nest class/struct or enum types in Swift. The problem i mentioned is not related to the fact that nested generic objects doesn't work, because its a fact that it work perfectly when compile and run. The problem is related to a specific behaviour for Xcode preview (not Simulator) where compiler translate the related preview swift code section into an explicit version of the same file using typealias that are not made generic while this is required. For this reason in a second stage of compile it fail. Thx for your reply, but this isn't the answer i'm looking for.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’23
Reply to Xcode 15 Preview not working with generic nested view
Here the Preview reported error: == PREVIEW UPDATE ERROR: CompileDylibError: Failed to build SampleView.swift Compiling failed: reference to generic type 'NotWorking.InitialView' requires arguments in <...> /Users/giuseppe/Library/Developer/Xcode/DerivedData/MyPlayground-avscbrxoycipyhbsfadustywnrmd/Build/Intermediates.noindex/> Previews/MyPlayground/Intermediates.noindex/MyPlayground.build/Debug-iphonesimulator/MyPlayground.build/Objects-normal/x86_64/> SampleView.1.preview-thunk.swift:35:35: error: reference to generic type 'NotWorking.InitialView' requires arguments in <...> typealias NestedView = NotWorking.InitialView.NestedView ^ <<#S: StringProtocol#>> /Users/giuseppe/Development/Private/Dev/MyPlayground/MyPlayground/SampleView.swift:33:12: note: generic type 'InitialView' > declared here struct InitialView<S>: View where S: StringProtocol { ^ /Users/giuseppe/Library/Developer/Xcode/DerivedData/MyPlayground-avscbrxoycipyhbsfadustywnrmd/Build/Intermediates.noindex/> Previews/MyPlayground/Intermediates.noindex/MyPlayground.build/Debug-iphonesimulator/MyPlayground.build/Objects-normal/x86_64/> SampleView.1.preview-thunk.swift:21:34: error: ambiguous type name 'NestedView' in 'NotWorking.InitialView' extension NotWorking.InitialView.NestedView { ~~~~~~~~~~~~~~~~~~~~~~ ^ /Users/giuseppe/Development/Private/Dev/MyPlayground/MyPlayground/SampleView.swift:38:16: note: found candidate with type > 'NotWorking.InitialView.NestedView' struct NestedView: View { ^ /Users/giuseppe/Library/Developer/Xcode/DerivedData/MyPlayground-avscbrxoycipyhbsfadustywnrmd/Build/Intermediates.noindex/> Previews/MyPlayground/Intermediates.noindex/MyPlayground.build/Debug-iphonesimulator/MyPlayground.build/Objects-normal/x86_64/> SampleView.1.preview-thunk.swift:35:11: note: found candidate with type '<<error type>>' typealias NestedView = NotWorking.InitialView.NestedView ^ /Users/giuseppe/Library/Developer/Xcode/DerivedData/MyPlayground-avscbrxoycipyhbsfadustywnrmd/Build/Intermediates.noindex/> Previews/MyPlayground/Intermediates.noindex/MyPlayground.build/Debug-iphonesimulator/MyPlayground.build/Objects-normal/x86_64/> SampleView.1.preview-thunk.swift:23:47: error: ambiguous type name 'NestedView' in 'NotWorking.InitialView' typealias NestedView = NotWorking.InitialView.NestedView ~~~~~~~~~~~~~~~~~~~~~~ ^ /Users/giuseppe/Development/Private/Dev/MyPlayground/MyPlayground/SampleView.swift:38:16: note: found candidate with type > 'NotWorking.InitialView.NestedView' struct NestedView: View { ^ /Users/giuseppe/Library/Developer/Xcode/DerivedData/MyPlayground-avscbrxoycipyhbsfadustywnrmd/Build/Intermediates.noindex/> Previews/MyPlayground/Intermediates.noindex/MyPlayground.build/Debug-iphonesimulator/MyPlayground.build/Objects-normal/x86_64/> SampleView.1.preview-thunk.swift:35:11: note: found candidate with type '<<error type>>' typealias NestedView = NotWorking.InitialView.NestedView ^
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’23
Reply to Request: Restore Launchpad Functionality or Allow Customizable App Organization in macOS Tahoe
MacOS Tahoe is destroying existing user experience in favor of potential user acquisition based on the idea that more graphic appealing mean better user experience. I've no idea what is result of their field studies but Apple completely lost his founder foresight.
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Oct ’25
Reply to Preview Update Error: HumanReadableSwiftError CancellationError: CancellationError()
Ok, it sound like a Voodoo trick, but I always using my iphone device connected to Xcode during my preview (something with cable sometime wireless) . Restarting Xcode didn't work So what i did was: Disconnect my iphone physically from my Mac also turn off wifi. from Xcode i selected Ipad as a new target device After a while Preview started to reload and now it works again.
Replies
Boosts
Views
Activity
May ’24
Reply to Xcode 15 Preview not working with generic nested view
Namespaces (which is not SwiftUI @Namespace property wrapper) in their basic form are a way to group related areas of code in the form of dot separated syntax. The given benefit of that is the capability to distinguish between code blocks that share same name in a different path (e.g. UI.CoordinatorScreen.Fragment vs UI.ScannerScreen.Fragment). This mechanic is naturally enabled when u nest class/struct or enum types in Swift. The problem i mentioned is not related to the fact that nested generic objects doesn't work, because its a fact that it work perfectly when compile and run. The problem is related to a specific behaviour for Xcode preview (not Simulator) where compiler translate the related preview swift code section into an explicit version of the same file using typealias that are not made generic while this is required. For this reason in a second stage of compile it fail. Thx for your reply, but this isn't the answer i'm looking for.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’23
Reply to Xcode 15 Preview not working with generic nested view
Here the Preview reported error: == PREVIEW UPDATE ERROR: CompileDylibError: Failed to build SampleView.swift Compiling failed: reference to generic type 'NotWorking.InitialView' requires arguments in <...> /Users/giuseppe/Library/Developer/Xcode/DerivedData/MyPlayground-avscbrxoycipyhbsfadustywnrmd/Build/Intermediates.noindex/> Previews/MyPlayground/Intermediates.noindex/MyPlayground.build/Debug-iphonesimulator/MyPlayground.build/Objects-normal/x86_64/> SampleView.1.preview-thunk.swift:35:35: error: reference to generic type 'NotWorking.InitialView' requires arguments in <...> typealias NestedView = NotWorking.InitialView.NestedView ^ <<#S: StringProtocol#>> /Users/giuseppe/Development/Private/Dev/MyPlayground/MyPlayground/SampleView.swift:33:12: note: generic type 'InitialView' > declared here struct InitialView<S>: View where S: StringProtocol { ^ /Users/giuseppe/Library/Developer/Xcode/DerivedData/MyPlayground-avscbrxoycipyhbsfadustywnrmd/Build/Intermediates.noindex/> Previews/MyPlayground/Intermediates.noindex/MyPlayground.build/Debug-iphonesimulator/MyPlayground.build/Objects-normal/x86_64/> SampleView.1.preview-thunk.swift:21:34: error: ambiguous type name 'NestedView' in 'NotWorking.InitialView' extension NotWorking.InitialView.NestedView { ~~~~~~~~~~~~~~~~~~~~~~ ^ /Users/giuseppe/Development/Private/Dev/MyPlayground/MyPlayground/SampleView.swift:38:16: note: found candidate with type > 'NotWorking.InitialView.NestedView' struct NestedView: View { ^ /Users/giuseppe/Library/Developer/Xcode/DerivedData/MyPlayground-avscbrxoycipyhbsfadustywnrmd/Build/Intermediates.noindex/> Previews/MyPlayground/Intermediates.noindex/MyPlayground.build/Debug-iphonesimulator/MyPlayground.build/Objects-normal/x86_64/> SampleView.1.preview-thunk.swift:35:11: note: found candidate with type '<<error type>>' typealias NestedView = NotWorking.InitialView.NestedView ^ /Users/giuseppe/Library/Developer/Xcode/DerivedData/MyPlayground-avscbrxoycipyhbsfadustywnrmd/Build/Intermediates.noindex/> Previews/MyPlayground/Intermediates.noindex/MyPlayground.build/Debug-iphonesimulator/MyPlayground.build/Objects-normal/x86_64/> SampleView.1.preview-thunk.swift:23:47: error: ambiguous type name 'NestedView' in 'NotWorking.InitialView' typealias NestedView = NotWorking.InitialView.NestedView ~~~~~~~~~~~~~~~~~~~~~~ ^ /Users/giuseppe/Development/Private/Dev/MyPlayground/MyPlayground/SampleView.swift:38:16: note: found candidate with type > 'NotWorking.InitialView.NestedView' struct NestedView: View { ^ /Users/giuseppe/Library/Developer/Xcode/DerivedData/MyPlayground-avscbrxoycipyhbsfadustywnrmd/Build/Intermediates.noindex/> Previews/MyPlayground/Intermediates.noindex/MyPlayground.build/Debug-iphonesimulator/MyPlayground.build/Objects-normal/x86_64/> SampleView.1.preview-thunk.swift:35:11: note: found candidate with type '<<error type>>' typealias NestedView = NotWorking.InitialView.NestedView ^
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’23
Reply to macOS Big Sur breaks Razer peripherals
I solved with this https://gist.github.com/fcoclavero/431123c7708e42de63eb75264a44de02
Topic: App & System Services SubTopic: Drivers Tags:
Replies
Boosts
Views
Activity
Jul ’21