Failed to build "MeetingView.swift"

initializer 'init(value:total:)' requires that 'Int' conform to 'BinaryFloatingPoint'







CompileDylibError: Failed to build MeetingView.swift



Compiling failed: initializer 'init(value:total:)' requires that 'Int' conform to 'BinaryFloatingPoint'



/Users/besleagaalexandrumarian/Documents/Scrumdinger/Scrumdinger/MeetingView.swift:13:13: error: initializer 'init(value:total:)' requires that 'Int' conform to 'BinaryFloatingPoint'

            ProgressView(value: __designTimeInteger("#9345.[1].[0].property.[0].[0].arg[0].value.[0].arg[0].value", fallback: 5), total: __designTimeInteger("#9345.[1].[0].property.[0].[0].arg[0].value.[0].arg[1].value", fallback: 15))

            ^

SwiftUI.ProgressView:3:12: note: where 'V' = 'Int'

    public init<V>(value: V?, total: V = 1.0) where Label == EmptyView, CurrentValueLabel == EmptyView, V : BinaryFloatingPoint

           ^





==================================



|  BuildInvocationError

|  

|  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -F /Applications/Xcode.app/Contents/SharedFrameworks-iphonesimulator -enforce-exclusivity=checked -DDEBUG -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -target x86_64-apple-ios14.0-simulator -module-cache-path /Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -enable-testing -swift-version 5 -I /Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Products/Debug-iphonesimulator -F /Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Products/Debug-iphonesimulator -c -j4 -serialize-diagnostics -Xcc -I/Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/Scrumdinger-generated-files.hmap -Xcc -I/Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/Scrumdinger-own-target-headers.hmap -Xcc -I/Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/Scrumdinger-all-target-headers.hmap -Xcc -iquote -Xcc /Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/Scrumdinger-project-headers.hmap -Xcc -I/Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Products/Debug-iphonesimulator/include -Xcc -I/Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/DerivedSources-normal/x86_64 -Xcc -I/Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/DerivedSources/x86_64 -Xcc -I/Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/DerivedSources -Xcc -DDEBUG=1 -working-directory /Users/besleagaalexandrumarian/Documents/Scrumdinger /Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/Objects-normal/x86_64/MeetingView.2.preview-thunk.swift -o /Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/Objects-normal/x86_64/MeetingView.2.preview-thunk.o -module-name Scrumdinger_PreviewReplacement_MeetingView_2 -Onone -Xfrontend -disable-modules-validate-system-headers

I do not have any preview after Refactoring names lines of code ?

I have the exact same issue after refactoring as well.

Ok, I figured it out after thinking about it a little more. Replace the line from the tutorial with this line of code:

ProgressView(value: 5.0, total: 15.0)

The tutorial shows the line to be ProgressView(value: 5, total: 15), which makes value and total Int values. Swift is looking for Binary Floating Point values, so changing 5 to 5.0 and 15 to 15.0 solves the error. Hope this helps!

Failed to build "MeetingView.swift"
 
 
Q