我有一个相当老的项目,最低部署目标设置为iOS 8.4.由于技术原因,必须启用bitcode .该项目建立并运行良好.然而,当尝试导出存档的构建时,事情就出错了.我正在使用Xcode 8.2.1.
当我使用Rebuild from bitcode启用该选项创建测试版本(使用Enterprise证书签名)时,导出在编译bitcode时失败.
以下是日志的相关部分:
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/lib/darwin/libclang_rt.ios.a" "-o" "/private/var/folders/qy/cgq_nq7x2tx1j3z__7f4yx100000gn/T/<redacted target name>WX9bPu/<redacted target name>.armv7.out"
-= Output =-
Undefined symbols for architecture armv7:
"_llvm_gcov_init", referenced from:
__hidden#2_ in 001.o
__hidden#3_ in 001.o
__hidden#4_ in 001.o
__hidden#5_ in 001.o
__hidden#6_ in 001.o
__hidden#7_ in 001.o
__hidden#8_ in 001.o
...
"_llvm_gcda_end_file", referenced from:
__hidden#0_ in 001.o
__hidden#0_ in 002.o
__hidden#0_ in 003.o
__hidden#0_ in 004.o
__hidden#0_ in 005.o
__hidden#0_ in 006.o
__hidden#0_ in 007.o
...
"_llvm_gcda_emit_function", …Run Code Online (Sandbox Code Playgroud) 我想要这个 AppleScript 片段的 JXA 等效项:
tell application "Finder"
# Get path
set currentTarget to target of window 1
set posixPath to (POSIX path of (currentTarget as alias))
# Show dialog
display dialog posixPath buttons {"OK"}
end tell
Run Code Online (Sandbox Code Playgroud)
我得到的最接近的是使用该url属性来初始化Foundation NSURL对象并访问其fileSystemRepresentation属性,如下所示:
// Get path
var finder = Application('Finder')
var currentTarget = finder.finderWindows[0].target()
var fileURLString = currentTarget.url()
// I'd like to get rid of this step
var fileURL = $.NSURL.alloc.initWithString(fileURLString)
var posixPath = fileURL.fileSystemRepresentation
// Show dialog …Run Code Online (Sandbox Code Playgroud)