VirgilSecurity / virgil-e3kit-flutter

BSD 3-Clause "New" or "Revised" License
8 stars 10 forks source link

Not building for iOS on M1 Mac #13

Open nizarmasri opened 2 years ago

nizarmasri commented 2 years ago

I'm getting this error:

Error (Xcode): Building for iOS Simulator, but linking in dylib built for iOS, file '/Users/xxx/StudioProjects/xxx/ios/Pods/VSCCrypto/Carthage/iOS/VSCFoundation.framework/VSCFoundation' for architecture arm64

Xcode 13.1 macOS 11.6 Macbook Pro M1

Flutter 3.0.1 Dart 2.17.1 iOS 15.0 Simulator

I've tried everything I found online, some of which are:

post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
  end
  installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
      end
  end
end

None of these solve the problem, some of them generate different errors, but none of them succeed in building the app.

flutter doctor

[✓] Flutter (Channel stable, 3.0.1, on macOS 11.6 20G165 darwin-arm, locale en-BR)
    • Flutter version 3.0.1 at /Users/nizarmasri/Downloads/flutter 2
    • Upstream repository git@github.com:flutter/flutter.git
    • Framework revision fb57da5f94 (3 weeks ago), 2022-05-19 15:50:29 -0700
    • Engine revision caaafc5604
    • Dart version 2.17.1
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/nizarmasri/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_SDK_ROOT = /opt/homebrew/Caskroom/android-commandlinetools
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)

[✓] VS Code (version 1.67.2)
    • VS Code at /Users/nizarmasri/Downloads/VSCode-darwin-arm64/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • iPhone 13 (mobile) • 1CF99573-3EE8-4F2A-A63F-3136D2CEC212 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
    • macOS (desktop)    • macos                                • darwin-arm64   • macOS 11.6 20G165 darwin-arm
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 101.0.4951.64

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!