Device.generated.swfit don't exists when importing DeviceKit with Carthage
bigmouthstrks opened this issue · comments
Hi, I'm not quite sure if this issue belongs to library itself or I'm missing something because of my lack of experience, but I have a library which depends on Alamofire and DeviceKit.
Right now I'm trying to replace the importing method of those dependencies from CocoaPods to Carthage, so I ran
pod deintegrate
pod cache clean --all
rm Podfile.lock
rm Podfile
In order to remove CocoaPods from the project.
After that I did
touch Cartfile
# Inside Cartfile:
github "Alamofire/Alamofire"
github "devicekit/DeviceKit"
carthage update --use-xcframeworks --platform-ios
# and finally drag both generated .xcframeworks into my project
For my surprise, some line of code which contained Device.current
wasn't working anymore, because current was not found.
The thing I realised was that when I install DeviceKit using CocoaPods I get a file named Device.generated.swift which contains current attribute (the one that's missing).
@bigmouthstrks We have the same issue building the latest DeviceKit for Swift 5. Device.current compiling error.
xCode 12.5.1 and Carthage 0.38.0
@denisenepraunig Any work around for the version 4.5 that can be used when building with Carthage?
@AgileFlexAgency Could you try if my changes in PR #288 fix your issue?
Hello @Zandor300 Thanks for your reply. We are using the standard Cartfile using the Carthage.sh script for xCode 12.
The issue seems to be with the 0.38.0 Carthage version when building the DeviceKit framework.
We have downgraded to Carthage 0.37.0 and it seems the issue has been fixed.
@Zandor300 I'll check these days and I'll let you know. Thanks a lot.
Any update on this?