How do find the .app file in Xcode 9.3.1 - automation

Ok,
I've spent a few hours trying to find an answer to this question and had no luck what so ever.
I am creating an appium automated test using xcode Version 9.3.1 I need to locate the .app file so I can add it to my desired capabilities and I cant find it in any folder.
Breaking it this down in the most basic fashion, how do I locate the .app file so I can add it to my ios appium automated testing?
Out of curiousity would I need to use something like homebrew to locate it?
Or can I find from a specific menu in xcode?

Xcode -> Preferences -> Locations
Press the button to open folder in Finder
Here you need to find project build folder, open it and search sub folders with Debug-iphonesimulator name, you should fine build file there.
The full path might look like:
/Users/<user>/Library/Developer/Xcode/DerivedData/<Project name>/Build/Products/Debug-iphonesimulator

By default Xcode stores the derived data for all projects in a single shared folder under your home directory at the following location:
~/Library/Developer/Xcode/DerivedData
From Xcode 6, you can access or change derived data location from Preferences -> Locations Tab
but you can setup in xcode:
File-> Project Setting
locate "Derived data:"
here is how to setup https://www.youtube.com/watch?v=MVVRsR9XenQ

Seriously thank you so much for all your help. I really appreciated it so much. You've all been a bunch of legends. I was able to solve this problem and and I want help save someone 3 days of trouble.
Finding the .**app file is a HIDDEN FILE **
Basically there are number of ways to find the .app file in this version of Xcode.
You can find the .app by using your search bar on the mac. Also, you can find the .app would be in this directory
users/(YourMacAccount)/Library/Developer/Xcode/DerivedData/UICatalog-.../Build/Products/Debug-iphonesimulator/(appname).app
to reveal the hidden files type cmd>shift>.
If you still can't find it (Which is what happened to me). Then:
Click the show in finder icon (the one shaped like a file) in xcode
This is where you can find it in xcode 9.3.1

Related

How to install PDCurses with MinGW on Windows?

I have looked all over the internet for installation instructions but could not find one that actually worked. I have downloaded the MinGW-Get application as stated in many websites, but have no idea how to use it. I did find a website with the following instructions:
HOW TO INSTALL:
Install an ide on your windows machine, I’ll use the simple Dev-Cpp.
Download this zip containing the files you’ll need.
Create a folder called pdcurses and another one called include, inside
of it.
Extract panel.h and curses.h in the include fold.
Extract the .dll file in the pdcurses one.
Now open your ide and set the 32-bit version compiler as the default
one.
Create a new project, set it up.
On the lefty Treeview, right click on the project icon -> project
options
Go to -> Parameters tab-> Linker -> insert in its box the path to the
.dll file you extracted before
Go to -> Files/folders tab
Here you’ll see three inner tabs named: Libraries/Includes/resources
folders; inside each of them you have to insert the path to the
include folder you created before.
Source: https://hastalafiesta.altervista.org/setup-pdcurses-windows-devcpp/
However, I could not find the .dll or a library file in the PDCurses folder I extracted from the .zip file I downloaded from https://sourceforge.net/projects/pdcurses/files/pdcurses/3.4/pdc34dllw.zip/download (as stated in the fifth step). I just got started with C++ and libraries and would appreciate it if anyone could provide me some guidance or any useful links.

Error cleaning build folder - You do not have required file permissions

I'm using xcode 6. Its fine to clean but it fails when I choose clean build folders.
Seems like you are restricted to create a build folder in your system root.
In XCode Menu --> Preferences --> Locations Tab --> Locations sub-tab, Change Derived Data to Relative and give any name in text box.
Have a look here which is also a permission problem in Xcode.
It could be due to Xcode bug (at least for me in Xcode 6.3.1). Toggling the location for derived data folder will fix it.
Go to Xcode > Preferences > Locations and change Derived Data to Relative, then back to Default.
Clean build folder again.
I just clean that folder in Finder, then all fine.
In Xcode 14 I clicked "Clean" command which had popped up in the 3rd row from the top and that fixed it.

How can one see an iOS bundle's file structure?

