xcodebuild

Code signing error running XCodeBuild in Jenkins

喜夏-厌秋 提交于 2019-12-04 07:13:06
[Not a duplicate of similar questions as explained further down] I'm getting a code signing error when running XCodeBuild from within Jenkins but it will build ok from the command line or from within Xcode. Several people have had this problem in the past and the common theme with them is that Jenkins gets run at launch time as the daemon user and thus tries to access the system keychain. The solutions that people have applied are copying credentials to the system keychain or running a command to set which keychain to use. However in my case if I look at launchd in the Activity Manager the

xcodebuild error - SecKey API returned: -25308

邮差的信 提交于 2019-12-04 04:16:30
I'm receiving the error below while trying to build my iOS app. This error only occurs while building for the Release configuration. Also, I'm using CocoaPods for my third-party dependencies and these builds are running on Jenkins through SSH. SecKey API returned: -25308, (null)/Users/iosbuilder/Library/Developer/Xcode/DerivedData/*/Build/Intermediates/ArchiveIntermediates/Production/InstallationBuildProductsLocation/Applications/*.app/Frameworks/AFNetworking.framework: unknown error -1=ffffffffffffffff Command /bin/sh failed with exit code 1 I've tried unlocking the keychain on the build

Xcode preprocessor dependent on environment variable

我的梦境 提交于 2019-12-04 03:19:21
I have a configuration that I'd like to dynamically control a preprocessor defined value through an environment variable. Is this possible? if it is how do I set in the preprocessor define table that I want to set the value based on the environment variable? In the "Build Settings" of a target of your project, you can add something like that to the "Preprocessor Macros" field: DEV_USERNAME="${USER}" Of course, the USER variable can be replaced by any environment variable available to Xcode build system. To get a list of those, you can add a run script to your target and enable the checkmark

Packaging a Bundle with a static library

强颜欢笑 提交于 2019-12-04 03:15:30
I have a static library that includes some xibs. These will basically be the same across projects. I'd like to include the xibs as part of the library. I can include their veiwcontrollers, reference these controllers in the calling project but then there isn't a xib to load. When I right click the xib in the library project, it can't be part of the target. I thought about creating a CFPluginBundle but that creates a new project. I'd loose all of my IBOutlet and IBAction references. What is the best way to reuse xibs that also have outlets and actions to specific controllers? Ricardo Valeriano

CLI: Switch keychains in order to sign an xcodebuild

社会主义新天地 提交于 2019-12-04 02:15:35
I am trying to switch on a certain keychain, and close another one. I need this because our enterprise & appstore identities are called the same. Right now, I do a "security unlock-keychain" followed by a "security default-keychain" to open the correct keychain and do a "security lock-keychain" on the keychain I wish not to use. But xcodebuild still sees the entries in both keychains and gives up. iPhone Distribution: Company name.: ambiguous (matches "iPhone Distribution: Company name." in /Users/user/Library/Keychains/login.keychain and "iPhone Distribution: Company name" in /Users/user

KeyChain integration causing crash with “missing entitlement” error — via command line builds

空扰寡人 提交于 2019-12-04 01:54:43
问题 I'm having a problem with some KeyChain code causing archives created via xcodebuild to crash when distributed as ad-hoc apps and run on a device. The problem does not affect builds created via Xcode -- only those created via command line. The code that is throwing the error: (I'm using a KeyChain library found here) KeychainItemWrapper *keychain = [[KeychainItemWrapper alloc] initWithIdentifier:@"myapp" accessGroup:nil]; NSString *testKeychain = (NSString *)[keychain objectForKey:(__bridge

Running iOS Unit Tests from Command Line with Xcode 4.5

﹥>﹥吖頭↗ 提交于 2019-12-04 01:35:02
While running Unit Tests from command line (necessary for Jenkins) used to work until Xcode 4.4.1 with this hack , it does not seem to work anymore with Xcode 4.5. Now I get the following error message: ....MyTests.build/Script-641C6E0115D3BECD004175F...: line 3: 16669 Segmentation fault: 11 "${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests" Any ideas how to make it work again? I had the same issue after updating. You have to pass the argument RUN_UNIT_TEST_WITH_IOS_SIM=YES to the command xcodebuild to make it work. 来源: https://stackoverflow.com/questions/12604628/running-ios-unit-tests-from-command

Xcode 4.5 Command Line Tools - xcode-select issue

扶醉桌前 提交于 2019-12-03 22:54:50
After installing Xcode CLT 4.5.1 on OS X 10.8.2, I'm having issues installing native ruby gems which need to compiled. The output error is the same as with running xcrun -find: xcode-select: Error: No Xcode is selected. Use xcode-select -switch , or see the xcode-select manpage (man xcode-select) for further information. To which CLT location should xcode-select point to, since it's no longer at /Developer? Edit: I don't have the Xcode app installed, only CLT. jbowes The new location seems to be (be sure to run as root): sudo xcode-select -switch /Library/Developer/ Since your Xcode tools are

No architectures to compile for (ARCHS=i386, VALID_ARCHS=arm64 armv7 armv7s)

寵の児 提交于 2019-12-03 22:37:04
Preface: I did look at similar question s and none of the answers seemed to fix my problem. I am trying to build my xcode (version 5.1.1) project using: xcodebuild clean build -sdk iphonesimulator7.0 -arch "armv7s" ONLY_ACTIVE_ARCH=NO , when I run this I get: No architectures to compile for (ARCHS=armv7s, VALID_ARCHS=i386 x86_64) as an error. I tried the above command with all of the VALID_ARCHS (rm64 armv7 armv7s) as inputs. So I then tried running this command: xcodebuild clean build -sdk iphonesimulator7.0 -arch "i386" ONLY_ACTIVE_ARCH=NO and I then get No architectures to compile for

xcodebuild fails when run from Jenkins (works in terminal)

二次信任 提交于 2019-12-03 17:35:34
问题 I am trying to use Jenkins CI (on a Mac Mini with Mavericks) using the xcodebuild command to build my iOS projects. I played around with it for hours, but can't get my head around this issue. The following command builds my project on the command line without any issues, but fails when it gets run within Jenkins. xcodebuild -workspace ./MyProject.xcworkspace -scheme MyProject -configuration AdHoc -sdk iphoneos DSTROOT=/Users/me/myproject OBJROOT=/Users/me/myproject SYMROOT=/Users/me/myproject