Xcode 9 GM – 导出并上传到App Store崩溃

我正在尝试将使用ARKit(Unity版本)的应用程序上传到iTunes Connect for TestFlight发行版。 当从Xcode – > Organizer导出和上传到应用程序商店进程时,我看到“剥离APPNAME.app的扩展属性”崩溃。

我检查了所有配置的bitcode和符号的开/关,自动签名,手动。 我的项目的部署目标是iOS 10,因为无法设置11。 我还尝试从simillar线程( https://forums.developer.apple.com/thread/83219 )执行以下步骤,并将App Store 1024图标添加到Images.xcassets。

Xcode崩溃的任何想法?

崩溃之前的屏幕截图: 崩溃之前的屏幕截图

崩溃报告:

 Process: Xcode [10862] Path: /Applications/Xcode-9b6.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 9.0 (13238.4) Build Info: IDEFrameworks-13238004000000000~11 Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: Xcode [10862] User ID: 501 Date/Time: 2017-09-10 14:56:10.196 +0100 OS Version: Mac OS X 10.12.6 (16G29) Report Version: 12 Anonymous UUID: FD8390BC-9E7B-969D-15A2-22A8DBBD050D Time Awake Since Boot: 16000 seconds System Integrity Protection: enabled Crashed Thread: 17 Dispatch queue: ConcurrentQueue: -[IDEDistributionPackagingStepViewController viewDidInstall]_block_invoke Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000020 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [0] VM Regions Near 0x20: --> __TEXT 0000000103625000-0000000103627000 [ 8K] rx/rwx SM=COW /Applications/Xcode-9b6.app/Contents/MacOS/Xcode Application Specific Information: ProductBuildVersion: 9M214v Thread 0:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fffbb90634a mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fffbb905797 mach_msg + 55 2 com.apple.CoreFoundation 0x00007fffa6037434 __CFRunLoopServiceMachPort + 212 3 com.apple.CoreFoundation 0x00007fffa60368c1 __CFRunLoopRun + 1361 4 com.apple.CoreFoundation 0x00007fffa6036114 CFRunLoopRunSpecific + 420 5 com.apple.HIToolbox 0x00007fffa5596ebc RunCurrentEventLoopInMode + 240 6 com.apple.HIToolbox 0x00007fffa5596cf1 ReceiveNextEventCommon + 432 7 com.apple.HIToolbox 0x00007fffa5596b26 _BlockUntilNextEventMatchingListInModeWithFilter + 71 8 com.apple.AppKit 0x00007fffa3b2fa54 _DPSNextEvent + 1120 9 com.apple.AppKit 0x00007fffa42ab7ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796 10 com.apple.dt.DVTKit 0x0000000103eb58be -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 390 11 com.apple.AppKit 0x00007fffa3b243db -[NSApplication run] + 926 12 com.apple.AppKit 0x00007fffa3aeee0e NSApplicationMain + 1237 13 libdyld.dylib 0x00007fffbb7df235 start + 1 

编辑

运行xcodebuild(通过fastlane gym)会产生以下结果:

 + xcodebuild -exportArchive -exportOptionsPlist /var/folders/z1/m155xvnn42s7xl7hfw3_8w5w0000gn/T/gym_config20170912-61009-190kutb.plist -archivePath '/Users/wert/Library/Developer/Xcode/Archives/2017-09-12/towerar 2017-09-12 22.06.54.xcarchive' -exportPath /var/folders/z1/m155xvnn42s7xl7hfw3_8w5w0000gn/T/gym_output20170912-61009-42bo6w 2017-09-12 22:09:04.966 xcodebuild[62085:5372649] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/z1/m155xvnn42s7xl7hfw3_8w5w0000gn/T/Unity-iPhone_2017-09-12_22-09-04.966.xcdistributionlogs'. 2017-09-12 22:09:21.584 xcodebuild[62085:5372649] [MT] IDEDistribution: Step failed: :  2017-09-12 22:09:21.584 xcodebuild[62085:5372649] -[__NSCFString userInfo]: unrecognized selector sent to instance 0x7fc3c74d72f0 ** INTERNAL ERROR: Uncaught exception ** Uncaught Exception: -[__NSCFString userInfo]: unrecognized selector sent to instance 0x7fc3c74d72f0 Stack: 0 __exceptionPreprocess (in CoreFoundation) 1 objc_exception_throw (in libobjc.A.dylib) 2 -[NSObject(NSObject) doesNotRecognizeSelector:] (in CoreFoundation) 3 ___forwarding___ (in CoreFoundation) 4 _CF_forwarding_prep_0 (in CoreFoundation) 5 __55-[Xcode3CommandLineBuildTool _distributeArchiveAndExit]_block_invoke (in Xcode3Core) 6 -[Xcode3CommandLineBuildTool _distributeArchiveAndExit] (in Xcode3Core) 7 -[Xcode3CommandLineBuildTool run] (in Xcode3Core) 8 0x0000000104d752af (in xcodebuild) 9 start (in libdyld.dylib) 

我必须取消选中所有复选框并使用手动管理签名,然后才能继续向导。

xattr命令行工具是否有效? 您的python安装可能已损坏,或者如果您已更换已安装的xattr模块,则可能需要重新安装提供的系统。

我遇到了同样令人沮丧的问题,几乎整天都在发生,Xcode 9在归档过程中突然崩溃,导致出现相同的错误报告。

@dangercheng让我了解了xcode 9中的归档过程, 也就是说 ,它需要xattr命令,因此我在我的macbook中检查xattr命令,不知何故xattr不起作用。 从详细消息中可以看出,该错误与/Library/Python/2.7中的文件夹/文件所拥有的文件权限有关。 不知何故,除root之外的用户无权在这些文件/文件夹上写入(w / 2)。

从上述事实我得出结论,我需要在这种情况下更改文件权限chmod -R 775并将其应用于/Library/Python/2.7上的所有文件夹及其内容。 之后我的xattr运行良好,我在Xcode 9中的存档过程运行顺利,没有崩溃。

谢谢你们所有人

在我的情况下,这是由于python的权限问题。

从终端运行xattr时出现以下错误:

IOError:[Errno 13]权限被拒绝:’/ Users / cb / Library /Python / 2.7 / lib / python / site-packages / zc.buildout-1.5.2-py2.7.egg-info / names_packages.txt’

看一下/ Users / cb / Library文件夹,我发现所有文件夹都归cb:staff (我当前登录的用户和组)所有,但/ Users / cb / Library / Python文件夹由root拥有:轮

运行以下将消除错误:

sudo chown -R $ USER:$(id -g)/ Users / $ USER / Library / Python

sudo chown之后,你可以再次运行xattr来validation。 xattr命令应该没有错误或其他输出。

可能不是你的错,但确实提交了Apple的错误。 但是当Xcode上传器出于任何原因失败时,请试试好的应用程序加载器:

Xcode.app/Contents/Applications/Application Loader.app

在mac终端中运行’xattr’命令,如果结果如下:

 python version 2.7.10 can't run /usr/bin/xattr. Try the alternative(s): /usr/bin/xattr-2.6 (uses python 2.6) /usr/bin/xattr-2.7 (uses python 2.7) Run "man python" for more information about multiple version support in Mac OS X. 

你应该创建一个新的软链接’/usr/bin/xattr-2.7’运行bellow命令:

 cd /usr/bin sudo rm xattr sudo ln -s xattr-2.7 xattr 

这解决了我的问题!

我在@ dangercheng的回答后解决了我的问题。 我两天前将python升级到python 3.6。似乎xattr命令是在python3.6下执行的。 但是,当我在终端中执行xattr时。 File "/usr/bin/xattr", line 31 continue ^ TabError: inconsistent use of tabs and spaces in indentation发生了一些不好的事情! 所以我编辑了xattr的源代码。 for i in g: vers = vpat.search(i) if vers is None: continue //add 4 space sys.stderr.write("%s (uses python %s)\n" % (i, i[vers.start():vers.end()])) n = 1

“`python版本3.6.3无法运行/ usr / bin / xattr。 尝试替代方案:

(错误:找不到替代品)

有关Mac OS X中多版本支持的更多信息,请运行“man python”.“`另一个错误!

我猜xattr命令应该判断python的版本并执行合适的代码,python3的代码包含一些错误。 最后,我将python的默认版本更改为python2.7,并将xattr的softlink替换为xattr-2.7。 有用。 注意,当xcodebuild执行xattr命令时,python的路径是“/ usr / bin / python”。 路径“/ usr / bin / python”也是softlink。 所以,我按照这一步解决了这个问题。 第1步: cd /usr/bin

Step2: sudo rm python sudo ln -s python2.7 python

Step3: sudo rm xattr sudo ln -s xattr-2.7 xattr如果在“/ usr / bin”下找不到python2.7,请找到另一个合适的python路径,例如“/Library/Frameworks/Python.framework/Versions/2.7 “等