diff --git a/packages/data_importer/.gitignore b/packages/data_importer/.gitignore
deleted file mode 100644
index 96486fd9302..00000000000
--- a/packages/data_importer/.gitignore
+++ /dev/null
@@ -1,30 +0,0 @@
-# Miscellaneous
-*.class
-*.log
-*.pyc
-*.swp
-.DS_Store
-.atom/
-.buildlog/
-.history
-.svn/
-migrate_working_dir/
-
-# IntelliJ related
-*.iml
-*.ipr
-*.iws
-.idea/
-
-# The .vscode folder contains launch configuration and tasks you configure in
-# VS Code which you may wish to be included in version control, so this line
-# is commented out by default.
-#.vscode/
-
-# Flutter/Dart/Pub related
-# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
-/pubspec.lock
-**/doc/api/
-.dart_tool/
-.packages
-build/
diff --git a/packages/data_importer/.metadata b/packages/data_importer/.metadata
deleted file mode 100644
index 5bfec1bcc1e..00000000000
--- a/packages/data_importer/.metadata
+++ /dev/null
@@ -1,33 +0,0 @@
-# This file tracks properties of this Flutter project.
-# Used by Flutter tool to assess capabilities and perform upgrades etc.
-#
-# This file should be version controlled.
-
-version:
- revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
- channel: stable
-
-project_type: plugin
-
-# Tracks metadata for the flutter migrate command
-migration:
- platforms:
- - platform: root
- create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
- base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
- - platform: android
- create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
- base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
- - platform: ios
- create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
- base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
-
- # User provided section
-
- # List of Local paths (relative to this file) that should be
- # ignored by the migrate tool.
- #
- # Files that are not part of the templates will be ignored by default.
- unmanaged_files:
- - 'lib/main.dart'
- - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/packages/data_importer/analysis_options.yaml b/packages/data_importer/analysis_options.yaml
deleted file mode 100644
index 773401149ed..00000000000
--- a/packages/data_importer/analysis_options.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-include: ../smooth_app/analysis_options.yaml
-
-analyzer:
- exclude:
- - lib/ios/model/realm_history_item.g.dart
\ No newline at end of file
diff --git a/packages/data_importer/android/.gitignore b/packages/data_importer/android/.gitignore
deleted file mode 100644
index 161bdcdaf88..00000000000
--- a/packages/data_importer/android/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-*.iml
-.gradle
-/local.properties
-/.idea/workspace.xml
-/.idea/libraries
-.DS_Store
-/build
-/captures
-.cxx
diff --git a/packages/data_importer/android/build.gradle b/packages/data_importer/android/build.gradle
deleted file mode 100644
index ce94629d103..00000000000
--- a/packages/data_importer/android/build.gradle
+++ /dev/null
@@ -1,50 +0,0 @@
-group 'org.openfoodfacts.off.data_importer'
-version '1.0-SNAPSHOT'
-
-buildscript {
- ext.kotlin_version = '1.6.10'
- repositories {
- google()
- mavenCentral()
- }
-
- dependencies {
- classpath 'com.android.tools.build:gradle:7.1.2'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- }
-}
-
-rootProject.allprojects {
- repositories {
- google()
- mavenCentral()
- }
-}
-
-apply plugin: 'com.android.library'
-apply plugin: 'kotlin-android'
-
-android {
- compileSdkVersion 31
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-
- kotlinOptions {
- jvmTarget = '1.8'
- }
-
- sourceSets {
- main.java.srcDirs += 'src/main/kotlin'
- }
-
- defaultConfig {
- minSdkVersion 16
- }
-}
-
-dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-}
diff --git a/packages/data_importer/android/gradle/wrapper/gradle-wrapper.properties b/packages/data_importer/android/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 41dfb87909a..00000000000
--- a/packages/data_importer/android/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/packages/data_importer/android/settings.gradle b/packages/data_importer/android/settings.gradle
deleted file mode 100644
index e8b910a9b11..00000000000
--- a/packages/data_importer/android/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-rootProject.name = 'data_importer'
diff --git a/packages/data_importer/android/src/main/AndroidManifest.xml b/packages/data_importer/android/src/main/AndroidManifest.xml
deleted file mode 100644
index a72b7c5d1ae..00000000000
--- a/packages/data_importer/android/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
diff --git a/packages/data_importer/android/src/main/kotlin/org/openfoodfacts/off/data_importer/DataImporterPlugin.kt b/packages/data_importer/android/src/main/kotlin/org/openfoodfacts/off/data_importer/DataImporterPlugin.kt
deleted file mode 100644
index 89946f9457b..00000000000
--- a/packages/data_importer/android/src/main/kotlin/org/openfoodfacts/off/data_importer/DataImporterPlugin.kt
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.openfoodfacts.off.data_importer
-
-import android.content.Context
-import androidx.annotation.NonNull
-
-import io.flutter.embedding.engine.plugins.FlutterPlugin
-import io.flutter.plugin.common.MethodCall
-import io.flutter.plugin.common.MethodChannel
-import io.flutter.plugin.common.MethodChannel.MethodCallHandler
-import io.flutter.plugin.common.MethodChannel.Result
-import org.openfoodfacts.off.data_importer.DataImporterPlugin.Companion.LOGIN_PREFERENCES
-
-/** DataImporterPlugin */
-class DataImporterPlugin: FlutterPlugin, MethodCallHandler {
-
- companion object {
- const val LOGIN_PREFERENCES = "login"
- }
-
- private lateinit var channel : MethodChannel
- private var context : Context? = null
-
- override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {
- context = flutterPluginBinding.applicationContext
- channel = MethodChannel(flutterPluginBinding.binaryMessenger, "data_importer")
- channel.setMethodCallHandler(this)
- }
-
- override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) {
- val loginPreferences = getLoginPreferences()
- if (loginPreferences == null) {
- result.error("SP", "Shared Preferences don't exist!", "")
- return
- }
-
- when (call.method) {
- "getUser" -> {
- loginPreferences.apply {
- val user = getString("user", null)
- val password = getString("pass", null)
-
- result.success(mapOf("user" to user, "password" to password))
- }
- }
- "clearOldData" -> {
- loginPreferences.run {
- edit().clear().apply()
- result.success(true)
- }
- }
- else -> {
- result.notImplemented()
- }
- }
- }
-
- private fun getLoginPreferences() =
- context?.getSharedPreferences(LOGIN_PREFERENCES, Context.MODE_PRIVATE)
-
- override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) {
- channel.setMethodCallHandler(null)
- context = null
- }
-}
diff --git a/packages/data_importer/coverage/lcov.info b/packages/data_importer/coverage/lcov.info
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/packages/data_importer/ios/.gitignore b/packages/data_importer/ios/.gitignore
deleted file mode 100644
index 0c885071e36..00000000000
--- a/packages/data_importer/ios/.gitignore
+++ /dev/null
@@ -1,38 +0,0 @@
-.idea/
-.vagrant/
-.sconsign.dblite
-.svn/
-
-.DS_Store
-*.swp
-profile
-
-DerivedData/
-build/
-GeneratedPluginRegistrant.h
-GeneratedPluginRegistrant.m
-
-.generated/
-
-*.pbxuser
-*.mode1v3
-*.mode2v3
-*.perspectivev3
-
-!default.pbxuser
-!default.mode1v3
-!default.mode2v3
-!default.perspectivev3
-
-xcuserdata
-
-*.moved-aside
-
-*.pyc
-*sync/
-Icon?
-.tags*
-
-/Flutter/Generated.xcconfig
-/Flutter/ephemeral/
-/Flutter/flutter_export_environment.sh
\ No newline at end of file
diff --git a/packages/data_importer/ios/Assets/.gitkeep b/packages/data_importer/ios/Assets/.gitkeep
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/packages/data_importer/ios/Classes/DataImporterPlugin.h b/packages/data_importer/ios/Classes/DataImporterPlugin.h
deleted file mode 100644
index f733d78b9e7..00000000000
--- a/packages/data_importer/ios/Classes/DataImporterPlugin.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#import
-
-@interface DataImporterPlugin : NSObject
-@end
diff --git a/packages/data_importer/ios/Classes/DataImporterPlugin.m b/packages/data_importer/ios/Classes/DataImporterPlugin.m
deleted file mode 100644
index 4541b82b02a..00000000000
--- a/packages/data_importer/ios/Classes/DataImporterPlugin.m
+++ /dev/null
@@ -1,15 +0,0 @@
-#import "DataImporterPlugin.h"
-#if __has_include()
-#import
-#else
-// Support project import fallback if the generated compatibility header
-// is not copied when this plugin is created as a library.
-// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816
-#import "data_importer-Swift.h"
-#endif
-
-@implementation DataImporterPlugin
-+ (void)registerWithRegistrar:(NSObject*)registrar {
- [SwiftDataImporterPlugin registerWithRegistrar:registrar];
-}
-@end
diff --git a/packages/data_importer/ios/Classes/SwiftDataImporterPlugin.swift b/packages/data_importer/ios/Classes/SwiftDataImporterPlugin.swift
deleted file mode 100644
index f764b510593..00000000000
--- a/packages/data_importer/ios/Classes/SwiftDataImporterPlugin.swift
+++ /dev/null
@@ -1,112 +0,0 @@
-import Flutter
-import KeychainAccess
-import RealmSwift
-import UIKit
-
-public class SwiftDataImporterPlugin: NSObject, FlutterPlugin {
- public static func register(with registrar: FlutterPluginRegistrar) {
- let channel = FlutterMethodChannel(
- name: "data_importer", binaryMessenger: registrar.messenger())
- let instance = SwiftDataImporterPlugin()
- registrar.addMethodCallDelegate(instance, channel: channel)
- }
-
- public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
- if call.method == "getUser" {
- let userName = UserDefaults.standard.string(forKey: "username")
-
- if userName != nil {
- let keychain = Keychain(service: "org.openfoodfacts.openfoodfacts")
- result(["user": userName, "password": keychain[userName!]])
- } else {
- result(["user": nil, "password": nil])
- }
- } else if call.method == "getHistory" {
- configureRealm()
-
- result(
- Array(getRealm().objects(HistoryItem.self).sorted(byKeyPath: "timestamp", ascending: false))
- .map { $0.barcode })
- } else if call.method == "clearOldData" {
- UserDefaults.standard.removeObject(forKey: "username")
- do {
- try Keychain(service: "org.openfoodfacts.openfoodfacts").removeAll()
-
- let url = Realm.Configuration.defaultConfiguration.fileURL!
- remove(realmURL: url)
- result(true)
- } catch {
- result(false)
- }
- } else {
- result(FlutterMethodNotImplemented)
- }
- }
-
- private func remove(realmURL: URL) {
- let realmURLs = [
- realmURL,
- realmURL.appendingPathExtension("lock"),
- realmURL.appendingPathExtension("note"),
- realmURL.appendingPathExtension("management"),
- ]
- for URL in realmURLs {
- try? FileManager.default.removeItem(at: URL)
- }
- }
-
- private func configureRealm() {
- // https://stackoverflow.com/questions/33363508/rlmexception-migration-is-required-for-object-type
- let config = Realm.Configuration(
- schemaVersion: 36,
- // Set the block which will be called automatically when opening a Realm with
- // a schema version lower than the one set above
- migrationBlock: { _, oldSchemaVersion in
- // Whenever your scheme changes your have to increase the schemaVersion in the migration block and update the needed migration within the block.
- if oldSchemaVersion < 36 {
- // Nothing to do!
- // Realm will automatically detect new properties and removed properties
- // And will update the schema on disk automatically
- }
- })
-
- // Tell Realm to use this new configuration object for the default Realm
- Realm.Configuration.defaultConfiguration = config
-
- // Now that we've told Realm how to handle the schema change, opening the file
- // will automatically perform the migration
- do {
- _ = try Realm(configuration: config)
- print("AppDelegate: Database Path : \(config.fileURL!)")
- } catch {
- print(error.localizedDescription)
- }
- }
-
- private func getRealm() -> Realm {
- do {
- return try Realm()
- } catch let error as NSError {
- fatalError("Could not get Realm instance")
- }
- fatalError("Could not get Realm instance")
- }
-}
-
-class HistoryItem: Object {
- @objc dynamic var barcode = ""
- @objc dynamic var productName: String?
- @objc dynamic var brand: String?
- @objc dynamic var quantity: String?
- @objc dynamic var packaging: String?
- @objc dynamic var labels: String?
- @objc dynamic var imageUrl: String?
- @objc dynamic var timestamp = Date()
- @objc dynamic var nutriscore: String?
- @objc dynamic var ecoscore: String?
- let novaGroup = RealmOptional()
-
- override static func primaryKey() -> String? {
- return "barcode"
- }
-}
\ No newline at end of file
diff --git a/packages/data_importer/ios/data_importer.podspec b/packages/data_importer/ios/data_importer.podspec
deleted file mode 100644
index b733dd6968f..00000000000
--- a/packages/data_importer/ios/data_importer.podspec
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
-# Run `pod lib lint data_importer.podspec` to validate before publishing.
-#
-Pod::Spec.new do |s|
- s.name = 'data_importer'
- s.version = '0.0.1'
- s.summary = 'Data importer from V1'
- s.description = <<-DESC
-Data importer from V1
- DESC
- s.homepage = 'https://openfoodfacts.org/'
- s.license = { :file => '../LICENSE' }
- s.author = { 'OpenFoodFacts' => 'contact@openfoodfacts.org' }
- s.source = { :path => '.' }
- s.source_files = 'Classes/**/*'
- s.dependency 'Flutter'
- s.dependency 'KeychainAccess'
- s.dependency 'RealmSwift'
- s.platform = :ios, '9.0'
-
- # Flutter.framework does not contain a i386 slice.
- s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
- s.swift_version = '5.0'
-end
diff --git a/packages/data_importer/lib/android/android_data_importer.dart b/packages/data_importer/lib/android/android_data_importer.dart
deleted file mode 100644
index e1a352f9bcd..00000000000
--- a/packages/data_importer/lib/android/android_data_importer.dart
+++ /dev/null
@@ -1,27 +0,0 @@
-import 'package:data_importer/android/android_sqlite_importer.dart';
-import 'package:data_importer/shared/model.dart';
-import 'package:data_importer/shared/native_data_importer.dart';
-import 'package:data_importer/shared/platform_data_importer.dart';
-
-/// Android Implementation with:
-/// - Lists are saved in a SQLite database
-/// - Credentials are saved with Shared Preferences
-class AndroidDataImporter implements PlatformDataImporter {
- @override
- Future importLists() {
- return AndroidDatabaseImporter.extract();
- }
-
- @override
- Future importUser() {
- return NativeDataImporter.getUser();
- }
-
- @override
- Future deleteOldDataOnDevice() async {
- return Future.wait(>[
- AndroidDatabaseImporter.removeDatabase(),
- NativeDataImporter.clearOldData()
- ]).then((List value) => !value.contains(false));
- }
-}
diff --git a/packages/data_importer/lib/android/android_sqlite_importer.dart b/packages/data_importer/lib/android/android_sqlite_importer.dart
deleted file mode 100644
index d3300ee5642..00000000000
--- a/packages/data_importer/lib/android/android_sqlite_importer.dart
+++ /dev/null
@@ -1,120 +0,0 @@
-import 'dart:io';
-
-import 'package:data_importer/data_importer.dart';
-import 'package:data_importer/shared/model.dart';
-import 'package:path/path.dart';
-import 'package:sqflite/sqflite.dart';
-
-class AndroidDatabaseImporter {
- const AndroidDatabaseImporter._();
-
- static Future extract() async {
- final String path = await _getDatabasePath();
-
- if (!File(path).existsSync()) {
- return null;
- }
-
- final Database database = await openDatabase(
- path,
- version: 22,
- readOnly: true,
- );
-
- final ImportableProductList history =
- await _listProductsFromHistory(database);
- final ImportableUserLists lists = await _listUserLists(database);
-
- await database.close();
-
- return ImportableUserData(
- history: history,
- lists: lists,
- );
- }
-
- static Future _getDatabasePath() async {
- final String databasesPath = await getDatabasesPath();
- final String path = join(databasesPath, 'open_food_facts');
- return path;
- }
-
- static Future _listProductsFromHistory(
- Database database) async {
- final List