C4iOS icon indicating copy to clipboard operation
C4iOS copied to clipboard

Unable to build a project with Swift4

Open benoitvb opened this issue 6 years ago • 6 comments

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...

benoitvb avatar Mar 07 '18 12:03 benoitvb

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

mainvolume avatar Mar 07 '18 15:03 mainvolume

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...

benoitvb avatar Mar 08 '18 12:03 benoitvb

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.

mainvolume avatar Mar 08 '18 12:03 mainvolume

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...

benoitvb avatar Mar 08 '18 12:03 benoitvb

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

mainvolume avatar Mar 08 '18 14:03 mainvolume

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

traviskirton avatar Mar 08 '18 15:03 traviskirton