Not working on m1 Simulator
Closed this issue · 2 comments
7mada123 commented
I got the following error when I am trying to run it
Ignoring file /flutter_tv/ios/Flutter/Flutter.framework/Flutter, building for tvOS Simulator-arm64 but attempting to link with file built for tvOS Simulator-x86_64
the above error is coming from custom_shared_preferences_ios
, so I removed and tried again but I got another error
ld: warning: Could not find or use auto-linked framework 'Flutter'
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FlutterAppDelegate", referenced from:
_$s6Runner11AppDelegateCN in AppDelegate.o
"_OBJC_METACLASS_$_FlutterAppDelegate", referenced from:
_OBJC_METACLASS_$__TtC6Runner11AppDelegate in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Could not find or use auto-linked framework 'Flutter'
Undefined symbol: _OBJC_CLASS_$_FlutterAppDelegate
Undefined symbol: _OBJC_METACLASS_$_FlutterAppDelegate
run_apple_tv.sh
logs
+ export FLUTTER_LOCAL_ENGINE=/Users/mohammedalfateh/cutsom_flutter_engine
+ FLUTTER_LOCAL_ENGINE=/Users/mohammedalfateh/cutsom_flutter_engine
+ fvm flutter clean
Cleaning Xcode workspace... 1,421ms
Cleaning Xcode workspace... 1,937ms
+ fvm flutter pub get
Running "flutter pub get" in flutter_tv... 1,972ms
+ fvm flutter build ios
Building dev.flutter.tv.flutterTv for device (ios-release)...
Updating minimum iOS deployment target to 11.0.
Upgrading project.pbxproj
Upgrading AppFrameworkInfo.plist
Upgrading Info.plist
Automatically signing iOS for device deployment using specified development team in Xcode project: 8FX2IE529F
Running Xcode build...
Xcode build done. 30.5s
Built /Users/mohammedalfateh/projects/flutter_tv/build/ios/iphoneos/Runner.app.
+ sh scripts/switch_target.sh tvos
switching to 'tvos'
+ cd ios
+ fvm flutter pub get
Running "flutter pub get" in flutter_tv... 1,963ms
+ pod install
Analyzing dependencies
Downloading dependencies
Installing Flutter (1.0.0)
Generating Pods project
Integrating client project
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).
+ sh ../scripts/copy_framework.sh debug_sim FLUTTER_LOCAL_ENGINE
Coping Flutter.framework (debug-simulator)...
+ sed -i '' 's#FLUTTER_LOCAL_ENGINE[[:space:]]=[[:space:]].*;#FLUTTER_LOCAL_ENGINE = "/Users/mohammedalfateh/cutsom_flutter_engine";#g' Runner.xcodeproj/project.pbxproj
+ open Runner.xcworkspace
DenisovAV commented
I have no m1 Mac to check it myself, could you please try to go to pods > excluded architecture > debug > add arm64, and then try to run it in the simulator again
7mada123 commented
Thanks @DenisovAV, it's working after adding arm64 to Runner as well