brim-borium/spotify_sdk

GeneratedPluginRestriant.o Undefined Symbols for _OBJC_CLASS_$_SpotifySdkPlugin

Closed this issue · 2 comments

I’ve into an issue where the SpotifySdkPlugin is not recognized in an automatically generated file GeneratedPluginRegistrant.m in Xcode. The output of my terminal log is shown below. I have the spotify_sdk installed in my .symlinks directory of my project, and have tried a variety of commands such as flutter clean; rm ios/Podfile ios/Podfile.lock pubspec.lock; rm -rf ios/Pods ios/Runner.xcworkspace; flutter run which I found referenced here as a solution, but it was unsuccessful. I am trying to compile the project for an iPhone simulator and I am using a Mac. Any insight into a fix would be very helpful.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at

https://flutter.dev/go/android-project-migration

to migrate your project.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Launching lib/main.dart on iPhone X in debug mode...
Warning: Missing build name (CFBundleShortVersionString).
Warning: Missing build number (CFBundleVersion).
Action Required: You must set a build name and number in the pubspec.yaml file version field before submitting to the App Store.
Running pod install...                                              7.3s
Running Xcode build...                                                  
 └─Compiling, linking and signing...                        10.4s
Xcode build done.                                           86.4s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    Undefined symbols for architecture x86_64:
      "_OBJC_CLASS_$_SpotifySdkPlugin", referenced from:
          objc-class-ref in GeneratedPluginRegistrant.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment
    target versions is 9.0 to 14.4.99. (in target 'Flutter' from project 'Pods')

Could not build the application for the simulator.
Error launching application on iPhone X.

I couldn't reproduce the issue. Can you try to upgrade to the latest flutter version (2.0.5) and start a fresh project with flutter create test_project? Then add spotify_sdk: ^2.1.0 to pubspec.yaml and see if you can run it.

Closing this as stale. Feel free to comment if you are still facing the issue.