base64: command not found - error when Cocoapods is installing BoringSSL-GRPC - ios

I am building a Unity app for iOS. I am using iOS Project Builder, which allows building iOS apps on Windows. It uses Cocoapods to install Frameworks.
I have this error when Cocoapods is installing BoringSSL-GRPC:
/usr/local/bin/bash: line 68: base64: command not found
gunzip: (stdin): unexpected end of file
Full log: https://pastebin.com/gZm2RUy1
OS: Windows 10 64 bit
Unity Version: 2020.3.12f1
iOS Builder: 3.35.4
iOS SDK: 14.5
Firebase: 9.0.0
Any help would be highly appreciated.
UPDATE 1
Not sure if bash is working. I have enabled it, but when I write it in cmd, it is displayed:
C:\Users\IRAKLI>bash
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
UPDATE 2
Installed Ubuntu from Windows Store. Bash is working now from CMD, but I still have the same error with cocoapods.
Might it be the problem?
irakliunix#DESKTOP-U1MFKFF:/mnt/c/Users/IRAKLI$ /usr/local/bin/bash
-bash: /usr/local/bin/bash: No such file or directory

Related

Setup macOS13 Ventura with Apple M2 chip - Unable to install header files for compiling C extensions

While setting up a new laptop, macOS 13 Ventura, Apple M2 chip, for RoR.
The directions recommend running the following command:
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
The command failed with the error:
"installer: Error - the package path specified was invalid"
I have also tried to install the following gems:
rsvg2,
glib2,
gobject-introspection
which failed to build the native extensions.
Could the two issues be related?

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
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.

Unable to resolve module react/lib/ReactUpdates

I'm cloning a proyect:
The steps are:
npm i
react-native link
When i run it react-native run-ios i have a problem with RCTWebSocket library. This problem is easy to resolve if you search a little just need remove 2 compiler flags, in Custom Compiler Flags.
Later just i run again react-native run-ios and works fine, but when the app is open, show the next error:
Searching i found that is related to upgrade, source here
but i'm using that command and not works.
When this command is executed, it starts showing me some overrides to some files and at the end of this process, the problem persists.
My react info:
react-native-cli: 1.0.0
react-native: 0.32.1
I'm running in Xcode 8 and ios 10.0
PDTA: When I start a new project works perfect
UPDATES:
When clone on another mac works, I am ensuring to have the same versions of both xcode and node.
Could it be some mac configuration problem?
The only difference between the 2 macs is the cli version:
`react-native-cli: 1.1.0` --> my mac
`react-native-cli: 1.2.0` --> the other mac
Will this be enough to cause all this problem?
With React 0.32~0.37: The problem is most likely that you are using React 15.4.x instead of 15.3.x. One of the changes between 15.3 and 15.4 was that many of the modules under react/lib were moved to react-dom/lib, which is why the packager can't find react/lib/ReactUpdates.
Ensure that your package.json file locks React to 15.3.x:
"dependencies": {
"react": "~15.3.2"
}
Then delete your node_modules folder and run yarn or npm install again. Verify that you installed React 15.3.x:
$ npm ls react
app#1.0.0 /code/app
└── react#15.3.2
Last, restart the React Native server and load your bundle again.
This has been fixed!
Update your dependencies and use react-native ^0.38.0 or newer.
Run react-native upgrade after all react-native version upgrades.

Nothing at all happens when running cordova prepare ios

I am in a ionic app at its root folder. I have a config.xml file and am having trouble getting it to build. I had no issues a few weeks ago, but I've screwed something up on my system I think. I have reinstalled both cordova and ionic and re-pulled the repo.
However, when I run ionic prepare ios --verbose literally nothing happens.
This is the only output:
ConfigXml.setConfigXml /Users/ben/code/project/app resetContent=true, errorWhenNotFound=false
ANY guidance as to what I should try next is very much appreciated.
cordova version is 5.2.0
npm version is 3.3.12
node version is v5.4.1
ionic version is 1.7.14
cordova platform ls outputs:
Installed platforms: ios 3.9.1
Available platforms: amazon-fireos, android, blackberry10, browser, firefoxos, webos
As mentioned in this thread on Github, there is an issue in Node v5 that makes ionic prepare fail.
In order to solve it you can try a couple of things.
One would be to update your cordova installation to version 5.4 or later, since it includes a fix for the Node v5 problem. You can do that using following code:
npm install -g cordova
The other suggested solution in the link is to reset the state of your ionic installation. Be aware that issuing this command will do following (as specified in Ionic-cli github page):
The ionic state reset method will first remove your platforms and
plugins folders. Then it will look at your package.json file to
re-install the platforms and plugins as specified there.
This command can be helpful for you to reinstall your plugins and
platforms to get a fresh start.
If you are willing to try, you can do it with following command:
ionic state reset
Personally I would try first to upgrade Cordova.
Try:
sudo ionic prepare ios --verbose
Whenever you install new plugins or platforms you must also change the read/write permissions on root folder for your project.

Cordova throws syntax error when trying to add platform

I'm trying to install Cordova and Ionic Framework on a Ubuntu server. I already used Node.js on it, so simply ran:
sudo npm install -g cordova
Then I cloned a sample project from GitHub
sudo git clone https://github.com/driftyco/ionic-weather.git
I entered the directory and tried to add the iOS platform library in order to build it:
cd ionic-weather
sudo cordova platform add ios
However it throws the following error:
Creating ios project...
/home/benedict/.cordova/lib/ios/cordova/3.4.0/bin/create: 33: /home/benedict/.cordova/lib/ios/cordova/3.4.0/bin/create: Syntax error: "(" unexpected
Error: /home/benedict/.cordova/lib/ios/cordova/3.4.0/bin/create: Command failed with exit code 2
at ChildProcess.whenDone (/usr/lib/node_modules/cordova/src/superspawn.js:112:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
I've tried reinstalling Cordova in case something got corrupted, but no luck. I can't seem to find anyone else with this issue either so I'm kinda stuck. Any ideas?
This turned out to be a combination of several problems:
Ant is a required dependency, although it's not documented as a dependency as far as I can tell from any of the install guides the ionic guide or cordova guide point to. In fact I found this out by digging around SO and a few other dark corners of the internet
JDK must also be installed. (not just JRE)
2 folders have to be added to the path (for Android anyways).
Ant
This can be installed via sudo apt-get install ant.
jdk
sudo update-alternatives --config java
first, you can find out if you have jdk by running `sudo update-alternatives --get-selections | grep ^java
if you already have the jdk, you can update your jre to the jdk version using sudo update-alternatives --config java
if not, then install jdk (not just the jre), using sudo apt-get install openjdk-7-jdk
Path setting in ~/.bashrc
$ cd ~
$ sudo vi .bashrc
at the bottom, before the PATH= add the path to the bundle folders for both platform-tools folder and the tools folder under the sdk folder. Several of the guides only mention the platform-tools folder.
The guide specifically mentions ios can't be installed on Windows, but strangely leaves out Linux. This may be an oversight, but I can't be sure. There was some indication in the ionic guides that ios emulation could be done on linux, even though actual development could only be done on OSx.
the ios platform requires xcode 4.5 with cordova, which needs OSx 10.7 you basically can't add the ios platform tools on Windows or Linux. Unfortunately cordova and ionic both seem to forget Linux exists, and therefore the docs imply this will run on Linux when they note inoperability on Windows but say nothing about Linux.
Your problem is that your trying to build the app on a machine that doesnt have Mac OS installed. In order to add IOS platform you need to run this command on a mac.
Check the Prerequisites here:
http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html

Resources