标签: xcodebuild

无法在Xcode 4方案预构建操作脚本中访问SRCROOT

是否有可用于在Xcode 3中运行脚本的某些变量可用于在Xcode 4中预构建脚本操作?

剧本

PLIST_FILE="$SRCROOT/$INFOPLIST_FILE"
echo "${PLIST_FILE}"
Run Code Online (Sandbox Code Playgroud)

仅产生"/"作为输出:SRCROOT和INFOPLIST_FILE似乎都没有定义.这些在Xcode 4中有新名称; 这是一个错误吗?

path environment-variables xcodebuild buildpath xcode4

1
推荐指数
1
解决办法
3145
查看次数

将版本号添加到XCode命令行实用程序C++项目

我使用Objective-C在XCode中创建了一个Command Line Utility C++工具.我希望版本号显示在创建的可执行文件的Info中.所以我在Build设置Current Project Version字段中添加了版本号1.0.0.0.但是,当我构建它时,版本号不会添加到创建的"Unix可执行文件"中.

我错过了什么吗?谢谢您的帮助.

xcode objective-c xcodebuild

1
推荐指数
1
解决办法
1063
查看次数

IOS目标链接可可堆栈库,其中库编写了C++ 11标准错误

我正在研究一个项目,它是一个cocoa静态库,它使用了由其他人编写的C++库.这个C++库使用了C++ 11和libc ++(支持C++ 11的LLVM C++标准库).

我成功构建了可可库,但是当我在App中链接这个库时(只需在"Link Binary with Libraries"中添加链接).

发生错误,这是错误日志:

"non-virtual thunk to std::__1::basic_iostream<char, std::__1::char_traits<char> >::~basic_iostream()", referenced from:


  "non-virtual thunk to std::__1::basic_iostream<char, std::__1::char_traits<char> >::~basic_iostream()", referenced from:


  "non-virtual thunk to std::__1::basic_istream<char, std::__1::char_traits<char> >::~basic_istream()", referenced from:


  "non-virtual thunk to std::__1::basic_istream<char, std::__1::char_traits<char> >::~basic_istream()", referenced from:


  "non-virtual thunk to std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::~basic_istream()", referenced from:


  "non-virtual thunk to std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::~basic_istream()", referenced from:


  "non-virtual thunk to std::__1::basic_ostream<char, std::__1::char_traits<char> >::~basic_ostream()", referenced from:


  "non-virtual thunk to std::__1::basic_ostream<char, std::__1::char_traits<char> >::~basic_ostream()", referenced from:


  "non-virtual thunk to std::__1::basic_ostream<wchar_t, std::__1::char_traits<wchar_t> >::~basic_ostream()", …
Run Code Online (Sandbox Code Playgroud)

c++ xcodebuild static-libraries ios c++11

1
推荐指数
1
解决办法
1536
查看次数

Ionic/cordova:如何使用 fastlane 或 xcodebuild 添加推送功能?

我有一个使用 Ionic.io 推送消息的 Ionic 项目。它使用 Fastlane 构建并通过 HockeyApp 部署。

由于升级到 Xcode 8 推送通知不再适用于 iOS 10。

我有一个包含推送授权的授权文件,它使用 ruby​​ 脚本添加到 xcode 项目文件中,请参阅https://github.com/fastlane/fastlane/issues/6544

当我使用 Fastlane push 构建项目时,仍然无法正常工作。当我在 Xcode 中打开项目文件并查看功能部分时,它在“将推送通知权利添加到您的权利文件”中显示了一个复选标记,但在“将推送通知功能添加到您的应用程序 ID”中显示了一个错误。

如果我按“修复”并重建, push确实有效

所以我的问题是:

我希望能够正确启用推送功能,只使用 Fastlane、xcodebuild、ruby 或其他任何东西,只要它仅在命令行中并允许我的 ionic 项目干净地构建。

xcodebuild ionic-framework fastlane ios10 xcode8

1
推荐指数
1
解决办法
3123
查看次数

未找到 Bitrise.io 方案

出于某种原因,我在 Bitrise.io 上收到一条错误消息,说在项目中找不到该方案。它说要使用 -list 命令,但是在本地执行此操作会发现该方案很好。

