Rue*_*zuo 11 xcode app-store ios watchkit
我不确定这是否是正确的问题,所以如果我使用了错误的部分,我很抱歉.我们将应用程序提交到iTunes Connect时遇到了麻烦,我们收到的电子邮件说:
Invalid Symlink - Your package contains a symbolic link 'PlugIns/$REDACTED_WATCHKIT_EXTENSION_TARGET_NAME$.appex/$REDACTED_WATCHKIT_EXTENSION_TARGET_NAME$.appex' which resolves to a location '/Users/$REDACTED_USER$/Library/Developer/Xcode/DerivedData/Seta-ctfzptralingvtbxhssdlkkzkclw/Build/Intermediates/ArchiveIntermediates/Seta/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/$REDACTED_WATCHKIT_EXTENSION_TARGET_NAME$.appex' that does not exist or is outside of the package.
Run Code Online (Sandbox Code Playgroud)
我尝试使用与项目相同的设置创建一个空白Xcode项目来重现错误,但我无法从iTunes Connect获得相同的错误.有没有人知道为什么要创建符号链接?我检查了空白的项目.ipa,它在该路径中没有包含那个符号链接,所以这显然是错误的,但我找不到创建符号链接的构建设置/配置.
我检查了xcodebuild输出,我发现了这个:
SymLink build/SetaWatchKitExtension.appex /Users/$REDACTED_USER$/Library/Developer/Xcode/DerivedData/Seta-ctfzptralingvtbxhssdlkkzkclw/Build/Intermediates/ArchiveIntermediates/Seta/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SetaWatchKitExtension.appex
cd $REDACTED_PROJECT_PATH$
export PATH="/Applications/Xcode-7.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-7.1.app/Contents/Developer/usr/bin:$REDACTED_PATH_ENV_VARIABLE$"
/bin/ln -sfh /Users/$REDACTED_USER$/Library/Developer/Xcode/DerivedData/Seta-ctfzptralingvtbxhssdlkkzkclw/Build/Intermediates/ArchiveIntermediates/Seta/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/$REDACTED_WATCHKIT_EXTENSION_TARGET_NAME$.appex /Users/$REDACTED_USER$/Documents/$REDACTED_PATH$/build/$REDACTED_WATCHKIT_EXTENSION_TARGET_NAME$.appex
Run Code Online (Sandbox Code Playgroud)
这似乎很好,但不知何故,符号链接最终在.ipa内部是错误的.在watchkit扩展构建目标步骤期间,在创建产品结构之后和CompileSwiftSources之前发生这种情况.
非常感谢任何提示或帮助.我正在使用Xcode 7.1.
我们必须使用 DTS 票证,并收到 Apple 的以下回复:
Thank you for contacting Apple Developer Technical Support (DTS).
The issue seems to happen when you pass CONFIGURATION_BUILD_DIR=$PWD/build to the xcodebuild command. Instead, try removing CONFIGURATION_BUILD_DIR from the xcodebuild command, and instead, change your build location in your Workspace settings. Follow these steps:
1. In the xcodebuild command, remove CONFIGURATION_BUILD_DIR=$PWD/build
2. Open your Workspace in Xcode
3. Select File > Workspace Settings
4. Click the Advanced button
5. Select Custom > Relative to Workspace
6. Click the Done buttons
This will cause the build products to still go in your build directory, and the symlink in the WatchKit Extension is no longer created.
Run Code Online (Sandbox Code Playgroud)
可行,遗憾的是此设置无法通过命令行工具应用,Xcode 正在以下路径上创建一个文件:
Project.workspace/xcuserdata/$USER.xcuserdatad/WorkspaceSettings.xcsettings
Run Code Online (Sandbox Code Playgroud)
显然,您不想将该路径添加到 VCS,因此我为 CI 创建了一个小 ruby 脚本来添加正确的设置并避免这种情况:
settingsFilePath = "#{ENV["PWD"]}/Project.xcworkspace/xcuserdata/#{ENV["USER"]}.xcuserdatad"
FileUtils.mkpath(settingsFilePath)
settings = {'BuildLocationStyle' => 'CustomLocation', 'CustomBuildIntermediatesPath' => 'Build/Intermediates', 'CustomBuildLocationType' => 'RelativeToWorkspace', 'CustomBuildProductsPath' => 'Build/Products'}
File.open("#{settingsFilePath}/WorkspaceSettings.xcsettings", 'w') { |file| file.write(settings.to_plist) }
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1302 次 |
| 最近记录: |