New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CocoaPods compatibility with Apple DTK (Apple Silicon) #9907
Comments
Yes this was also filed as #9890 and was closed as this is an issue with the Thanks for the work and effort here. |
Cool. Would you mind leaving this one open and/or pinning while I work on a fix? I'll tie it to a PR, and that way people who come looking for answers know a fix is in the works |
Working on the FFI gem here: https://github.com/segiddins/ffi/pull/1/files |
@MatrixSenpai yes keeping this open. |
Seems the workaround suggested by @mskrischke works. Update |
❗ WORKAROUND ❗ |
Please note that these are workarounds. And while they do help the community get up and running, this isn't an actual fix, but a temporary bandaid. |
Hey @MatrixSenpai. Yes, these are totally workarounds. I hope the fix for the libffi will be there soon. 🤞 p.s |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
I haven't checked on CP recently, been writing on my own machine recently instead of the DTK. Anyone else have any updates? I'd assume a new libffi has been put out... |
Hi, I have tried the workaround of running terminal with Rosetta with an actual Mac that runs on M1, and the error is the same. Posting it here in case someone else is also having this issue. Trying to run pod install (directly) on a Flutter project. The error is as follows: Command
Report
Stack
Plugins
Podfile# 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' => :debug,
'Profile' => :release,
'Release' => :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 "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
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)
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
## dart: PermissionGroup.calendar
'PERMISSION_EVENTS=0',
## dart: PermissionGroup.reminders
'PERMISSION_REMINDERS=0',
## dart: PermissionGroup.contacts
'PERMISSION_CONTACTS=0',
## dart: PermissionGroup.camera
# 'PERMISSION_CAMERA=0',
## dart: PermissionGroup.microphone
'PERMISSION_MICROPHONE=0',
## dart: PermissionGroup.speech
'PERMISSION_SPEECH_RECOGNIZER=0',
## dart: PermissionGroup.photos
# 'PERMISSION_PHOTOS=0',
## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
# 'PERMISSION_LOCATION=0',
## dart: PermissionGroup.notification
# 'PERMISSION_NOTIFICATIONS=0',
## dart: PermissionGroup.mediaLibrary
'PERMISSION_MEDIA_LIBRARY=0',
## dart: PermissionGroup.sensors
'PERMISSION_SENSORS=0'
]
end
end
end Error
|
For anyone else struggling with this issue, I just found a way to solve it. In addition to running terminal in Rosetta (see above), I installed a gem that seems to be related to the symbol not found in the error:
After doing this, cocoapods runs as expected. |
@jacobokoenig incredible timing. |
I am having the same problem right now, even after I tried Also, I am coming from a windows workspace and am very new to Mac in general, and I'm still a beginner developer so I apologize if this seems a little informal in terms of issue reporting. I've just been thrust into the world of mac so I've been working out issues all day. |
I was able to get generic
|
@whitehat007 my guess is that's an issue with |
It's Works for me |
This works for me too! thx |
gem uninstall -aIx works for me |
This works for me too! Thanks |
Works like a charm 🪄 |
Is it still needed in current versions and native react 0.66? |
|
What's the current state. Is this still a helpful solution? ❗ WORKAROUND ❗ |
Hey, you just uninstall all of
That's all. |
@devethan I just got my M1, and have today installed cocoapods with it has in turn installed Yet my Capacitor project still fails at the cocoapods step:
Do you have any advice for me? I'd rather not install weird rosetta builds of Cocoapods and mess up my system. PS: cocoapods seem to work, but something about |
Confirm working in M1 Max |
Ruby gem installation is a pain for CocoaPods on Apple Silicon Macs. Brew works for Apple Silicon Macs (and presumably for Intel Macs as well). See: CocoaPods/CocoaPods#9907 (comment).
Works for me too, Thanks! |
I have the same issue (with ffi) on my M1 when I try to push my private pod to private repo It seems it tries to pull trunk repo (don't know why) and failed. After it any UPD. this happens, when I have dependencies in subspec (!) in my private podspec |
Currently, libffi +Ruby v2.6.0 seems to have some issues with Apple's DTK. Multiple development tools, including Homebrew (ref Homebrew/brew#7857) seem to have issues working. Some have workarounds, but the core seems to be hidden somewhere in libffi (ref libffi/libffi#571)
I will make sure to keep this issue up to date with fixes from libffi and anything else i can find.
I received my DTK yesterday, and will try to create a fork of libffi and get it to build. As mentioned in the linked ffi issue, support for arm64 already exists, and may just need to be fixed to apply to DTK/macOS devices. Assuming I can get it to work, I will also create a fork for CP with the working version of libffi and try to get it to build.
I believe this issue is also related to #9896 & #9890
edit: add related issue
The text was updated successfully, but these errors were encountered: