SPM Archive Error
willm132 opened this issue · 7 comments
Description of the problem:
When Archiving my project I am getting these errors. I am not using SwiftUI.
/MultiSelectSegmentedControl/Sources/MultiSegmentPicker.swift
Cannot find type 'UIViewRepresentable' in scope
Unknown attribute 'Binding'
Cannot find type 'Binding' in scope
Cannot find '_selectedSegmentIndexes' in scope
Cannot find type 'UIViewRepresentableContext' in scope
Any guidance to get this resolved?
I'll need running code to help with this...
Please create a minimal project that reproduces this problem, create a github project with its code, and link to it here. (See https://ootips.org/yonat/repex/)
@yonat The issue is that I can run the code fine in simulator and on my device it runs fine. But when I go to archive the app to distribute via App Store or Ad Hoc is when I am getting the issues.
@yonat I have sent you an invite. Like I said, try to build the code and thats where you will see the errors in your swift files.
Thanks. I'm afraid the Test project does not build:
First I get compile error Value of type 'AppDelegate' has no member 'iPadOrientationLock'
When I fix that, I get error: Could not get GOOGLE_APP_ID in Google Services file from build environment
.
This may be a duplicate of #41 . If so, the reason is a bug in SPM (https://bugs.swift.org/browse/SR-11907) and the solution is to use CocoaPods until it's fixed.
Yes! That is my exact issue. I will use CocoaPods to resolve it. Thank you for your help.
I solved this issue editing the file Package.swift and enforcing iOS version 13 like the following:
platforms: [ .iOS(.v13), ],
The you can archive and build in release using SPM without problem.