我知道这个问题的一个常见原因是没有共享你的方案,但是我已经检查过这个并且它似乎被正确共享。

我在我的工作流程中使用 Xcode 测试 iOS 步骤。另一个奇怪的事情是在本地运行 build 命令也可以正常工作。

任何人都可以提出解决此问题的任何想法吗?

xcode unit-testing xcodebuild ios bitrise

1
推荐指数
1
解决办法
1060
查看次数

如何识别快速通道扫描中失败的测试用例以重新运行?

作为将 XCode 的 UI 测试添加到 CI 流程的一部分,由于测试框架普遍不可靠,我决定在构建失败之前重新运行失败的测试。

我可以通过使用块来避免构建立即失败rescue,这不是问题,并且报告文件(JUnit 和 HTML)的位置是固定的,因此可以使用 File.readlines 等打开。

junit 报告文件的格式是测试套件 -> 测试套件 -> 测试用例 -> 失败消息(如果适用)的级联,然后回退到足以容纳下一个元素。看起来很标准。

然而,在那一点上我有点卡住了(这可能不是正确的道路;首先有没有一个规范的更好的方法来做到这一点?)。在 bash 中,我将使用 grep -B 提取失败消息之前的行,这将是失败测试用例的名称,然后使用 awk 获取相关文本片段。然后我可以使用 -only-testing 参数将简单的两个管道 shell 命令反馈到 scan/xcodebuild 中。

有没有办法在 Ruby 中同样轻松地做到这一点,或者有一个 junit 插件可以让我只读出各个失败测试用例的名称?

ruby junit xcodebuild fastlane

1
推荐指数
1
解决办法
1450
查看次数

xcode构建错误:项目不包含方案

我正在开发一个离子应用程序,但是当我尝试构建它时,它给了我以下错误

xcodebuild: error: The project named "SnapHome" does not contain a scheme named "SnapHome". The "-list" option can be used to find the names of the schemes in the project.
Run Code Online (Sandbox Code Playgroud)

以下是可用的方案

Information about workspace "SnapHome":
    Schemes:
        SnapHome
Run Code Online (Sandbox Code Playgroud)

我使用下面的脚本和企业配置文件来构建应用程序,我使用相同的脚本来构建其他cordova应用程序

cordova build
projectname='xxxxx'
provisionprofilename="xxxxxxx"
outoutdirectory="xxxxxxx"
xcodeprojectdirectory="yyyyyy/snapapp/platforms/ios"

rm -f "$outoutdirectory"/"$projectname".xcarchive
rm -f "$outoutdirectory"/"$projectname".ipa

xcodebuild clean -project "$xcodeprojectdirectory"/"$projectname".xcodeproj -configuration Release -alltargets

xcodebuild -workspace "$xcodeprojectdirectory"/"$projectname".xcworkspace -list

xcodebuild archive -project "$xcodeprojectdirectory"/"$projectname".xcodeproj -scheme "$projectname" -archivePath "$outoutdirectory"/"$projectname".xcarchive

xcodebuild -exportArchive -archivePath "$outoutdirectory"/"$projectname".xcarchive -exportOptionsPlist exportPlist.plist -exportPath "$outoutdirectory"/"$projectname".ipa
Run Code Online (Sandbox Code Playgroud)

能告诉我这是什么问题以及如何解决这个问题.我使用的是xcode …

xcode xcodebuild ios cordova ionic-framework

1
推荐指数
1
解决办法
3056
查看次数

如何通过 ssh 运行 xcodebuild 命令?

我正在尝试通过 ssh 使用 xcodebuild 命令运行 iOS 测试。当我尝试运行那些构建和运行 iOS UI 测试的命令时,我遇到以下错误。

注意:我在通过 ssh 解锁的机器上拥有所有钥匙串。

命令

HOME=/Users/mcj xcodebuild build-for-testing -project ios/ios_test_app/HXKPIIOS/HXKPIIOS.xcodeproj -scheme HXKPIIOS -destination 'platform=iOS,id=d623bacb04507071723fe1286c148edb822d5422' -derivedDataPath /opt/HXKPI_Logs/oobe_iOS_2018-06-14-11-14-23-216414/build_derived_data| tee /opt/HXKPI_Logs/oobe_iOS_2018-06-14-11-14-23-216414/uitest/build1.log
Run Code Online (Sandbox Code Playgroud)

