title: Undefined symbols for architecture arm64:"_OBJC_CLASS_$_FlutterError"
body: <p>I wanted to implement image notification in a flutter app. I setup everything using <a href="https://firebase.flutter.dev/docs/messaging/apple-integration/#advanced-optional-allowing-notification-images" rel="nofollow noreferrer">this doc</a> and when I run a real device, the image notification worked. ​</p>
  <p>but, when i try to Archive the build i'm getting this error. I am able to take archive only if I delete the MyImageNotification target.</p>
  <p><a href="https://i.stack.imgur.com/JWaRZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JWaRZ.png" alt="enter image description here" /></a></p>
  <p>This is folder structure looks like once i completed setup of imagg notification
  <a href="https://i.stack.imgur.com/2X0UG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2X0UG.png" alt="enter image description here" /></a></p>
  <p>I got below message from the bottom of the error log</p>
  <pre><code>ld: warning: Could not find or use auto-linked framework 'Flutter'
  Undefined symbols for architecture arm64:
    &quot;_OBJC_CLASS_$_FlutterError&quot;, referenced from:
        objc-class-ref in firebase_core(FLTFirebasePlugin.o)
        objc-class-ref in firebase_dynamic_links(FLTFirebaseDynamicLinksPlugin.o)
    &quot;_OBJC_CLASS_$_FlutterMethodChannel&quot;, referenced from:
        objc-class-ref in firebase_core(FLTFirebaseCorePlugin.o)
        objc-class-ref in firebase_dynamic_links(FLTFirebaseDynamicLinksPlugin.o)
        objc-class-ref in firebase_messaging(FLTFirebaseMessagingPlugin.o)
    &quot;_FlutterMethodNotImplemented&quot;, referenced from:
        -[FLTFirebaseCorePlugin handleMethodCall:result:] in firebase_core(FLTFirebaseCorePlugin.o)
        -[FLTFirebaseDynamicLinksPlugin handleMethodCall:result:] in firebase_dynamic_links(FLTFirebaseDynamicLinksPlugin.o)
        -[FLTFirebaseMessagingPlugin handleMethodCall:result:] in firebase_messaging(FLTFirebaseMessagingPlugin.o)
  ld: symbol(s) not found for architecture arm64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  <p>My PodFile look like this</p>
  <pre><code>
  # Uncomment this line to define a global platform for your project
  # platform :ios, '9.0'
  
  # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
  ENV['COCOAPODS_DISABLE_STATS'] = 'true'
  
  project 'Runner', {
  'Debug' =&gt; :debug,
  'Profile' =&gt; :release,
  'Release' =&gt; :release,
  }
  
  def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
   raise &quot;#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first&quot;
  end
  
  File.foreach(generated_xcode_build_settings_path) do |line|
   matches = line.match(/FLUTTER_ROOT\=(.*)/)
   return matches[1].strip if matches
  end
  raise &quot;FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get&quot;
  end
  
  require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
  
  flutter_ios_podfile_setup
  
  target 'Runner' do
  use_frameworks!
  use_modular_headers!
  
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  end
  
  post_install do |installer|
  installer.pods_project.targets.each do |target|
   flutter_additional_ios_build_settings(target)
  end
  end
  
  target 'MyImageNotification' do
  use_frameworks!
  
  pod 'Firebase/Messaging'
  end
  
  
  </code></pre>