Xcode Server Bot with cocoapods on m1 - xcode

So I currently am building my project and running tests fine when using xcode 13.2.1 run with rosetta.
However, when I successfully add an xcode server bot and added a preintegration script as below, the following error occurs: "Could not find 'Alamofire' for 'x86_64-apple-ios-simulator', found arm64."
I have tried many different project settings, but this seems similar to the error that I get when I attempt to run my project using xcode without rosetta. I have a feeling the build system that the xcode server bot is using doesn't make use of the same rosetta settings that are used when I build from xcode.
Does anyone know of a way in which I could get the xcode server bot to build the cocoapods project while producing the necessary x86_64 version of Alamofire for the simulator?
#!/bin/sh
cd $XCS_PRIMARY_REPO_DIR
export PATH="$PATH:/opt/homebrew/bin/"
echo "Working Dir: $XCS_PRIMARY_REPO_DIR"
echo "Loading Bash Profile"
source ~/.bash_profile
echo "INSTALLING COCOAPODS"
brew uninstall cocoapods
brew reinstall cocoapods
echo "INSTALLING PODS"
~/.rvm/wrappers/ruby-3.0.0/pod install --verbose

Related

How do I build and run React Native Project on new MacBook in Xcode?

I am having issues attempting to run my React Native project on my new MacBook Pro. I transferred the project from my old MacBook and downloaded Xcode but I get the following error when trying to run the project.
"%HOME_DIRECTORY%/node_modules/react-native/scripts/generate-specs.sh: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code"
I have installed Homebrew, Watchman and ran pod install but the project is not launching in Xcode.
Can someone please assist?
Thanks.
Look at your package.json file. There are a lot of dependencies in there. They must be installed. If there is no node_modules folder, where your package.json is located, they are not installed.
Installing the dependencies can be done by running yarn install or npm install, depending what package manager you use. Make sure you are in the folder where your package.json is located. Clean your Build Folder from Xcode and run it again. It should work.

Xcode cordova project - pods

I have built and published a cordova app with android on my windows PC.
I have copied entire cordova project to a usb drive and transferred the project to a Mac to publish the iOS version.
I can navigate to the platforms/ios directory and open the xcode workspace file. When I try to build the project for the emulator I get the message:
pods-debug.xcconfig:2:could not find included file 'Pods/Target Support Files/' then the reference is to my windows files: C:\path\platforms\ios...
I have tried to deintegrate and reinstall pods through the terminal, and I can remove them and but i get a message saying that 'the workspace referencing the Pods project still remain'
and the problem with building persists.
I suspect that I need to try and rebuild the pods in Xcode but I do not know how.
To fix this, I had to reinstall cordova. using the command line I changed all permissions to allow me to update the $PATH so that cordova commands on the mac could be used.
Then I had to remove platform iOS and re-add it
The I had to go into into platform/ios and run these commands:
pod deintegrate
pod install
After that I could enter xcode by clicking on the workspace and I could perform a test build

100+ buildtime issues on fresh react-native project

When building a react-native app, the build succeeds, but Xcode logs more than 100 issues in the buildtime log. Is this normal?
All I did was:
Installed Xcode (9.2)
brew install node (9.9.0)
brew install watchman (4.9.0)
npm install -g react-native-cli (2.0.1)
cd ~/Development && react-native init Test
Open ios/Test.xcodeproj and hit the Run button (iPhone 8 simulator)
Again - the build succeeds. But all the issues in the logs concerns me and I was not able to find others with the same issue.
Those warnings are not a big issue. The various RCT projects were created with an older version of Xcode. Xcode is suggesting you update the projects to Xcode's recommended settings.
To update to the recommended settings, select one of the Update to recommended settings warnings shown in your screenshot. A sheet will open. Click the Perform Changes button to update the project settings.

How can I build Ionic3 angular4 hybrid application as ios .ipa file?

I am using a windows machine. So I have installed MAC OS sierra using VMWare in the same machine.
I have developed a Ionic3 Angular4 application with Cordova.
I have successfully created the .apk file using the command "ionic cordova build/run android" in my Windows.
So now I want to generate .ipa file. So I just moved the entire project to my MAC OS box. Then installed cordova & Ionic.
Now I am trying to build using command "ionic cordova build/run ios"
But getting the below error
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer
directory '/Library/Developer/CommandLineTools' is a command line tools instance
So executed sudo xcode-select -s /Applications/Xcode.app/Contents/Developer.
But got error /Applications/Xcode.app/Contents/Developer” does not exist
How can overcome these errors and build my ios .ipa file?
Note: Xcode not installed manually. But installed the Xcode via Terminal (a popup opened and asked to install xcode. So clicked install button. Finally It showed Xcode installed successfully)
You will have to install xcode. See the cordova platform guide for iOS. And you will also need the xcode commandline-tools (which you already installed). If you want to run you application in a simulator you will also have to install ios-sim (sudo npm install -g ios-sim#latest). And for deploying your application to a real device ios-deploy (sudo npm install -g ios-deploy#latest)

Carthage xcodebuild timed out

I tried to create a Carthage framework using v0.23.0 and Xcode 8.3.3.
When I ran the command "carthage build --no-skip-current", it led to the following error message:
"*** xcodebuild output can be found in /var/folders/h4/1slt67613tx6c_xdd4ffp9nw0000gn/T/carthage-xcodebuild.mOvSot.log
xcodebuild timed out while trying to read
"
Here is my machine's settings:
xcrun version 32.
Xcode command line tool version:
xcode-select version 2347.
xcodebuild -version:
Xcode 8.3.3
Build version 8E3004b
Carthage version:
0.23.0
Please advise.
Thank you,
Helen
I was getting the same problem when I switched to Xcode 9.
After a carthage build or update the following message came up.
xcodebuild timed out while trying to read AWSiOSSDKv2.xcodeproj
I tried to open the xcodeprok using Xcode, close Xcode and then rerun carthage build. The problem was gone.
I believe that it has to do with something that was missing and added once i opened the project in Xcode.
After carthage update I have to reopen the xcode project that timed out and rerun carthage build this time.

Resources