Material: Swift Compiler Error

Created on 3 Oct 2017  路  6Comments  路  Source: CosmicMind/Material

screen shot 2017-10-03 at 3 05 17 pm

Xcode 9
iOS 11.0

help wanted

Most helpful comment

I guess the problem is that you are using 3.2, it needs to be 4. You can specifically set 4 to be used by Material (if you don't want all your pods to use Swift 4). just add the following code at the end of your pod file:


 swift4pods = ['Material']

 post_install do |installer|
   installer.pods_project.targets.each do |target|
     if swift4pods.include? target.name
       target.build_configurations.each do |config|
         config.build_settings['SWIFT_VERSION'] = '4.0'
       end
     end
   end
 end

All 6 comments

@alvincrisuy
Can you provide us with the Swift Language Version build setting of your target?
thanks

@mohpor
since I have the same error [happened exactly at the same moment of time :) - 15 mins ago]:

  1. For app target I have 3.2
  2. For pods - post_install action which writes 3.2 to all pod targets as well

+ there are few others:

2017-10-03 14 25 11

I guess the problem is that you are using 3.2, it needs to be 4. You can specifically set 4 to be used by Material (if you don't want all your pods to use Swift 4). just add the following code at the end of your pod file:


 swift4pods = ['Material']

 post_install do |installer|
   installer.pods_project.targets.each do |target|
     if swift4pods.include? target.name
       target.build_configurations.each do |config|
         config.build_settings['SWIFT_VERSION'] = '4.0'
       end
     end
   end
 end

Thanks! that did the trick! 馃槃

I'm glad it did.
Have a nice day

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Arkezis picture Arkezis  路  28Comments

leobouilloux picture leobouilloux  路  21Comments

PuneetKohli picture PuneetKohli  路  14Comments

timoschwarzer picture timoschwarzer  路  19Comments

ariedoelman picture ariedoelman  路  34Comments