I've been trying to learn Swift 4, and therefore needed to use Xcode9 Beta as the IDE. I would like to load a large CSV data file to do some data analysis using a playground. The library I'm trying to use is CSVImporter, installed using Carthage, as recommended by the developer.
I've spent a week on this issue, trying to follow guides I've found online, such as here - Stackoverflow, here - Medium, but they all refer to previous versions of Swift and Xcode, and none seem to work.
In general their approach seems to be incorporating the playground into workspace with a project that uses the imported resource. I usually get the "No such module 'CSVImporter'".
My specific question is: How do I set up a Swift 4 Playground so that I can import CSVImporter with Xcode 9 Beta?
While I have this specific task, I think this would be of general interest to the community. I suspect that someone with a far clearer idea than I of how Xcode executes builds and resolves build dependencies would be able to address this fairly easily! Many thanks.
Basically, you have it right. Approach is:
Cartfile
with your dependenciescarthage update --platform macOS
).framework
files that were built (from Carthage/Build/Mac
)/usr/local/bin/carthage copy-frameworks
and copy imported frameworks (just follow Carthage's guidelines, it's all the same so far)main.swift
) that will just import frameworks that you have imported via CarthageIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With