Xcode Cloud build from Flutter project unable to find included file 'Generated.xcconfig' in search paths - ios

I have no problem building ios project the traditional way, but when trying to build with Xcode Cloud it seems that there is some trouble in finding specific paths. I'm importing the build from the repository, is there a possibility that pod files don't get installed, or does Flutter projects need some additional tweaking that I am missing.

You should add post-clone script.
See https://docs.flutter.dev/deployment/cd#xcode-cloud.

I solved my problem changing the installation of Pods adding this line to ci_post_clone.sh:
I changed:
cd ios && pod install
To:
$CI_WORKSPACE/repository_name/ios && pod install
You have to know that path needs to be exactly.

Related

Xcode Cloud No such Module Cocoapods library

I have a project using a Cocoapods as dependency manager and I am trying to create an Xcode Cloud workflow for it, everything look simple to configure and I added the ci_post_clone.sh to run the pod install command before start building.
Based on the logs all the dependencies are downloaded but whenever it starts building I have the No such Module X error, I am not sure what i did wrong but it looks like xcode Cloud misses the step of Building targets in dependency order and it starts building the main project before building the dependencies
Did anyone face this problem and how did you fix it
Thank you for your help
I found a temporary solution by adding the pod folder to my repository, this is not what most people are willing to do but for now it is working
do you have a screenshot for how you set this up? Because the script file ci_post_clone.sh needs to exist in a repository named ci_scripts that is at the same level as your workspace / xcode project. You also need to be sure to mark that file as executable
then you can brew install cocoapods and run pod install on that script. cheers! just got this working this morning by following notes found here: https://developer.apple.com/documentation/xcode/making-dependencies-available-to-xcode-cloud

Can't build on Xcode using 'capacitor js' commands

I'm practicing capacitor js, and was able successfully to package the (html, css & js) files and build them on 'android studio' according to the commands on 'https://capacitorjs.com/docs/android'.
Yet when i powered up macOS version 10.14 on VMware and tried to do the same steps 'https://capacitorjs.com/docs/ios' to build on Xcode, the following warnings and errors occured...
Bugs
I traced the path written in the error and couldn't find neither file nor folder named Pods....
The App folder
I'm using XCode version 11.3 and did install 'Node.js & Xcode command line tools' as mentioned as "capacitor js requirements" on the documentation, also installed CocoaPods.
It's my first time using macOS so I might have missed some additional steps that needed to be done.
Would be very thankful if anyone could guide me through that bug.
Looks like you've openend the .xcodeproj file. Don't do that, use the .xcworkspace exclusively. Also, if you don't have a Pods folder, you probably forgot to run pod install
Thanks to Gereon the step that was missing is to use the command pod install on the 'App' folder that has the 'Podfile.txt', it will extract some extra files including the required Pods folder.
App Folder After Using pod install
If after building you faced the following error...
failed to initiate service connection to simulator
Just clean the build folder and run again.
To clean the build folder you can use the shortcut Command+Option+Shift+K or Menu Bar → Product → Hold Option Key → Clean build Folder.

Unable to load contents of file list: '/Target Support Files/Pods-Salotime/Pods-Salotime-frameworks-Debug-input-files.xcfilelist'

