10.5 C
London
Wednesday, February 21, 2024

Flutter construct for IOS: Module ‘amplify_auth_cognito’ not discovered


I am utilizing Flutter and AWS Auth Cognito, when i attempt to run flutter run on an ios simulator i get the follwowing error message:

leon@MBP app % flutter run --flavor dev
Launching lib/important.dart on iPhone 15 Professional in debug mode...
Working Xcode construct...                                                  
 └─Compiling, linking and signing...                      1,531ms
Xcode construct completed.                                           11.0s
Didn't construct iOS app
Parse Situation (Xcode): Module 'amplify_auth_cognito' not discovered
/Customers/leon/work/app/ios/Runner/GeneratedPluginRegistrant.m:11:8


Couldn't construct the appliance for the simulator.
Error launching software on iPhone 15 Professional. 

Nonetheless, if i begin it by way of. XCode i can construct the app on the simulator with none points. On an Android emulator it really works as nicely by way of the run command or the vs-code run choices supplied in my launch.json.

Flutter physician:

✓] Flutter (Channel steady, 3.13.8, on macOS 14.3.1 23D60 darwin-arm64, locale en-DE)
    • Flutter model 3.13.8 on channel steady at /decide/homebrew/Caskroom/flutter/3.3.2/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6c4930c4ac (4 months in the past), 2023-10-18 10:57:55 -0500
    • Engine revision 767d8c75e8
    • Dart model 3.1.4
    • DevTools model 2.25.0

[✓] Android toolchain - develop for Android units (Android SDK model 33.0.0)
    • Android SDK at /Customers/me/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Purposes/Android Studio.app/Contents/jre/Contents/House/bin/java
    • Java model OpenJDK Runtime Setting (construct 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Purposes/Xcode.app/Contents/Developer
    • Construct 15C500b
    • CocoaPods model 1.13.0

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

[✓] Android Studio (model 2021.3)
    • Android Studio at /Purposes/Android Studio.app/Contents
    • Flutter plugin will be put in from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin will be put in from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java model OpenJDK Runtime Setting (construct 11.0.13+0-b1751.21-8125866)

[✓] VS Code (model 1.86.2)
    • VS Code at /Purposes/Visible Studio Code.app/Contents
    • Flutter extension model 3.82.0

[✓] Linked system (3 obtainable)
    • iPhone 15 Professional (cellular) • 8D18B1DA-DB2D-47CA-9D0D-2EBCDC7784E3 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 14.3.1 23D60 darwin-arm64
    • Chrome (internet)           • chrome                               • web-javascript • Google Chrome 121.0.6167.184

[✓] Community sources
    • All anticipated community sources can be found.

• No points discovered!

Podfile:

# Uncomment this line to outline a worldwide platform to your mission
platform :ios, '15.0'
# CocoaPods analytics sends community stats synchronously affecting flutter construct latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

mission 'Runner', {
  'Debug' => :debug,
  'Profile' => :launch,
  'Launch' => :launch,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.be part of('../','Flutter', 'Generated.xcconfig'), __FILE__)
  until File.exist?(generated_xcode_build_settings_path)
    increase "#{generated_xcode_build_settings_path} should exist. For those who're working pod set up manually, be sure that flutter pub get is executed first"
  finish

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT=(.*)/)
    return matches[1].strip if matches
  finish
  increase "FLUTTER_ROOT not present in #{generated_xcode_build_settings_path}. Attempt deleting Generated.xcconfig, then run flutter pub get"
finish

