Realm not working on IOS for a flutter project

Hi everyone!

I started a Flutter project few weeks ago and I want to use realm for local storage. But It’s not working on IOS simulator or real device.

I’m using this configuration for Flutter and Dart:

Flutter 3.16.7 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ef1af02aea (4 days ago) • 2024-01-11 15:19:26 -0600
Engine • revision 4a585b7929
Tools • Dart 3.2.4 • DevTools 2.28.5

I added the realm to the pabspec.yaml

realm: ^1.6.1

On Android is working well and when i want to update the pods and run on IOS is giving me this error:

Updating local specs repositories

CocoaPods 1.14.3 is available.
To update use: `sudo gem install cocoapods`

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.14.3

Analyzing dependencies
firebase_auth: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
project dir is /Users/agusampietro/GitHub/Dems/app/dems_mobile/ios
app dir is /Users/agusampietro/GitHub/Dems/app/dems_mobile
bundleId is dems_mobile
Downloading dependencies
Installing AppAuth (1.6.2)
Installing Firebase (10.18.0)
Installing FirebaseAppCheckInterop (10.19.0)
Installing FirebaseAuth (10.18.0)
Installing FirebaseCore (10.18.0)
Installing FirebaseCoreInternal (10.19.0)
Installing FirebaseInstallations (10.19.0)
Installing FirebaseMessaging (10.18.0)
Installing Flutter (1.0.0)
Installing GTMAppAuth (2.0.0)
Installing GTMSessionFetcher (3.2.0)
Installing GoogleDataTransport (9.3.0)
Installing GoogleSignIn (7.0.0)
Installing GoogleUtilities (7.12.0)
Installing PromisesObjC (2.3.1)
Installing RecaptchaInterop (100.0.0)
Installing firebase_auth (4.16.0)
Installing firebase_core (2.24.2)
Installing firebase_messaging (14.7.10)
Installing flutter_native_timezone (0.0.1)
Installing flutter_share (0.0.1)
Installing geolocator_apple (1.2.0)
Installing google_sign_in_ios (0.0.1)
Installing nanopb (2.30909.1)
Installing path_provider_foundation (0.0.1)
Installing permission_handler_apple (9.1.1)
Installing realm (1.6.1)
Installing shared_preferences_foundation (0.0.1)
Installing the_apple_sign_in (1.0.0)
Generating Pods project
[!] Unable to install vendored xcframework `realm_dart` for Pod `realm`, because it contains both static and dynamic frameworks.

I already clean, the flutter project, deleted the podfile, check for updates on xcode, flutter and pods. and I can find the solution for this issue.

Probably someone had this error before.

Thanks,
Agustin Sampietro