错误

 /usr/bin/codesign '-r-' '--display' '/opt/HXKPI_Logs/oobe_iOS_2018-06-14-11-14-23-216414/build_derived_data/Build/Products/Debug-iphoneos/HXKPIIOS.app/Frameworks/libswiftCore.dylib'
/opt/HXKPI_Logs/oobe_iOS_2018-06-14-11-14-23-216414/build_derived_data/Build/Products/Debug-iphoneos/HXKPIIOS.app/Frameworks/libswiftCore.dylib: code object is not signed at all
Codesigning /opt/HXKPI_Logs/oobe_iOS_2018-06-14-11-14-23-216414/build_derived_data/Build/Products/Debug-iphoneos/HXKPIIOS.app/Frameworks/libswiftCore.dylib
  /usr/bin/codesign '--force' '--sign' '<code sign identity>' '--verbose' '/opt/HXKPI_Logs/oobe_iOS_2018-06-14-11-14-23-216414/build_derived_data/Build/Products/Debug-iphoneos/HXKPIIOS.app/Frameworks/libswiftCore.dylib'
/opt/HXKPI_Logs/oobe_iOS_2018-06-14-11-14-23-216414/build_derived_data/Build/Products/Debug-iphoneos/HXKPIIOS.app/Frameworks/libswiftCore.dylib: unknown error -1=ffffffffffffffff
error: Task failed with exit 1 signal 0 {
    /usr/bin/codesign '--force' '--sign' '<code sign identity>' '--verbose' '/opt/HXKPI_Logs/oobe_iOS_2018-06-14-11-14-23-216414/build_derived_data/Build/Products/Debug-iphoneos/HXKPIIOS.app/Frameworks/libswiftCore.dylib'
}

** TEST BUILD FAILED **


The following build …
Run Code Online (Sandbox Code Playgroud)

ssh xcode xcodebuild ios

1
推荐指数
1
解决办法
2415
查看次数

当我在 Xcode 中运行“产品”-&gt;“存档”时,会执行哪些“xcodebuild”命令?

我正在尝试从命令行而不是通过 Xcode 构建 IOS 应用程序,这是一场艰苦的斗争。我的项目通过转到“产品”->“存档”在 Xcode 中构建得很好,但是当我尝试在终端中使用 执行我认为相同的操作时xcodebuild,由于缺少一些头文件而失败。

如何了解单击“存档”时实际发生的情况?

或者,如果有人能发现我的错误所在,我认为应该有效的命令是:

xcodebuild -workspace MyApp.xcworkspace -scheme MyApp -configuration Beta -destination 'generic/platform=iOS' -archivePath <path to xcarchive file> archive
Run Code Online (Sandbox Code Playgroud)

xcode xcodebuild

1
推荐指数
1
解决办法
2466
查看次数

为 iOS 模拟器构建发布版本?

我正在尝试使用xcodebuildCLI 通过“发布配置”( -c Release) 和 iOS 模拟器的目标 ( -destination "platform: iOS Simulator") 来构建我的应用程序。然而,xcodebuild似乎不支持这种行为,因为它响应如下:

