title: Flutter: Can't build for ios on codemagic
body: <p>I'm trying to create an IOS build for my flutter project on codemagic but it keeps failing. I use flutter_config in the app but the values in my .env file have been added to environment variables on codemagic but I still think the failing build has something to do with flutter_config but maybe there's more to it. Here's my log, any help would be great.</p>
  <pre><code>== Building for iOS ==
  
  
  Running Xcode build...                                          
  
  Xcode archive done.                                         19.1s
  
  Failed to build iOS app
  Error output from Xcode build:
  ↳
      ** ARCHIVE FAILED **
  
  
  Xcode's output:
  ↳
      Command CompileSwift failed with a nonzero exit code
      /Users/builder/clone/ios/Pods/SCrypto/Source/SCrypto.swift:107:111: error: using '!' is not allowed here; perhaps '?' was intended?
              typealias Function = (_ data: UnsafeRawPointer, _ len: CC_LONG, _ md: UnsafeMutablePointer&lt;UInt8&gt;) -&gt; UnsafeMutablePointer&lt;UInt8&gt;!
                                                                                                                    ^                          ~
                                                                                                                                               ?
      /Users/builder/clone/ios/Pods/SCrypto/Source/SCrypto.swift:188:5: warning: 'public' modifier is redundant for instance method declared in a public extension
          public func MD2() -&gt; Self {
          ^~~~~~~
  
      /Users/builder/clone/ios/Pods/SCrypto/Source/SCrypto.swift:198:5: warning: 'public' modifier is redundant for instance method declared in a public extension
          public func MD4() -&gt; Self {
          ^~~~~~~
  
      /Users/builder/clone/ios/Pods/SCrypto/Source/SCrypto.swift:208:5: warning: 'public' modifier is redundant for instance method declared in a public extension
          public func MD5() -&gt; Self {
          ^~~~~~~
  
      /Users/builder/clone/ios/Pods/SCrypto/Source/SCrypto.swift:217:5: warning: 'public' modifier is redundant for instance method declared in a public extension
          public func SHA1() -&gt; Self {
          ^~~~~~~
  
      /Users/builder/clone/ios/Pods/SCrypto/Source/SCrypto.swift:226:5: warning: 'public' modifier is redundant for instance method declared in a public extension
          public func SHA224() -&gt; Self {
          ^~~~~~~
  
      /Users/builder/clone/ios/Pods/SCrypto/Source/SCrypto.swift:235:5: warning: 'public' modifier is redundant for instance method declared in a public extension
          public func SHA256() -&gt; Self {
          ^~~~~~~
  
   /Users/builder/clone/ios/Pods/SCrypto/Source/SCrypto.swift:628:5: warning: 'public' modifier is redundant for instance method declared in a public extension
          public func encrypt(_ algorithm: Cipher.Algorithm, options: Cipher.Options, key: Data, iv: Data? = nil) throws -&gt; Data {
          ^~~~~~~
  
      /Users/builder/clone/ios/Pods/SCrypto/Source/SCrypto.swift:646:5: warning: 'public' modifier is redundant for instance method declared in a public extension
          public func decrypt(_ algorithm: Cipher.Algorithm, options: Cipher.Options, key: Data, iv: Data? = nil) throws -&gt; Data {
          ^~~~~~~
  
                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /Users/builder/clone/ios/Pods/SCrypto/Source/SCrypto.swift:272:69: note: implicit argument conversion from '[UInt8]' to 'UnsafePointer&lt;UInt8&gt;' produces a pointer valid only for the duration of the call to 'init(_:)'
              return type(of: self).init(Data(bytes: UnsafePointer&lt;UInt8&gt;(messageDigest), count: messageDigest.count))
                                                                          ^~~~~~~~~~~~~
      /Users/builder/clone/ios/Pods/SCrypto/Source/SCrypto.swift:272:69: note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
              return type(of: self).init(Data(bytes: UnsafePointer&lt;UInt8&gt;(messageDigest), count: messageDigest.count))
     
                                                      ^
      note: Using new build system
      note: Building targets in parallel
      note: Planning build
      note: Constructing build description
      warning: no rule to process file '/Users/builder/programs/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_config-1.0.8/ios/Classes/BuildDotenvConfig.rb' of type 'text.script.ruby' for architecture 'arm64' (in target 'flutter_config' from project 'Pods')
      warning: no rule to process file '/Users/builder/programs/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_config-1.0.8/ios/Classes/BuildXCConfig.rb' of type 'text.script.ruby' for architecture 'arm64' (in target 'flutter_config' from project 'Pods')
      warning: no rule to process file '/Users/builder/programs/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_config-1.0.8/ios/Classes/ReadDotEnv.rb' of type 'text.script.ruby' for architecture 'arm64' (in target 'flutter_config' from project 'Pods')
      warning: no rule to process file '/Users/builder/programs/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_config-1.0.8/ios/Classes/BuildDotenvConfig.rb' of type 'text.script.ruby' for architecture 'armv7' (in target 'flutter_config' from project 'Pods')
      warning: no rule to process file '/Users/builder/programs/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_config-1.0.8/ios/Classes/BuildXCConfig.rb' of type 'text.script.ruby' for architecture 'armv7' (in target 'flutter_config' from project 'Pods')
      warning: no rule to process file '/Users/builder/programs/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_config-1.0.8/ios/Classes/ReadDotEnv.rb' of type 'text.script.ruby' for architecture 'armv7' (in target 'flutter_config' from project 'Pods')
  Encountered error while archiveing for device.
  
  
  
  
  Build failed :|
  Failed to build for iOS
  </code></pre>