require File.expand_path(File.be part of('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

goal 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
finish

post_install do |installer|
  installer.pods_project.targets.every do |goal|
    flutter_additional_ios_build_settings(goal)
    goal.build_configurations.every do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    finish
  finish
finish

supply 'https://cdn.cocoapods.org/'

Pubspec.yaml:

identify: app
description: A brand new Flutter mission.

publish_to: "none" # Take away this line in the event you want to publish to pub.dev

https://developer.apple.com/library/archive/documentation/Normal/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
model: 1.0.0+1

setting:
  sdk: ">=2.18.0 <4.0.0"
  flutter: ">=3.3.0"

dependencies:
  flutter:
    sdk: flutter

  # The next provides the Cupertino Icons font to your software.
  # Use with the CupertinoIcons class for iOS model icons.
  cupertino_icons: ^1.0.5
  smooth_page_indicator: ^1.0.0+2

  # i18n part
  flutter_localizations:
    sdk: flutter
  intl: ^0.18.0 # flutter_localizations


  flutter_riverpod: ^2.3.6
  hooks_riverpod: ^2.3.6
  flutter_hooks: ^0.18.6
  path: ^1.8.1
  shared_preferences: ^2.0.15

  # Charts
  # TODO: Change with fl_charts. Excessive precedence, since syncfusion_flutter_gauges
  # has the issue with reminiscence leaks
  # Reference: https://github.com/syncfusion/flutter-examples/points/67
  syncfusion_flutter_gauges: ^21.2.4

  phosphor_flutter: ^2.0.0
  flutter_svg: ^2.0.7

  amplify_flutter: ^1.0.0
  amplify_auth_cognito: ^1.6.2
  amplify_authenticator: ^1.0.0

  freezed_annotation: ^2.0.3
  json_annotation: ^4.8.1
  jiffy: ^5.0.0
  dotted_line: ^3.1.0
  go_router: ^7.0.1
  package_info_plus: ^4.0.2

  http: ^0.13.5
  dio: ^5.3.0

  month_picker_dialog: ^2.0.0
  auto_size_text: ^3.0.0
  url_launcher: ^6.2.2
  graphql: ^5.1.2
  graphql_flutter: ^5.1.1
  upgrader: ^6.5.0

  # Sentry
  sentry_flutter: ^7.13.1
  sentry_logging: ^7.13.1
  sentry_dio: ^7.13.1
  logging: ^1.2.0

  flutter_secure_storage: ^9.0.0
  local_auth: ^2.1.7
  local_auth_ios: ^1.1.4
  local_auth_android: ^1.0.35
  flutter_flavorizr: ^2.2.1

dev_dependencies:
  flutter_test:
    sdk: flutter
  faker: ^2.0.0
  flutter_lints: ^2.0.1
  mocktail: ^0.3.0
  assortment: ^1.16.0
  build_runner: ^2.4.4
  freezed: ^2.0.4
  json_serializable: ^6.7.0
  integration_test:
    sdk: flutter
  flutter_driver:
    sdk: flutter
  check: ^1.24.3



# For data on the generic Dart a part of this file, see the
# following web page: https://dart.dev/instruments/pub/pubspec

# The next part is particular to Flutter packages.
flutter:
  # The next line ensures that the Materials Icons font is
  # included together with your software, so as to use the icons in
  # the fabric Icons class.
  uses-material-design: true

  # Associated to i18n part in dependencies
  generate: true

  # So as to add belongings to your software, add an belongings part, like this:
  belongings:
    - belongings/Graphics/
    - belongings/Graphics/onboarding/
    - belongings/Graphics/brand/
    - belongings/Graphics/Playing cards/
    - belongings/Graphics/tva/

  # A picture asset can discuss with a number of resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware

  # For particulars relating to including belongings from bundle dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # So as to add {custom} fonts to your software, add a fonts part right here,
  # on this "flutter" part. Every entry on this listing ought to have a
  # "household" key with the font household identify, and a "fonts" key with a
  # listing giving the asset and different descriptors for the font. For
  # instance:
  fonts:
    - household: Inter
      fonts:
        - asset: belongings/google-fonts/Inter/static/Inter-Daring.ttf
          weight: 700
        - asset: belongings/google-fonts/Inter/static/Inter-SemiBold.ttf
          weight: 600
        - asset: belongings/google-fonts/Inter/static/Inter-Common.ttf
          weight: 400

    # - household: <Title>
    #   fonts:
    #     - asset: <path>.ttf
    #       model: regular
#           weight: 700
#
# For particulars relating to fonts from bundle dependencies,
# see https://flutter.dev/custom-fonts/#from-packages

I already up to date the auth_cogntio plugin, up to date the pod repo, deintegrated the pod, put in the pod once more and so forth. I believe it is an configuration situation however I do not know the place else to look because it runs by way of the XCode run however fails in every single place else.

I would anticipate it to run by way of the vsCode run, or terminal in addition to constructing it by way of the ./ios/Runner.xcworkspace UI

Possibly another person confronted the identical situation?

Latest news
Related news

LEAVE A REPLY

Please enter your comment!
Please enter your name here