I'm trying to create a subfolder structure in my app following this advice:
Subdirectories within an iOS application
But I can't see (using the Organizer) a way to test whether the subfolder structure is actually achieved or not...is there a way to check, other than jailbreaking the phone and getting in through ssh?
You can open the bundle that is installed to the simulator by navigating to:
<User Name>/Library/Application Support/iOS Simulator/<Alpha-Numeric String>/<App Name>.app'
Once you navigate to the above location (it may be .ipa, can't remember exactly) you can right click and choose Show Package Contents which will show you the contents app bundle.
If the question relates to *.ipa or *.app boundles, then you can rename them to *.zip and go from there.
At the moment, with Xcode 10 and macOS 10.14.X the path for simulators would be:
/Users/<user>/Library/Developer/CoreSimulator/Devices/<XXX>/data/Containers/Bundle/Application/<YYY>
Also, if you want to check for the previous step and check the files that would be inside the *.app(bundle) in Derived Data (to check for devices) the path would be:
~/Library/Developer/Xcode/DerivedData/

Moving .lproj file inside Resources

I'm trying to begin localization on a project, and I've already got an English version of Localizable.strings going. I'm now trying to add French to that file, which is creating an fr.lproj folder, as I'd expect. However, it's putting it in my project root, and I'd like it inside my project's Resources directory.
Xcode seems to have no interest in letting me move the file, and if I move it in Finder, it goes red in Xcode as expected, but doesn't let me click to locate the file.
I've tried moving it in Finder, then editing project.pbxproj in a text editor to add Resources/ in front of the only line in there that mentions fr.lproj/Localizable.strings, and that has worked, but after doing that, the project's targets also turned red in Xcode, and building the app doesn't change that fact. Very odd.. any idea what could be going on, or how to get this going?
This can be a real pain. I even had XCode crash on me when trying to correct unwanted file locations. I found that the best way is to create the localized file (be it .strings or .xib) as a copy of the source language version outside of XCode, then drag and drop it into XCode. If you do this then XCode will display it correctly and your targets' Build Phases > Copy Bundle Resources settings will include it with its correct location. I don't know why your targets are displayed in red, perhaps you could look under Copy Bundle Resources in case anything is wrong there, or also select your project and click Validate Settings in case you haven't already done so.
Also, if you have been testing in the simulator beware of how XCode does not clean up the files in your app bundle--you may want to delete the app and run it again to make sure it's working with your new location.

Xcode will not open my project

I where working with a project and I closed because my computer was geting slow. When I tried to open my solution again xcode quitted. So everytime I try to open my project I get this error:
I am not able to open my solution. IS THERE A WAY I CAN RECOVER MY PROJECT!?
Nothing mentioned above/below worked for me. Here's what I did instead:
Right click on the .xcodeproj file and select Show Package Contents. Then delete the project.xcworkspace file. Open the project in Xcode and voilà.
There are a couple of things you can try, first make sure Xcode is not running ,trash the ~/Library/Cache/ folder contents, and trash the contents of the ~/Library/Developer/Xcode/DerivedData/ folder, if you what to can just find the stuff for your project in ~/Library/Developer/Xcode/DerivedData/ and trash just that. Then restart your computer.
If that doesn't work, rename your faulty projects folder to so method like ' old', create a new project of the same name, and then move all of the source files from ' old' to you new project and add them. Its a bit painful I known but I have had to do this once to get a project working again.
Double click the actual file! NOT the recent item!
Turns out that double-clicking on the actual file instead of selecting it from the Welcome to Xcode window will help open the project as expected!
Also, after the first time open it with double-clicking the file, the window will be fixed by itself 🤷🏻‍♂️
In my case, the project was moved to my iCloud Drive without me noticing it.
If it happens to you too, just go to your Finder, locate the project and check if there is a cloud next to it. Just right click it and "Download now". Try again once the download is finished.
I was having this issue with Xcode 12. Opening Xcode, and selecting my project from 'Recent projects' list was causing Xcode to crash
My solution: I navigated to the folder and opened ProjectName.xcworkspace file, then it worked
If you're working with git, right click the project-name.xcodeproj > Show Package Contents, open the file project.pbxproj and check for conflict and resolve it.
Quit Xcode, then make a copy of the xcworkspace file (just in case). In finder, right-click the xcworkspace file and choose Show File Contents.
In that directory, open the xcuserdata directory and delete any contents. Start Xcode again and open the project.
In my case there was something wrong with the saved project state, so doing this resets the state and it opened normally.
I had the same error and none of the above helped me.
Solution that helped me: Create a new project, then without closing it, go to
File -> Open
and select your .xcworkspace file.