I’m trying to run a Flutter app on an iPhone 12 Mini (iOS 17.6.1) using Xcode 14.2 on my Intel MacBook Air running macOS Monterey (12.7.6). However, I’m encountering several issues with CocoaPods and running the app on my iOS device.
Problem:
1.Xcode Build Error:
Could not build the precompiled application for the device. Unable to find a destination matching the provided destination specifier: { id:00008101-001E545A2209001E }
- CocoaPods and ffi LoadError:
LoadError - cannot load such file -- ffi_c
Steps I’ve Taken to Resolve:
- Reinstalled ffi and CocoaPods:
sudo gem uninstall ffi sudo gem install ffi -- --enable-libffi-alloc sudo gem uninstall cocoapods sudo gem install cocoapods
- Installed Xcode Command Line Tools:
xcode-select --install
- Reinstalled Ruby Using rbenv: Installed Ruby 2.7.7 to ensure compatibility:
brew install rbenv rbenv install 2.7.7 rbenv global 2.7.7
4, Ran Pod Install with Repo Update:
cd ios pod install --repo-update
- Manually Tried to Add iOS 17 Device Support to Xcode 14.2:
Attempted to download iOS 17 support files and place them in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
.
Unable to find support files for iOS 17 (above 16.4).
Enabled Core Device: Ran this command based on a suggestion:
defaults write com.apple.dt.Xcode DVTEnableCoreDevice enabled
What additional steps can I take to resolve the ffi issue and make Xcode 14.2 recognize my iPhone 12 Mini running iOS 17.6.1? Is there a workaround for running iOS 17 devices with Xcode 14.2 on macOS Monterey?
Any guidance on getting this setup to work would be greatly appreciated!
1
Update to ios 18 Developer Version
In my case this fixed the problem
UPDATE:
Below you can see the requirements of different versions
Here the link to Apple’s Xcode Support Page: Apple Xcode Developer Portal
1