RabbitHole24
RabbitHole24

Reputation: 103

Flutter will not build on iOS with Firebase on M1 Mac

I keep trying to build my Flutter app on iOS but I keep getting an error. I have tried everything. I imported my project from GitHub, where I uploaded it from Windows. I followed every step, and I added the iOS app on Firebase and now when wanting to compile I am unable, and very frustrated. Please help.

objc[7346]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x20d9f4188) and ?? (0x113d402b8). One of the two will be
    used. Which one is undefined.
    objc[7346]: Class AMSupportURLSession is implemented in both ?? (0x20d9f41d8) and ?? (0x113d40308). One of the two will be used. Which one
    is undefined.
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/davor/Developer/Projects/Explovid/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'cloud_firestore' not found
    @import cloud_firestore;
     ~~~~~~~^~~~~~~~~~~~~~~
    1 error generated.
    error: the following command failed with exit code 1 but produced no further output
    CompileC
    /Users/davor/Library/Developer/Xcode/DerivedData/Runner-cnftrifzvgjcpyadycxyixuvtnnj/Build/Intermediates.noindex/Runner.build/Release-ipho
    neos/Runner.build/Objects-normal/arm64/GeneratedPluginRegistrant.o
    /Users/davor/Developer/Projects/Explovid/ios/Runner/GeneratedPluginRegistrant.m normal arm64 objective-c
    com.apple.compilers.llvm.clang.1_0.compiler
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Encountered error while building for device.

Upvotes: 1

Views: 1581

Answers (2)

mars000
mars000

Reputation: 141

best answer i found that works is URL below...I found all sorts of issues with M1 ... need to ensure you run from terminal with rosetta ticket in "get info" dialogue box. Its convoluted process. https://github.com/GoogleCloudPlatform/ios-docs-samples/issues/43

Upvotes: -1

Ricky
Ricky

Reputation: 46

I had the same issue. Installed ffi and fixed:

arch -x86_64 sudo gem install ffi

Upvotes: 2

Related Questions