我安装了最新的iOS4 SDK,取代了我现有的SDK(所以我不再拥有3.2,4.0之外的任何东西).
我还从github查看了最新的Three20,现在每当我要构建一个新的Three20应用程序,或者甚至运行示例时,我都会收到以下错误:
Build Three20Core of project Three20Core with configuration Debug
Check dependencies
[BEROR]error: There is no SDK with the name or path 'iphonesimulator3.0'
Run Code Online (Sandbox Code Playgroud)
Three20还不兼容iOS4 SDK吗?
我有一个使用 xcodebuild 构建 Xcode 项目的 makefile。我的问题是
是 makefile 中的设置(使用 xcodebuild)还是调用 makefile 来构建项目时将使用的 Xcode 项目中的设置?
例如,如果我在 makefile 中有一些设置,例如:
SDKROOT =/Developer/SDKs/MacOSX10.5.sdk ARCHS="i386 x86_64"
CXXFLGS =-I/Users/XXYY/dev/Frameworks/Headers -DUNIX (just an example to show where to check header files, this is different from what is set in the Xcode project)
target:
xcodebuild build -target $@ -configuration Release
... ...
Run Code Online (Sandbox Code Playgroud)
会不会用到这里的设置(SDKROOT 和 CXXFLGS)?
如果答案是肯定的,那么我可以设置我的 Xcode 项目(称为项目 A)以链接到放在 $(HOME)/Library/Frameworks 中的一些我自己的框架,然后将其发送给用户。
同时,当我构建这个项目 A 时,我可以将它设置为链接到与我在我的 makefile 中构建项目 A 的同时构建的框架。
这样,当用户打开我的项目 A 时,框架将链接到他们的 $HOME/Library/Frameworks。(框架将被要求复制到那里)
或者也许我可以问当我尝试发布一个项目(使用我自己的框架)时如何为我自己的框架设置搜索路径?makefile 中的过程将是:首先构建我的框架,然后是我的项目(显然,我的项目将链接到框架的新构建)。
如果我设置框架的路径链接到myframeworkfolder/build/Release/ * .frameworks,这个路径需要在项目复制到其他用户时重新设置。如果我将框架的路径设置为链接到,例如,/Library/Frameworks,则其他用户不需要更改路径。任何人都有建议我应该怎么做?或者我应该将我的框架的路径设置为/Library/Frameworks,然后当我完成构建框架时,将其复制到/Library/Frameworks,然后构建我的项目。这是正确的方法吗?
谢谢。
嗨,我的 xcode 项目的根目录中有以下内容:
#!/bin/bash
xcodebuild -scheme target1 clean;
xcodebuild -scheme target1 archive;
xcodebuild -scheme target2 clean;
xcodebuild -scheme target2 archive;
Run Code Online (Sandbox Code Playgroud)
但是,这只执行第一行xcodebuild -scheme target1 clean;,然后产生
...
** CLEAN SUCCEEDED **
xcodebuild: command not found
xcodebuild: command not found
xcodebuild: command not found
Run Code Online (Sandbox Code Playgroud)
免责声明:我是绝对的 Mac OS X / Unix 新手。
编辑:按照 kranteg 的建议,我在脚本中添加了 pwd:
#!/bin/bash
pwd;
xcodebuild -scheme target1 clean;
pwd;
xcodebuild -scheme target1 archive;
pwd;
xcodebuild -scheme target2 clean;
pwd;
xcodebuild -scheme target2 archive;
pwd;
Run Code Online (Sandbox Code Playgroud)
输出:
/Users/CKU/Programme/uraClient
=== …Run Code Online (Sandbox Code Playgroud) 我正在尝试将CocoaPods添加到具有多个目标的现有项目中.我的podfile看起来像
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
link_with 'Target 1', 'Target 2', 'Target 2', 'Target 2'
pod 'AFNetworking', '~> 2.0'
Run Code Online (Sandbox Code Playgroud)
我正在尝试使用具有以下命令的脚本进行构建
xcodebuild archive -project "${PROJ_NAME}.xcodeproj" -scheme ${SCHEME_NAME} -configuration ${CONFIGURATION}
Run Code Online (Sandbox Code Playgroud)
当我编译时,我收到一个错误:
ld: library not found for -lPods-AFNetworking
Run Code Online (Sandbox Code Playgroud)
这很奇怪,因为目标使用Xcode中的Product> Archive菜单进行归档.
当我们执行 xcodebuild 时,它仅显示错误和警告,否则 xcodebuild 命令会将有关其正在执行的操作的所有内容打印到控制台。
有没有办法可以在 ant 任务中将 grep 与 xcodebuild 一起使用?
<exec executable="xcodebuild" failonerror="true">
<arg value="| grep error" />
<arg value="clean" />
<arg value="build" />
</exec>
Run Code Online (Sandbox Code Playgroud)
上面的 exec 任务在尝试执行 ant 任务时抛出错误。
当我尝试从命令行构建时:
xcodebuild -target -project myApp.xcodeproj -scheme myApp -sdk iphoneos -configuration Release archive -archivePath $PWD/build/DDCiOSClient.xcarchive
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
User defaults from command line:
IDEArchivePathOverride = /depot/myApp/myApp.xcarchive
Build settings from command line:
SDKROOT = iphoneos9.3
xcodebuild: error: Unknown build action 'myApp.xcodeproj'.
Run Code Online (Sandbox Code Playgroud)
你们中的任何人都知道这个错误的原因吗?
xcodebuild 帮助说:
细化:字符串
对于非 App Store 导出,Xcode 是否应该针对一种或多种设备变体精简包?可用选项:<none>(Xcode 生成非精简通用应用程序)、<thin-for-all-variants>(Xcode 生成通用应用程序和所有可用精简变体)或特定设备的型号标识符(例如“ iPhone7,1")。默认为<无>。
目前还不清楚这是否是字面意思:
<key>thinning</key>
<string><none></string>
Run Code Online (Sandbox Code Playgroud)
但在我的企业构建中,我仍然看到这个阶段发生:
2017-03-08 13:39:32.486 xcodebuild[43633:2535491] [MT] IDEDistribution: Step failed: <IDEDistributionThinningStep: 0x7fd756bef4e0>: Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}
Run Code Online (Sandbox Code Playgroud)
网上没有关于此设置的详细文档或信息。有谁明确知道要使用什么值?
我将旧应用程序从Swift 3迁移到Swift 4,并遇到了以下错误:
error: Multiple commands produce '/Users/.../Library/Developer/Xcode/DerivedData/ ... /Debug-iphonesimulator/CompassV3.swiftmodule/x86_64.swiftmodule':
1) Target 'CompassV3' (project 'Void Navigator'): Ditto /Users/.../Library/Developer/Xcode/DerivedData/.../Debug-iphonesimulator/CompassV3.swiftmodule/x86_64.swiftmodule /Users/.../Library/Developer/Xcode/DerivedData/Void_Navigator-bogrvoiumgmhfwcpvocwtssiwgpm/Build/Intermediates.noindex/Void Navigator.build/Debug-iphonesimulator/CompassV3.build/Objects-normal/x86_64/CompassV3.swiftmodule
2) Target 'Outdoor Navigator' (project 'Void Navigator'): Ditto /Users/.../Library/Developer/Xcode/DerivedData/.../Debug-iphonesimulator/CompassV3.swiftmodule/x86_64.swiftmodule /Users/.../Library/Developer/Xcode/DerivedData/Void_Navigator-bogrvoiumgmhfwcpvocwtssiwgpm/Build/Intermediates.noindex/Void Navigator.build/Debug-iphonesimulator/Outdoor Navigator.build/Objects-normal/x86_64/CompassV3.swiftmodule
Run Code Online (Sandbox Code Playgroud)
CompassV3 构建应用
Outdoor navigator 是扩展。
看起来像是冲突,但我不知道如何解决。
这些项目仍在快速版本3中。
我在任何地方都看不到这个文档——有没有想过我们如何使用 xcodebuild 为 Mac 的 UIKIt(即 Catalyst)构建项目?
您可以指定“-sdk iphoneos”与“-sdk iphonesimulator”在这两个目标之间切换,但“-sdk uikitformac”似乎不起作用(“未找到SDK”),尽管Xcode本身使用该命名法(例如,它构建到“Debug-uikitformac”文件夹等)。我还尝试了可能有意义的不同 SDK 值(例如“-sdk macabi”),但无济于事。
建议?
我无法为使用 Xcode 10.2+ 构建的通用(胖)框架的模拟器(设备编译成功)编译应用程序。应用程序使用来自 Objective-C 代码的框架。当从为设备构建切换到为模拟器构建时,Xcode 停止识别框架中的任何类和其他实体,因此它不会编译(但在 Swift 文件中正确识别框架类)。
我创建通用框架的脚本类似于https://gist.github.com/sundeepgupta/3ad9c6106e2cd9f51c68cf9f475191fa(通常所有这些脚本使用几乎相同的逻辑,并且主要因变量命名而异)。