Upload .app file to Hockey app using Jenkins - xcode

I have created a job in jenkins for Mac application. I am able to build the app successfully. The problem is I am unable to upload the .app file to Hockey app.
It was described in Hockey Jenkins plugin we need .app.zip (MacOS).
I am unable to create .app.zip file.
How to create such kind of file or is there any other way we can upload the .app to Hockeyapp?

As far as I'm aware, you shouldn't have a .app file — it should be a directory.
Xcode should be able to create both the Something.app directory and a Something.app.zip file.
If you can't find a .app.zip file in the build output, you should be able to create one yourself by zipping the .app directory.
e.g. From Jenkins, you could add an "Execute shell" build step that just does:
cd <app-output-dir>; zip -r9 Something.app.zip Something.app
Then from the HockeyApp plugin, you can choose **/*.app.zip as the file to upload.

Related

unable to take IPA from xcode build step to App Center Distribute step, but Publish Artifact works

I have an xCode build task (version 5) that builds and signs without error. I can then use the publish artificats step to be able to manually download the file from the pipeline.
I need to publish this file to app center though, but even when using the $(Build.ArtifactStagingDirectory)\filename.ipa - it's unable to find the file.
I have tried running a bash script to find the file ls -R, but I haven't been able to locate where the file is placed that the xcode step is building.
Error from App Center:
[error]Error: Cannot find any file based on /Users/runner/runners/2.160.1/work/1/s/filename.ipa
Did you specifically copy or stored the ipa file in folder $(Build.ArtifactStagingDirectory)? the pipeline task would not find the ipa file if it didnot exist in folder your specified.
You can check the archive path parameter for Xcode task. The ipa file is placed in the folder defined in archive path. You can specify a place to store the ipa file. For below example i place the ipa file in folder $(system.defaultworkingdirectory)/archive. Then in the following task I will refer to the ipa file by the path $(system.defaultworkingdirectory)/archive/*.ipa
If you leave the archive path to its default value. You can refer to the ipa file with wild-cards **\*.ipa which means the pipeline will search all the file with ipa extension within current working folder.
You can also check the xcode pipeline example here.

How can I validate dsym file of xcode build?

I extract Dsym file from the xarchive of release version and uploaded on crittercism but not able to find the symbolic crash report from the tool.
I contact crittercism helpDesk and all I come to know that I need to upload dsym file with all symbols... so, how can I validate that the file which I'm uploading is valid or not?
Build setting : GCC_GENERATE_DEBUGGING_SYMBOLS : Yes
File extract step : organizer > xarchive > release build > show package contents > dsyms > dsym.file
Apteligent also provides an automatic way using which, you'll never have to worry about tracking down your dSYMs again. This can be achieved by uploading the build_script file which is available inside the Apteligent iOS library (v4.0.1 and higher). All you need to do is specify the APP ID, API Key and the source path in order to configure your Xcode. Refer to the following article for complete description :
http://support.crittercism.com/articles/knowledge_base/Uploading-dSYMs-to-Apteligent-automatically
Once done, whenever you build your Xcode application, the dSYM files for your application (and any dependent modules to which you added the Run Script) will be uploaded to Apteligent and become available for crash symbolication.

Xcode build phase to copy app file to the Applications directory?

I'm using Xcode 6 to create Mac OS X applications, and I'd like to create a final build phase that copies the App file to the Applications directory. What's the best way to do this?
Just figured it out - I had to add a Copy Files phase to the end of the Build Phases.
In this phase, I specify Absolute Path: /Applications, and I dragged the product (.app) file to the files list.

Xcode: add files to project in a build phase

In my Xcode project I have a custom build phase which runs a script and downloads some images for use by the app. What I want to do is to automatically add those image to the project during the build. Right now, I have to build once (which downloads the files), and then manually add those files to the project. It works as long as the file names don't change. Instead, I'd like to add all the files in a specific directory to the project.
I've tried setting the Output Files value, as suggested here, like this:
$(PROJECT_DIR)/$(PROJECT_NAME)/External Assets/*
but it doesn't work. Any idea if this can be done?
Create a directory with the .bundle extension. Add this bundle to your app's resources. When the project builds, it will automatically copy every file in the bundle, even if they are changed or added after you first add the bundle to the project.

Create archive without Xcode

I am building an Xcode project from console over ssh (I can use only xcodebuild command), but there are no schemes in the project (user forgot to make schemes shared). xcodebuild allows to pass "archive" parameter only if building scheme (-scheme), but that is not an option for me.
So the question is: is it possible to create archive using only target?
I investigated .xcarchive directory, it contains Info.plist file (which contains information about application), dSYMs directory (containing myapp.dSYM) and Products/Applications (containing myapp.app) directory. I also noted that the file size of binary in .xcarchive's .app is 2 times smaller than in .app that is in Release directory. I guess it is because of code signage.
Can I simply copy files from Release directory (.app and .dSYM) to .xcarchive and create Info.plist there to create archive? Or are there any other steps that I must take?
yes, archives are only folders you can make yourself.
look at ANY archive and try to replicate the folder structure. (changing the appname as required)

Resources