我收到错误:
找不到文件
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications/iPhoneOSPackageTypes.xcspec
在检查Xcode 7的dir结构(在我的情况下为7.2)后,我发现路径中没有“Specifications”子目录。看起来Xcode已经改变了位置,或者它不再允许自定义包类型?
答案 0 :(得分:0)
我浏览了最初的iOSOpenDev安装wiki并找到了Xcode 7.2,发现我们可以手动创建目录并复制文件。最后,iOSOpenDev启动并运行Xcode 7.2:
以下是步骤:
0)正常安装iOSOpenDev并按照常规步骤操作。安装完成后,执行以下步骤1)和2)。
在此路径上创建规格DIR:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications
使用“规范DIR:
”下的文本编辑器创建以下文件 iPhoneOSPackageTypes.xcspec:
(
{
Type = PackageType;
Identifier = com.apple.package-type.mach-o-executable;
Name = "Mach-O Executable";
Description = "Mach-O executable";
DefaultBuildSettings = {
EXECUTABLE_PREFIX = "";
EXECUTABLE_SUFFIX = "";
EXECUTABLE_NAME = "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_VARIANT_SUFFIX)$(EXECUTABLE_SUFFIX)";
EXECUTABLE_PATH = "$(EXECUTABLE_NAME)";
};
ProductReference = {
FileType = compiled.mach-o.executable; Name = "$(EXECUTABLE_NAME)";
IsLaunchable = YES;
};
}
{
Type = PackageType;
Identifier = com.apple.package-type.mach-o-dylib;
Name = "Mach-O Dynamic Library";
Description = "Mach-O dynamic library";
DefaultBuildSettings = {
EXECUTABLE_PREFIX = "";
EXECUTABLE_SUFFIX = "";
EXECUTABLE_NAME = "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_VARIANT_SUFFIX)$(EXECUTABLE_SUFFIX)";
EXECUTABLE_PATH = "$(EXECUTABLE_NAME)";
};
ProductReference = {
FileType = compiled.mach-o.dylib;
Name = "$(EXECUTABLE_NAME)"; IsLaunchable = NO;
};
}
)
iPhoneOSProductTypes.xcspec:
(
{
Type = ProductType;
Identifier = com.apple.product-type.tool;
Class = PBXToolProductType;
Name = "Command-line Tool";
Description = "Standalone command-line tool";
IconNamePrefix = "TargetExecutable";
DefaultTargetName = "Command-line Tool";
DefaultBuildProperties = {
FULL_PRODUCT_NAME = "$(EXECUTABLE_NAME)";
EXECUTABLE_PREFIX = "";
EXECUTABLE_SUFFIX = "";
REZ_EXECUTABLE = YES;
INSTALL_PATH = "/usr/bin";
FRAMEWORK_FLAG_PREFIX = "-framework";
LIBRARY_FLAG_PREFIX = "-l";
LIBRARY_FLAG_NOSPACE = YES;
GCC_DYNAMIC_NO_PIC = NO;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
STRIP_STYLE = "all";
CODE_SIGNING_ALLOWED = YES;
ENTITLEMENTS_ALLOWED = YES;
MACH_O_TYPE = "mh_execute";
};
PackageTypes = (com.apple.package-type.mach-o-executable);
}
{
Type = ProductType; Identifier = com.apple.product-type.library.dynamic;
Class = PBXDynamicLibraryProductType;
Name = "Dynamic Library";
Description = "Dynamic library";
IconNamePrefix = "TargetLibrary";
DefaultTargetName = "Dynamic Library";
DefaultBuildProperties = {
FULL_PRODUCT_NAME = "$(EXECUTABLE_NAME)";
MACH_O_TYPE = "mh_dylib";
REZ_EXECUTABLE = YES;
EXECUTABLE_SUFFIX = ".$(EXECUTABLE_EXTENSION)";
EXECUTABLE_EXTENSION = "dylib";
PUBLIC_HEADERS_FOLDER_PATH = "/usr/include";
PRIVATE_HEADERS_FOLDER_PATH = "/usr/include";
INSTALL_PATH = "/usr/lib";
DYLIB_INSTALL_NAME_BASE = "$(INSTALL_PATH)";
LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)";
DYLIB_COMPATIBILITY_VERSION = "1";
DYLIB_CURRENT_VERSION = "1";
FRAMEWORK_FLAG_PREFIX = "-framework";
LIBRARY_FLAG_PREFIX = "-l";
LIBRARY_FLAG_NOSPACE = YES;
STRIP_STYLE = "debugging";
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
CODE_SIGNING_ALLOWED = YES;
};
PackageTypes = (com.apple.package-type.mach-o-dylib);
}
)
这应该可以解决问题。