my Xcode Version:12.2
my pod version: 1.10.0
my cordova version: 10.0.0
node.js version:12.16.3
i using cordova and i just try to install firebesex plugin:https://www.npmjs.com/package/cordova-plugin-firebasex
This plugin depends on various components such as the Firebase SDK which are pulled in at build-time by Cocoapods on iOS.
my podfile:
when i try to build the project , i got the following error: "'/Target Support Files/Pods-Salotime/Pods-Salotime-frameworks-Debug-output-files.xcfilelist'"
Although the file is in right path , it's doesn't success to load contents of file
the content of "Pods-Salotime-frameworks-Debug-input-files.xcfilelist":
${PODS_ROOT}/Target Support Files/Pods-Salotime/Pods-Salotime-frameworks.sh
${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.framework
${BUILT_PRODUCTS_DIR}/FirebaseCoreDiagnostics/FirebaseCoreDiagnostics.framework
${BUILT_PRODUCTS_DIR}/FirebaseInstallations/FirebaseInstallations.framework
${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework
${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework
${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework
${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework
the content of Pods-Salotime-frameworks-Debug-output-files.xcfilelist
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreDiagnostics.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstallations.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleDataTransport.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework
i already tried to use
1-pod deintegrate
2-pod update
but still it's didn't work .
This is what worked for me:
delete the platforms and plugins folder
remove the cached data rm -rf ~/Library/Caches/Cocoapods
Remove Derived Data rm -rf ~/Library/Developer/Xcode/DerivedData
run pod deintegrate
run pod setup
run pod install
re run whatever build command you have to recreate your platforms and plugins folder
I think this error comes about because of an issue with pods not using semantic versioning. You can read more about this at https://gist.github.com/mbinna/4202236. Clearing derivedData prevent xcode from re-reading the old code
I resolved this issue with....
Go to your Targets in xcode
Go to Build Phases
Next go to Run Script and check it has any files in input file lists or output file lists
Now, Remove files (input-files.xcfilelist / output-files.xcfilelist) using symbol - from Input file Lists and Output file Lists respectively
One possibility is adding path in Input File List by mistake.
Make sure to add path in Input Files, not in Input File List

Swift and Xcode: How to Build and Run a GitHub repository of iOS Application?

I'm interested on Running this GitHub repository of an iOS Application: https://github.com/septadev/SEPTA-iOS I opened the iSEPTA.xcodeproj file on XCode from the iSEPTA folder, but I'm getting these Buildtime Errors. For example: No such module 'ReSwift', and this is the window I get prompted when I select any of the yellow alerts, I'm not sure if I should perform these changes, yet.
Could it be some incomparability with my XCode and Swift versions?
Please, help!!
This project uses Carthage as a dependency management system for using external dependencies.
You should install Carthage to your computer and then run carthage update from the terminal in the root directory of the project. This will instal the dependencies and will allow you to run the project.
Take a look at Cartfile: it indicates this repo is using Carthage package manager. Follow their instructions to install dependent libraries
This repository requires Carthage ( https://github.com/Carthage/Carthage ) - this is a dependency manager. You can install it using Homebrew (https://brew.sh/)
brew install carthage
then you have to run carthageBuild.sh script (which runs carthage update):
./carthageBuild.sh
and then you have to open: Septa.xcworkspace file
This would be the correct solution if the project used Cocoapods. Since it uses Carthage, look to others answers unless you are referencing this answer to a similar issue.
You need to use Cocoapods to integrate the pods attached to the project. Often times projects will not come with them precompiled. Either you opened the blue project file with the *.xcodeproj extension instead of the white project file with the *.xcworkspace extension.... or you don't have the pods installed at all. In which case read below.
Instructions as follows:
cd to project directory
Install Cocoapods
sudo gem install cocoapods
Ensure the you have the given pods in your repo collection for install
pod repo update
Install the pods
pod install
Validate Project Settings
This is necessary until cocoapods v1.6 release (beta is out).
Open the white project file with the *.xcworkspace extension
After those steps are complete, the project should run normally.

iOS - not sure how to properly update cocoapods configuration for iOS 7

I had cocoapods in my project and it worked fine. But now that I upgraded my xCode and everything else, I get a linker error about the pods when I try to archive the project.
I was trying to follow the solutions in this answer but the steps they mention are not quite what I see on my screen.
What are the steps to configure my cocoapods correctly?
Here is a screenshot of how things are appearing for me with the libraries in red on the left side, and some configurations on the main area of the screen.
Make a backup of your .pod config file that has all your third party project references in it. Delete pods folder and delete workspace that Cocopods creates by default.
This is the file to backup
$ sudo gem install cocoapods
Navigate to where project lives:
cd /Users/yourUserFolder/LocationOfProject/
Then Run:
$ pod install
Open Workspace
$ open App.xcworkspace
**Make sure you open the workspace file. Not the .project file.
Image of what my .pod file looks like, just for your reference to make sure you have the correct format.

Resources