Search code examples
ioswindowsreact-nativecocoapodsmapbox

Cocoapods cannot install Trunk


I'm trying to develop a React Native mobile app for iOS on Windows 10. Using the react native cli, I've generated a RN iOS project with the standard file structure, including a "Podfile" file with the default RN pods.

However, when I try to use "pod install" in order to add other pods of my own, I get the following error code:

[!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/CocoaPods-version.yml Response: SSL peer certificate or SSH remote key was not OK

I've been googling this error but I've run into a dead end. I've tried using pod update, I've changed my cURL version, I've gone over the setup instructions for Ruby, curl, and others, and I'm at a loss. What can I do?

Note: I haven't run the app yet, and am trying to install the react-native-mapbox-gl pod first, but I can't even properly install Trunk.

cURL Version:7.70.0

CocoaPods Version: 1.9.3


Solution

  • You won't be able to develop for iOS on Windows – because the iOS SDK and build tools are only available on macOS. No way to legally do it without an access to an Apple computer.

    You can try Expo though – it doesn't require macOS for development, but keep in mind that you will be limited to the APIs Expo provides.

    As for the actual error – it seems that the CocoaPods rubygem has not been tested on Windows at all, and is likely invoking curl in a way that doesn't account for Windows's SSL certificate management system.