我正在从Xcode 3.5迁移到Xcode 4,而我正在尝试存档我的应用程序以进行AdHoc分发.
我收到了这个错误
预编译MyApp_Prefix.pch
ProcessPCH /Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/Build/PrecompiledHeaders/MyApp_Prefix-crxrbmeralwexyefvuwvzexquuin/MyApp_Prefix.pch.pth MyApp_Prefix.pch normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/return/Projects/iphone-MyApp
setenv LANG en_US.US-ASCII
setenv PATH "/Xcode4.2/Platforms/iPhoneOS.platform/Developer/usr/bin:/Xcode4.2/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Xcode4.2/Platforms/iPhoneOS.platform/Developer/usr/bin/clang -x objective-c-header -arch armv7 -fmessage-length=0 -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -DFAVOURITES_ENABLED=0 -isysroot /Xcode4.2/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -gdwarf-2 -fvisibility=hidden -Wno-sign-conversion -mthumb "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=3.0 -iquote "/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/MyApp-generated-files.hmap" "-I/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/MyApp-own-target-headers.hmap" "-I/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/MyApp-all-target-headers.hmap" -iquote "/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/MyApp-project-headers.hmap" "-I/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/BuildProductsPath/Distribution-iphoneos/include" "-I”/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp" -I- "-IDistribution/BuildProductsPath/Distribution-iphoneos/../three20?" "-I“/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp" -I- "-IDistribution/BuildProductsPath/Distribution-iphoneos/../../three20?" -Ithree20/Build/Products/three20 -I/Xcode4.2/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/include/libxml2 "-I/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/DerivedSources/armv7" "-I/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp …
Run Code Online (Sandbox Code Playgroud) 我有一个基于NSDocument的应用程序,它使用filewrappers来保存和加载其数据.该文档可以拥有各种资源,因此我不想将所有内容加载到内存中.我可能会做一些根本错误的事情,但是一旦我更改了一个(内部)文件然后保存,我就无法读取任何尚未加载到内存中的文件.
我已将相关代码分离到一个单独的项目中以重现此行为,并得到相同的结果.基本流程如下:
如果用户想要编辑其他文件(sub2),则无法加载.出现的错误:
-[NSFileWrapper regularFileContents] tried to read the file wrapper's contents lazily but an error occurred: The file couldn’t be opened because it doesn’t exist.
Run Code Online (Sandbox Code Playgroud)这是我项目中的相关代码:
此代码可能更容易阅读这个要点:https: //gist.github.com/bob-codingdutchmen/6869871
#define FileName01 @"testfile1.txt"
#define FileName02 @"testfile2.txt"
/**
* Only called when initializing a NEW document
*/
-(id)initWithType:(NSString *)typeName error:(NSError *__autoreleasing *)outError {
self = [self init];
if (self) {
self.myWrapper = [[NSFileWrapper alloc] initDirectoryWithFileWrappers:nil]; …
Run Code Online (Sandbox Code Playgroud) 我已经在这几个小时了,虽然我有一种感觉,我很接近我似乎无法解决这个问题.
我正在尝试创建一个带有git存储库的脚本,将该存储库中的子模块更新为指定版本,并提交更改.
我可以找到存储库,获取子模块并检查我想要的提交.
我似乎无法添加更新的子模块哈希,所以我可以提交它.
repos = Repo('path/to/repos')
submodule = repos.submodule('submodule-name')
submodule.module().git.checkout('wanted commit')
diff = repos.index.diff(None)
Run Code Online (Sandbox Code Playgroud)
此时我可以看到子模块的变化.如果我检查sourcetree,我可以在'unstaged files'中看到更改的子模块.问题是,我不知道如何进行更改以便我可以提交.
repos.index.commit('')
,它会创建一个空提交.repos.index.add([submodule.path])
所有文件都会添加到存储库中,这肯定不是我想要的.repos.index.add([submodule])
,似乎没有任何事情发生.我为我的iOS XCode项目设置了持续集成,但是当Xcode bot构建我的项目时,我不断收到很多警告.当我构建(用于运行,测试或存档)时,我没有得到任何警告.
我认为这与我的项目设置有关.我的主项目中有一个'内部'项目,包含我需要的库.我正在为i386
架构构建两个项目,因此它可以在模拟器中运行(因此Xcode机器人可以运行测试).
确切的警告如下.我对.m
内部项目中的每个文件都收到此警告.
Warning: no rule to process file '[…]/CDICMessage.m' of type sourcecode.c.objc for architecture i386
Run Code Online (Sandbox Code Playgroud)
大多数关于此警告的Google结果都是针对.h
错误添加到"编译源"的.m
文件,但显然我的文件应该在那里.
同样,此警告仅显示在Xcode服务器上,本地构建很好.构建是正常的,否则测试成功并构建存档.最大的问题是警告堆会淹没项目可能产生的任何其他警告.
ios ×2
objective-c ×2
cocoa ×1
git ×1
gitpython ×1
iphone ×1
macos ×1
nsdocument ×1
python ×1
xcode ×1
xcode-bots ×1
xcode-server ×1
xcode4.2 ×1