xcodebuild

How to add “Other Linker Flags” to xcode project using command line?

穿精又带淫゛_ 提交于 2019-11-30 08:57:15
I'm trying to automate building process of xcode project. The problem is that I need to add "Other Linker Flags" when building the project. I can't just add it to the project Build Settings manually, I have to do it using the command line. May be I can edit the project file or configuration file somehow? Any options are good as long as it can be runned as a script. Any ideas? Thanks You can do this by specifying an xcconfig file to xcodebuild. For example: echo 'OTHER_LDFLAGS = $(OTHER_LDFLAGS) -force_load "$(SRCROOT)/calabash.framework/calabash" -lstdc++' > temp.xcconfig xcodebuild -xcconfig

xcodebuild 7.3 can't enable bitcode

隐身守侯 提交于 2019-11-30 08:38:28
I'm developing an embbeded framework for iOS. In order to make an universal fat (with simulator and device slices), I created an aggregate target with a script that uses xcodebuild and lipo commands to generate it, as many people does. With XCode 7.x I had to add an user-defined settings with BITCODE_GENERATION_MODE=bitcode in order to enable it, but this has stop working since the last XCode 7.3 release. I've tried everything I found in the internet like add OTHER_CFLAGS="-fembed-bitcode" , but anything works as before... I have seen this in the build log: ENABLE_BITCODE is always NO, no

Best way to install a custom cocoa framework

我的未来我决定 提交于 2019-11-30 05:20:42
I have a custom framework that, following the advice in Apple's Framework Programming Guide >> Installing your framework I install in /Library/Frameworks. I do this by adding a Run Script build phase with the following script: cp -R build/Debug/MyFramework.framework /Library/Frameworks In my projects I then link against /Library/Frameworks/MyFramework and import it in my classes like so: #import <MyFramework/MyFramework.h> This works very well, except that I always see the following message in my debugger console: Loading program into debugger… sharedlibrary apply-load-rules all warning:

xcodebuild: “No applicable devices found.” when exporting archive

自古美人都是妖i 提交于 2019-11-30 04:53:25
As of Xcode 7†, the xcodebuild export archive step has been giving us errors. Build command xcodebuild -exportArchive -archivePath "path/to/Thing.xcarchive" \ -exportPath "path/to/" \ -exportOptionsPlist path/to/PackageOptions-adhoc.plist yields 2015-10-08 16:28:27.409 xcodebuild[62682:464728] [MT] IDEDistribution: Step failed: <IDEDistributionThinningStep: 0x7ff1a42d23f0>: Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo=0x7ff1a72ddd80 {NSLocalizedDescription=No applicable devices found.} error: exportArchive: No applicable devices found. Error Domain

How to display compiler output or custom build steps output when building with xcode?

Deadly 提交于 2019-11-30 04:16:28
How can I see the output from the compiler of from the custom build steps (pre-action or post-action)? Pre-action output at least appears in system.log and is visible in Console.app. You'll find (and you can watch during the build) the complete build output in the Log Navigator. That's the right most icon of the small icons just below the Run and Build buttons. Joshua Nozzi Per my answer here ( Is it normal for Xcode not to detect if a pre-action failed? ) this is an issue that's been discussed in the dev forums. Pre-/post-action script non-zero status doesn't seem to have an affect, nor does

How to get the return value of xcodebuild?

天涯浪子 提交于 2019-11-30 03:00:17
问题 I'm using xcodebuild inside a bash script on a continuous integration server. I would like to know when a build as failed in the script, so I can exit prematurely from it and mark the build as failed. xcodebuild displays a BUILD FAILED message to the console, but I don't succeed in getting a return value. How can I achieve this? Thanks in advance 回答1: I solved my problem using this command: xcodebuild -... || exit 1 回答2: xcodebuild always returns 0, regardless of the actual test result. You

Accessing user defined variables passed in from xcodebuild command line

北城以北 提交于 2019-11-30 01:30:34
问题 I am running my xctests using xcodebuild and need to pass in some environment variables . In the example below ACCOUNT_ID and HOST_URL . I tried passing in the variables as both environment variable and accessing them from the test using getenv ("ACCOUNT_ID") xcodebuild -project CalculatorTestClient.xcodeproj -scheme CalculatorTestClient -destination '%s' ACCOUNT_ID=%s HOST_URL=%s test" And passing them in as user defaults and accessing them using [[NSUserDefaults standardUserDefaults]

xcodebuild failure clang:error no such file or directory:

我的梦境 提交于 2019-11-30 01:20:44
问题 Having a problem when building with xcodebuild. My project/app builds fine with the Xcode - gui. It simply isn't finding/building the libcryptopp library which is part of the build process. The error is: clang: error: no such file or directory: '/Users/builder/repo/ioskpay/xcode-cryptopp/cryptopp/build/Release-iphoneos/libcryptopp.a' This particular file should be derived from another project inside the main app - xcodebuild simply isn't correctly pointing at the right file folder which

xcodebuild exportArchive: no applicable devices found

南笙酒味 提交于 2019-11-29 22:30:08
After upgrading to Xcode 8 with iOS 10, I get exactly this error. I am on latest El Capitan and using the following versions of ruby (I updated via rvm, same with 2.0.0 which is system version) and CFPropertyList: Philipps-MacBook-Pro:mobile-sdk prakuschan$ ruby -v ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15] Philipps-MacBook-Pro:mobile-sdk prakuschan$ gem list CF *** LOCAL GEMS *** CFPropertyList (2.3.3) The xcodebuild -exportArchive command is executed in a shell script, and after a successful archive I get the following error: ** ARCHIVE SUCCEEDED ** 2016-09-22 10:02:16.460

How do I force Xcode to rebuild the Info.plist file in my project every time I build the project?

心不动则不痛 提交于 2019-11-29 22:20:36
Apparently the file gets cached, so it only gets built when it gets changed. I have environment variables set to increment my version number though, and such, and update them independently of the plist (in the project build settings, actually). Is there a script that I can use as a script build phase that will force the Info.plist to update? Some other convenient way? LeeH Select 'Edit Scheme', then select 'Build' from the control on the left. Then, add a Pre-actions step, ensure the scheme in question is selected in the 'Provide build settings from' pulldown and then add this into the edit