Using flutter with native resources on apple silicon processors
📰 Dev.to · Thiago Massari Guedes
Learn to use Flutter with native resources on Apple Silicon processors and resolve common errors
Action Steps
- Install the latest version of Flutter using the command 'flutter pub upgrade' to ensure compatibility with Apple Silicon processors
- Use the 'arch -x86_64' command to specify the architecture for CocoaPods, resolving the 'cannot load such file -- ffi_c' error
- Configure your project to use native resources by adding the necessary dependencies to your pubspec.yaml file
- Run 'pod install' in your project's ios directory to install the required pods
- Test your application on an Apple Silicon processor to ensure that native resources are working correctly
Who Needs to Know This
Mobile developers and engineers working with Flutter on Apple Silicon processors will benefit from this lesson, as it provides a solution to a common error encountered when using native packages
Key Insight
💡 Specifying the architecture for CocoaPods using 'arch -x86_64' resolves the 'cannot load such file -- ffi_c' error
Share This
💡 Resolve errors when using Flutter with native resources on Apple Silicon processors #flutter #arm
Key Takeaways
Learn to use Flutter with native resources on Apple Silicon processors and resolve common errors
Full Article
Title: Using flutter with native resources on apple silicon processors
URL Source: https://dev.to/thiagomg/using-flutter-with-native-resources-on-apple-silicon-processors-403g
Published Time: 2024-12-20T05:53:07Z
Markdown Content:
[Skip to content](https://dev.to/thiagomg/using-flutter-with-native-resources-on-apple-silicon-processors-403g#main-content)
[](https://dev.to/)
[Powered by Algolia](https://www.algolia.com/developers/?utm_source=devto&utm_medium=referral)
[Log in](https://dev.to/enter?signup_subforem=1)[Create account](https://dev.to/enter?signup_subforem=1&state=new-user)
## DEV Community
0 Add reaction
0 Like 0 Unicorn 0 Exploding Head 0 Raised Hands 0 Fire
0 Jump to Comments 2 Save Boost
Copy link
Copied to Clipboard
[Share to X](https://twitter.com/intent/tweet?text=%22Using%20flutter%20with%20native%20resources%20on%20apple%20silicon%20processors%22%20by%20%40thiedri%20%23DEVCommunity%20https%3A%2F%2Fdev.to%2Fthiagomg%2Fusing-flutter-with-native-resources-on-apple-silicon-processors-403g)[Share to LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fdev.to%2Fthiagomg%2Fusing-flutter-with-native-resources-on-apple-silicon-processors-403g&title=Using%20flutter%20with%20native%20resources%20on%20apple%20silicon%20processors&summary=If%20you%20are%20building%20a%20flutter%20application%20for%20apple%20processors%20using%20Silicon%20processors%20%28M1%2B%29%20and...&source=DEV%20Community)[Share to Facebook](https://www.facebook.com/sharer.php?u=https%3A%2F%2Fdev.to%2Fthiagomg%2Fusing-flutter-with-native-resources-on-apple-silicon-processors-403g)[Share to Mastodon](https://s2f.kytta.dev/?text=https%3A%2F%2Fdev.to%2Fthiagomg%2Fusing-flutter-with-native-resources-on-apple-silicon-processors-403g)
[Share Post via...](https://dev.to/thiagomg/using-flutter-with-native-resources-on-apple-silicon-processors-403g#)[Report Abuse](https://dev.to/report-abuse)
[](https://dev.to/thiagomg)
[Thiago Massari Guedes](https://dev.to/thiagomg)
Posted on Dec 20, 2024
# Using flutter with native resources on apple silicon processors
[#flutter](https://dev.to/t/flutter)[#arm](https://dev.to/t/arm)
If you are building a flutter application for apple processors using Silicon processors (M1+) and dealing with native packages for things such as playing a sound, you maybe encountered this error:
```
Error output from CocoaPods:
↳
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file --
ffi_c (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Library/Ruby/Gems/2.6.0/gems/ffi-1.17.0-x86_64-darwin/lib/ffi.rb:5:in `rescue in <top (required)>'
URL Source: https://dev.to/thiagomg/using-flutter-with-native-resources-on-apple-silicon-processors-403g
Published Time: 2024-12-20T05:53:07Z
Markdown Content:
[Skip to content](https://dev.to/thiagomg/using-flutter-with-native-resources-on-apple-silicon-processors-403g#main-content)
[](https://dev.to/)
[Powered by Algolia](https://www.algolia.com/developers/?utm_source=devto&utm_medium=referral)
[Log in](https://dev.to/enter?signup_subforem=1)[Create account](https://dev.to/enter?signup_subforem=1&state=new-user)
## DEV Community
0 Add reaction
0 Like 0 Unicorn 0 Exploding Head 0 Raised Hands 0 Fire
0 Jump to Comments 2 Save Boost
Copy link
Copied to Clipboard
[Share to X](https://twitter.com/intent/tweet?text=%22Using%20flutter%20with%20native%20resources%20on%20apple%20silicon%20processors%22%20by%20%40thiedri%20%23DEVCommunity%20https%3A%2F%2Fdev.to%2Fthiagomg%2Fusing-flutter-with-native-resources-on-apple-silicon-processors-403g)[Share to LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fdev.to%2Fthiagomg%2Fusing-flutter-with-native-resources-on-apple-silicon-processors-403g&title=Using%20flutter%20with%20native%20resources%20on%20apple%20silicon%20processors&summary=If%20you%20are%20building%20a%20flutter%20application%20for%20apple%20processors%20using%20Silicon%20processors%20%28M1%2B%29%20and...&source=DEV%20Community)[Share to Facebook](https://www.facebook.com/sharer.php?u=https%3A%2F%2Fdev.to%2Fthiagomg%2Fusing-flutter-with-native-resources-on-apple-silicon-processors-403g)[Share to Mastodon](https://s2f.kytta.dev/?text=https%3A%2F%2Fdev.to%2Fthiagomg%2Fusing-flutter-with-native-resources-on-apple-silicon-processors-403g)
[Share Post via...](https://dev.to/thiagomg/using-flutter-with-native-resources-on-apple-silicon-processors-403g#)[Report Abuse](https://dev.to/report-abuse)
[](https://dev.to/thiagomg)
[Thiago Massari Guedes](https://dev.to/thiagomg)
Posted on Dec 20, 2024
# Using flutter with native resources on apple silicon processors
[#flutter](https://dev.to/t/flutter)[#arm](https://dev.to/t/arm)
If you are building a flutter application for apple processors using Silicon processors (M1+) and dealing with native packages for things such as playing a sound, you maybe encountered this error:
```
Error output from CocoaPods:
↳
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file --
ffi_c (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Library/Ruby/Gems/2.6.0/gems/ffi-1.17.0-x86_64-darwin/lib/ffi.rb:5:in `rescue in <top (required)>'
DeepCamp AI