\n
$ xcodebuild -workspace Y.xcworkspace -scheme X -configuration Release -destination 'platform=iOS Simulator'\n                           \nxcodebuild: error: Unable to find a destination matching the provided destination specifier:\n        { platform:iOS Simulator }\n\n    Missing required device specifier option.\n    The device type \xe2\x80\x9ciOS Simulator\xe2\x80\x9d requires that either \xe2\x80\x9cname\xe2\x80\x9d or \xe2\x80\x9cid\xe2\x80\x9d be specified.\n    Please supply either \xe2\x80\x9cname\xe2\x80\x9d or \xe2\x80\x9cid\xe2\x80\x9d.\n\n    Available destinations for the "X" scheme:\n        { platform:iOS Simulator, …
Run Code Online (Sandbox Code Playgroud)

iphone xcode xcodebuild ios

1
推荐指数
1
解决办法
3510
查看次数

Xcode/React-native:未定义符号:_swift_getFunctionReplacement

我有一个 react-native 项目,在安装了一些与 mapbox 相关的 pod 后,我的 xcode 构建中开始出现以下错误。

ld: warning: building for iOS, but linking in dylib file (/Users/nitinsharma/Library/Developer/Xcode/DerivedData/app-bpqejjqomhurrldtyubqevqtdqzc/Build/Products/Debug-iphoneos/MapboxAccounts.framework/MapboxAccounts) built for Mac Catalyst
Undefined symbols for architecture arm64:
  "_swift_getFunctionReplacement", referenced from:
      _swift_getFunctionReplacement50 in libswiftCompatibilityDynamicReplacements.a(DynamicReplaceable.cpp.o)
     (maybe you meant: _swift_getFunctionReplacement50)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

现在,如果我按照这些步骤操作,错误就会消失

 1. Go to project>build settings> library search path
 2. remove "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)"

Run Code Online (Sandbox Code Playgroud)

但是,之后我无法安装该应用程序,因为当 xcode 尝试在我的设备上安装该应用程序时出现以下错误。我什至尝试删除DerivedData文件夹但没有运气

Details

Unable to …
Run Code Online (Sandbox Code Playgroud)

xcode xcodebuild cocoapods mapbox react-native

1
推荐指数
1
解决办法
2959
查看次数

XCode项目版本颠簸,有自动化方式吗?

我想知道是否有任何自动方法来提升xcode项目的版本号?

我正在使用带有Ruby的Jeweler,它有非常好的命令行选项来提升项目的版本号.选项是主要,次要或补丁.XXX

是否有任何类似的(半)自动方式来破坏xcode中的版本号?我知道的唯一方法是手动编辑主plist.如果有任何记录版本或与版本控制集成甚至可能会很棒.

谢谢

versioning xcode xcodebuild

0
推荐指数
1
解决办法
781
查看次数

iOS4.1 SDK中单个库中的重复符号

我正在开发一个iPhone应用程序.我对Xcode不熟悉,所以请耐心等待.我有iOS 4.1 Device SDK.当我在"Active ..."下拉框中选择"Simulator"时,我的应用程序编译没有错误并在iPhone模拟器中运行.

但是,当我在下拉框中选择"设备"时,我收到有关重复符号的以下链接器错误:

Ld build/PineCone.build/Debug-iphoneos/PineCone.build/Objects-normal/armv6/PineCone normal armv6
cd /Users/isaacsutherland/fydp/PineCone/PineCone
setenv IPHONEOS_DEPLOYMENT_TARGET 4.1
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk -L/Users/isaacsutherland/fydp/PineCone/PineCone/build/Debug-iphoneos -L/Users/isaacsutherland/fydp/PineCone/PineCone/../3rd/libGHUnitIPhone -F/Users/isaacsutherland/fydp/PineCone/PineCone/build/Debug-iphoneos -filelist /Users/isaacsutherland/fydp/PineCone/PineCone/build/PineCone.build/Debug-iphoneos/PineCone.build/Objects-normal/armv6/PineCone.LinkFileList -dead_strip -all_load -ObjC -miphoneos-version-min=4.1 -framework Foundation -framework UIKit -framework CoreGraphics /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20Core.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20Network.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20Style.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20UI.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20UICommon.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20UINavigator.a -framework QuartzCore -framework CFNetwork -framework MobileCoreServices -framework SystemConfiguration -lz.1.2.3 /Users/isaacsutherland/fydp/PineCone/ClientDal/build/Debug-iphoneos/libClientDal.a -lGHUnitIPhone4_0 -o /Users/isaacsutherland/fydp/PineCone/PineCone/build/PineCone.build/Debug-iphoneos/PineCone.build/Objects-normal/armv6/PineCone

ld: duplicate symbol _RedirectionLimit in /Users/isaacsutherland/fydp/PineCone/ClientDal/build/Debug-iphoneos/libClientDal.a(libASIHTTPRequest.a-armv6-master.o) and /Users/isaacsutherland/fydp/PineCone/ClientDal/build/Debug-iphoneos/libClientDal.a(libASIHTTPRequest.a-armv6-master.o)
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
Run Code Online (Sandbox Code Playgroud)

错误是奇怪的,因为它抱怨_RedirectionLimit被发现两次 …

xcode xcodebuild ios4 ios

0
推荐指数
1
解决办法
4772
查看次数