C4Labs / C4iOS

C4 is an open-source creative coding framework that harnesses the power of native iOS programming with a simplified API that gets you working with media right away. Build artworks, design interfaces and explore new possibilities working with media and interaction.
www.c4ios.com
MIT License
980 stars 75 forks source link

Unable to build a project with Swift4 #695

Open benoitvb opened 6 years ago

benoitvb commented 6 years ago

There is a lot of warning and errors when trying to build with xCode 9.2. Do you plan to release a new version ?

I'm a bit disappointed as I was really interested by the library...

mainvolume commented 6 years ago

I believe there is a Swift4 compilable version on C4´s Slack channel.

benoitvb commented 6 years ago

Thanks @mainvolume I downloaded the last release here https://github.com/C4Labs/C4iOS/releases/tag/3.0.0 I followed the “Jet Li” way to install it http://www.c4ios.com/install/

xCode is throwing an error Target 'C4-tvOS' of project 'C4' was rejected as an implicit dependency for 'C4.framework' because it doesn't contain platform 'iphonesimulator' in its supported platforms 'appletvos, appletvsimulator'

I selected the “C4-iOS” scheme and built for iPhone8 simulator as a destination. Not sure what I’m doing wrong...

mainvolume commented 6 years ago

Hi Benoitvb.

I can upload it to my repo and send you the Swift 4 compatible version link this evening when getting home if you wish.

benoitvb commented 6 years ago

Thank you ! Actually, I've found a way to build for swift 3 in xCode 9 so I can use the version from the C4 installer. The solution was to set the Swift Language version to 3.2 in Build Settings.

I’m just started to learn Swift so it may not be a problem at all to not using the last version...

mainvolume commented 6 years ago

Great! it´s possible to mix and match swift versions in the newer Xcode versions.

traviskirton commented 6 years ago

Awesome! Great work guys. Thanks @mainvolume for helping out. Thanks @benoitvb for hammering through the issue.