Moor: Unable to compile on iOS: Undefined symbols for architecture armv7

Created on 7 Dec 2020  路  3Comments  路  Source: simolus3/moor

Can build in debug mode but not release mode. Same problem as https://github.com/tekartik/sqflite/issues/536 https://github.com/tekartik/sqflite/issues/540. Problem started when sqlflite moved to FMDB 2.7.5+. Only degrading sqlflite fixes it, but not sure how to fix that while using Moor.

flutter clean/rm symlinks/rm pods/pod upgrade/pub upgrade/regenerate podfile/bump platform target - nothing helps.

Using:
moor_flutter: ^3.1.0
sqlite3_flutter_libs: ^0.2.0

    ld: warning: ignoring file .../build/ios/Release-iphoneos/FMDB/FMDB.framework/FMDB, building for iOS-armv7 but attempting to link with file built for
    iOS-arm64
    Undefined symbols for architecture armv7:
      "_OBJC_CLASS_$_FMDatabaseQueue", referenced from:
          objc-class-ref in SqflitePlugin.o
    ld: symbol(s) not found for architecture armv7

Most helpful comment

@AtaKarakas Try flutter clean and rebuild.

All 3 comments

Compile breaks if using iOS platform target >= 11.

Solution: Change Build Settings > Architectures from $(ARCHS_STANDARD) to arm64.

I am still getting errors even though it is on these settings now, what could be the cause and what is the solution

@AtaKarakas Try flutter clean and rebuild.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simolus3 picture simolus3  路  4Comments

Beloin picture Beloin  路  4Comments

simolus3 picture simolus3  路  4Comments

Holofox picture Holofox  路  4Comments

cadaniel picture cadaniel  路  4Comments