Open j796160836 opened 5 years ago
Have the sane issue with Xcode 11.
CocoaPods : 1.8.0
Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
RubyGems : 3.0.4
Host : Mac OS X 10.14.5 (18F132)
Xcode : 11.0 (11A420a)
have the same issue with XCode 10.3 This PR fixes the issue for me
if someone interested how to try it just add
gem "cocoapods-binary", :git => 'https://github.com/AliSoftware/cocoapods-binary.git', :branch => 'master'
to the Gemfile and then run bundle install
Have the sane issue with Xcode 11.
CocoaPods : 1.8.0 Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18] RubyGems : 3.0.4 Host : Mac OS X 10.14.5 (18F132) Xcode : 11.0 (11A420a)
Same here. Can't build under Xcode 11 (and need to build with the Swift 5.1 compiler) and can't see the actual error. The PR mentioned by @zh-se doesn't work under Xcode 11 either.
I know this makes no sense. But right after pods gets installed, there is Pods.xcodeproj in Pods/_Prebuild. Leaving that project opened bypasses this error.
I encounter another silent error. This time, I have no clue to fix that. π€·ββοΈ
Please verbose the error. π
Any upadate on this? @leavez
Have the same issue on Xcode11. but I tried creating a new project and using same Podfile, it'll be generated a framework correctly. π€
So, this issue was only happening on my mac. We tested in other 5+ macs, and they all worked fine. First of all I did this: https://github.com/leavez/cocoapods-binary/issues/97#issuecomment-537068665
Using that branch makes it so that the issue is not silent anymore, I started getting logs out of it. The issue was that the precompiler kept trying to build the frameworks using an invalid destination. I deleted the invalid destination from my mac until it automatically selected a valid one, and it then it worked.
I don't know why it kept choosing an invalid one, though.
My error specifically looked like this:
Prebuilding AFNetworking...
Build settings from command line:
ARCHS = x86_64
ONLY_ACTIVE_ARCH = NO
SDKROOT = iphonesimulator13.1
2019-11-14 11:48:51.517 xcodebuild[30445:5940954] DTDeviceKit: deviceType from 20331b68eb33596d00c627b3ac40510ada209d4a was NULL
2019-11-14 11:48:52.005 xcodebuild[30445:5940901] [MT] DTDeviceKit: deviceType from 20331b68eb33596d00c627b3ac40510ada209d4a was NULL
2019-11-14 11:48:52.018 xcodebuild[30445:5940901] [MT] DTDeviceKit: deviceType from 20331b68eb33596d00c627b3ac40510ada209d4a was NULL
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ id:EA278AF1-9DE6-4395-A6DB-1F60970FA4A1 }
Available destinations for the "AFNetworking" scheme:
{ platform:macOS, arch:x86_64, variant:Mac Catalyst, id:20C84695-122C-55DB-A00B-ABA704D08806 }
{ platform:iOS Simulator, id:4BDA10B6-220F-4917-B03B-6F5CC75A9CC0, OS:13.1, name:iPad Air (3rd generation) }
{ platform:iOS Simulator, id:348672D6-BED2-4EC6-97C4-BB768A38580E, OS:13.1, name:iPad Pro (9.7-inch) }
{ platform:iOS Simulator, id:13D8572C-CAA8-4D1B-9277-A781938E61E2, OS:13.1, name:iPad Pro (11-inch) }
{ platform:iOS Simulator, id:48491CD1-E116-49DF-A075-E707F8ED6EA9, OS:13.1, name:iPad Pro (12.9-inch) (3rd generation) }
{ platform:iOS Simulator, id:C404713E-8D49-4F34-8E3F-E467F8B517A7, OS:10.3.1, name:iPhone 7 }
{ platform:iOS Simulator, id:C09929CF-0F1F-4724-B26F-04471E0C2523, OS:10.3.1, name:iPhone 7 Plus }
{ platform:iOS Simulator, id:6C0E75E6-6CB7-4AD5-B0FE-7CBCE4FEE144, OS:11.1, name:iPhone 8 }
{ platform:iOS Simulator, id:44949F35-2C8A-4F98-B0B5-6E4F4AD184EF, OS:13.1, name:iPhone 8 }
{ platform:iOS Simulator, id:35FEF23F-EDD9-4208-820F-9A3655B1A0E7, OS:11.1, name:iPhone 8 Plus }
{ platform:iOS Simulator, id:F50B879F-5ED5-4526-881A-4643EDB9C247, OS:12.2, name:iPhone 8 Plus }
{ platform:iOS Simulator, id:5FDE7271-591A-43D0-A2E2-640628FA6B0B, OS:13.1, name:iPhone 8 Plus }
{ platform:iOS Simulator, id:E1E211FE-708E-440E-950B-12B0F2B28A11, OS:13.1, name:iPhone 11 }
{ platform:iOS Simulator, id:BF60AB15-D5C9-495F-86B8-3C64C268F1C1, OS:13.1, name:iPhone 11 Pro }
{ platform:iOS Simulator, id:4033A8DF-5FCB-44BC-8E99-7CCE03AD3487, OS:13.1, name:iPhone 11 Pro Max }
{ platform:iOS Simulator, id:E12DD715-CF3A-4609-B909-0B008727B98A, OS:10.3.1, name:iPhone SE }
{ platform:iOS Simulator, id:B4A6FF4D-4BB4-4456-8426-A93DD5253D23, OS:11.1, name:iPhone SE }
{ platform:iOS Simulator, id:4AAE5E9F-4809-405A-AD9C-F2A57D107CAF, OS:11.1, name:iPhone X }
Ineligible destinations for the "AFNetworking" scheme:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }
So as you can see, it says
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
I just opened Xcode device manager and deleted that given simulator.
Hope this helps someone.
It looks like bug in plugin. Guys, try to remove all old simulator runtimes from /Library/Developer/CoreSimulator/Profiles/Runtimes
, e.g. iOS 9.3.simruntime
.
It helps for me, because I use deployment target 10.0 in my project.
I can also confirm this PR fixes the issue: https://github.com/AliSoftware/cocoapods-binary
how to install:
gem uninstall cocoapods-binary # Uninstall old version first
git clone https://github.com/AliSoftware/cocoapods-binary
cd cocoapods-binary
bundle install
gem build cocoapods-binary.gemspec
gem install cocoapods-binary-0.4.4.gem
Hi @mikumi was the PR merged to https://github.com/leavez/cocoapods-binary/issues/101 ? please confirm.
@atelaich I don't understand your question, #101 is an issue, not a PR, so the fix pointed by @mikumi message couldn't have been merged to #101 π€
The fix described is open in this PR https://github.com/leavez/cocoapods-binary/pull/73 and it's still open.
I can attest that those changes fixed the issue for me in the project I work on. We've been using it in production for nearly a year now π
You can use it alongside bundle by adding this to your Gemfile
:
gem 'cocoapods-binary', github: 'AliSoftware/cocoapods-binary', branch: 'master'
@rogerluan thanks for clarification. I wanted to ask if its merged to master. Never mind i got the answer.
Here is reproduce step:
pod install
with a project.Example project: https://drive.google.com/open?id=1g7Wl0rBAP9n2SupH_ow1mNkBXkjwMf_A
As you see, it will pre-build first module then stopped silently. It should be print some error message.
Why I found this bug?
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Run
sudo xcode-select --switch path/to/Xcode.app
and solve the problem.