Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get live preview working in SwiftUI due to SnapKit #754

Open
3 tasks done
marchinram opened this issue May 13, 2022 · 2 comments
Open
3 tasks done

Unable to get live preview working in SwiftUI due to SnapKit #754

marchinram opened this issue May 13, 2022 · 2 comments

Comments

@marchinram
Copy link

New Issue Checklist

馃毇 If this template is not filled out your issue will be closed with no comment. 馃毇

  • I have looked at the Documentation
  • I have read the F.A.Q.
  • I have filled out this issue template.

Issue Info

Info Value
Platform ios
Platform Version 15.2
SnapKit Version 5.6.0
Integration Method cocoapods

Issue Description

I'm working on a large project that has used SnapKit extensively, however for new features we want to use SwiftUI and we cannot migrate the whole project at once so the project has to have both. The issue I'm having is when I try to render a live preview of a SwiftUI View I get a build error related to SnapKit:

CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'SnapKit' from project 'Pods')
    cd /Users/brojas/Developer/foursquare-iphone/Pods
    export DEVELOPER_DIR\=/Applications/Xcode.app/Contents/Developer
    export SDKROOT\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name SnapKit -Onone -enable-batch-mode -enforce-exclusivity\=checked @/Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/SnapKit.SwiftFileList -DDEBUG -D COCOAPODS -suppress-warnings -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk -target x86_64-apple-ios10.0-simulator -g -module-cache-path /Users/brojas/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -enable-testing -index-store-path /Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Index/DataStore -swift-version 5 -I /Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Products/Debug-iphonesimulator/SnapKit -F /Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Products/Debug-iphonesimulator/SnapKit -c -j12 -output-file-map /Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/SnapKit-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/SnapKit.swiftmodule -Xcc -I/Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/SnapKit-generated-files.hmap -Xcc -I/Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/SnapKit-own-target-headers.hmap -Xcc -I/Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/SnapKit-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/SnapKit-project-headers.hmap -Xcc -I/Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Products/Debug-iphonesimulator/SnapKit/include -Xcc -I/Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/DerivedSources-normal/x86_64 -Xcc -I/Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/DerivedSources/x86_64 -Xcc -I/Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/DerivedSources -Xcc -DPOD_CONFIGURATION_DEBUG\=1 -Xcc -DDEBUG\=1 -Xcc -DCOCOAPODS\=1 -emit-objc-header -emit-objc-header-path /Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/SnapKit-Swift.h -import-underlying-module -Xcc -ivfsoverlay -Xcc /Users/brojas/Library/Developer/Xcode/DerivedData/Foursquare-cffnoxgfnmuuucaqgyjuyyghuijd/Build/Intermediates.noindex/Previews/batman-development-unsafe/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module-overlay.yaml -working-directory /Users/brojas/Developer/foursquare-iphone/Pods -Xfrontend -enable-implicit-dynamic -Xfrontend -enable-private-imports -Xfrontend -enable-dynamic-replacement-chaining -Xfrontend -disable-previous-implementation-calls-in-dynamic-replacements

Command CompileSwiftSources failed with a nonzero exit code

There's not a whole lot of info in this error message but any ideas? Or at least any suggestions so I can investigate this further. Thanks!

@robertjpayne
Copy link
Member

@marchinram old issue but Xcode 14 might be better? I've had such mixed luck with SwiftUI previews I'm nearly always just in the "Xcode"'s fault basket.

@sz-ashik440
Copy link

Still getting the same error

Issue Info

Info Value
Platform ios
Platform Version 14.0+
SnapKit Version 5.7.1
Integration Method Package manager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants