Where is the (.app) project directory in iOS - ios

I need to test my app with AppScanner for private API.
AppScanner said like following.
You can use App Scanner one of three ways: drop a compiled simulator .app folder into the GUI to scan the app, type method signatures into the search text field, or integrate the command line version into your build phase as part of a script to automatically check code right after it is compiled by Xcode.
I don't know where to find .app folder that compiled simulator.
Where is it?

The .app is in the Products Folder in your Xcode project.
As its Red now So you need to Build on a iOS device then it will be Black then Right Click and choose Show in Finder(it will open a finder window with .app location).

Here is path to iPhone Simulator path folder:
~/Library/Application Support/iPhone Simulator/[OS
version]/Applications/[appGUID]/
There you can find .app file.

Related

How do I install the XCUITest runner app and ipa on a real device and get the results?

How do I install the XCUITest runner app and ipa on a real device and get the results?
I have a runner.app that was generated by building it for testing, and a deployed/signed .ipa.
Now what I would like to happen is to have it installed on a real device, execute it, and get the device log.
You can use bundleId :
let app = XCUIApplication(bundleIdentifier: "yourapp.bundle.id")
You can try to use:
xcodebuild test-without-building -xctestrun somepath/YourAppName_iphoneos14.4-arm64.xctestrun -destination 'platform=iOS, id=some_id'
I moved YourAppName_iphoneos14.4-arm64.xctestrun, YourAppName.app,
YourAppNameUITests-Runner.app to some local folder from a regular Library/Developer/etc.. build folder. Then I opened *.xctestrun file, which is an xml file, and modified paths to my local folder manually.
I couldn't find any official information about it but it seems like the *.xctestrun file is used by xcodebuild in order to find all relevant artefacts i.e both app folders. I would guess that's how they manage to run tests just with app's or ipa's without source code on various clouds...
PS. The question was about IPA, but it's convertible to the app, right? At least there is a thread - How to convert .ipa to .app file?
Edited with answer...
It is possible to achieve this. In order to build an ipa of the UI Testing app bundle you can follow these steps:
Open your project containing in Xcode.
Select the device you'd like to build the ipa for next to the scheme. This can be an actual device or a simulator.
Product > Build For > Testing
Find [your_ui_test_bundle_name].app file in Derived Data.
Derived data by default is located at ~/Library/Developer/Xcode/DerivedData/
To locate this file, dive into DerivedData for your project, navigating to Build > Products and then the respective directory based on what you chose in step 2. If you chose a simulator, look in -iphonesimulator/ or if you chose a device look in -iphoneos/. The UI test bundle .app file should be in that directory.
Create a directory named Payload case sensitive and it must be named this.
Move the .app file into the Payload directory.
Compress the Payload directory.
Rename the compressed directory to have a file extension of .ipa. You'll be prompted and select Keep .ipa.
Now you have you UI test bundle application saved as an ipa. You can also upload this ipa to a device manually in Xcode via the following process (bonus info, yay!)
Window > Devices and Simulators
Select your connected device.
Tap the + button under Installed Apps.
Navigate to and select your UI test .ipa file that you compressed previously.
It should install onto the device.
Credit where it is due: https://medium.com/ios-os-x-development/how-to-run-your-iphone-test-on-aws-device-farm-98f18086811e

With Xcode how can I export and share an app with a team member in the simulator?

So I have a teammate/client I need to share an app I'm developing.
They have android and a Mac Desktop so it would be shared through the Simulator only.
I've tried the archive app and there seems to be no way to get this work with the .ipa file which is generated.
Does anyone know of a way to achieve this?
Share the source code, then run the app in Xcode. Voila, it is now in the Simulator. They have to install Xcode anyway to get the Simulator so there really isn't any extra work involved other than building the app.
The .ipa is built for iOS devices and cannot run in the Simulator. I suppose you could transfer the binary to another simulator and get it to work, but I have not heard of anyone doing it that way and, frankly, it seems like potentially more work than "clone this git repo, load the project/workspace in Xcode, click the triangle button and wait a bit."
All you can do is you can just generate the .app file. But how you can run it on a simulator (applies only if Xcode 8.2 or above isn't installed), I really don't have the idea. If you want to have your .app generated, follow this:
Connect any iPhone with your mac
Open your project in Xcode
Wait for the setup (processing symbol files, blah, blah) to be completed
Run your project in that iPhone once
Now just build your project while the iPhone is connected
Search for the Product group (or, folder) and expand it
You will see a file (maybe more) named as your target (project name)
Right click on that file and select show in finder. And voila, you have your .app file
What generates the .app
You will need to have previously built the app for the intended target. The "Product" option in the top menu bar includes a couple of ways to trigger this including: "Build for" of "Destination".
Where is the .app?
The yourApp.app you are looking for is stored in: <<YOURUSERHOME>>/Library/Developer/Xcode/DerivedData/<<YOURAPPNAME-UID>>/Build/Products/Debug-iphonesimulator
Easier way to locate
Open you app in XCODE
Browse the file tree in the left sidebar
Expand the "Products" directory
Right click the .app file you want to share, and select "Show In Finder"
What you are trying to do is not going to work. You can not share the .ipa file for someone else to install it on an iPhone simulator.

How to create .dsym file in Xcode 6.4

I know this should be a simple problem to solve, but I'm stumped.
Using Xcode 6.4, how can I create the .dsym file (this is for submission for Veracode scanning, if that matters).
All the instructions I can find are for Xcode <=5, and don't fully translate to Xcode 6.x
After archiving your app, in your derived data
~/Library/Developer/Xcode/DerivedData/
Go to your application
AppName-xxxxxxxxx/Build/Intermediates/ArchiveIntermediates/AppName/BuildProductsPath/Release-iphoneos
your .dsym file will be in this folder.
Finding the dSYM of a particular build through the Terminal can be quite cumbersome. Instead, use Xcode to do that. In the Window menu, choose Organiser. A list of your apps and archives appears. Select the one you are interested in. Right-click on it, and choose Show in Finder. You will end up in a directory with files called <AppName>-<ArchiveDate>.xcarchive, with the archive you selected in Xcode already selected in the Finder. Right-click again on it, and choose Show Package Contents. And you'll find here a dSYMs folder.

Physical location of target in xcode

I am creating an app in IOS with xcode 5.4.2. Can anybody tell me the physical location of target in xcode. Which files store the build settings given in the target in xcode IDE?
Most of the settings are stored in the "project.pbxproj" file inside the .xcodeproj file/folder, but this file isn't particularly easy to read.
Right Click the .xcodeproj
Click Show Package Contents
project.pbxproj file is in there.

iOS app does not have a Build directory with .app in - for binary upload

I have an iOS app which I need to upload the binary of. From what I could find online, I have to ZIP the .app folder and upload that.
Problem is I cannot find my .app directory. In my other apps I do find it. But in this specific one, there is no Build directory whatsoever.
Must I set it in my Target or somewhere for it to create that folder?
(This is in Xcode 4.2)
Does the app appear in the Products folder for your project (should be at the bottom of the project file/folder list in the left column)? If it does, right click on the .app file and choose the Open in Finder option. Zip the Application file and you should be fine.
If this is an app that you can run on a device, choose Build > Archive. The Organizer window will open, and now you can select and "share" the archive.
Otherwise, open the Preferences window and, under Locations, click the arrow next to the Derived Data pathname. Your build folder is usually inside the derived data folder for this project.

Resources