我正在重新发布我的iPhone应用程序,现在我的UIManagedDocument上的executeFetchRequest获取了一个SQLite错误代码:6922.我搜索了互联网,没有SQLite错误代码6922.任何人都看到这个.使用Xcode 7,一切都运行良好.
我可以在不更新Mac操作系统的情况下安装xcode 8.3,即"OS X El Capitan"(版本10.11.6)
我无法在Apple的网站上找到任何参考,但是,这个链接说我做不到.
现在,我安装了Xcode 8.2.1.
我在Xcode 8 beta 1中遇到了Core Data的困难.旧的应用程序将编译并运行良好,但所有新应用程序编译并运行正常,直到尝试插入新的NSManagedObject.
最初我认为它与错误地删除旧的xcdatamodel并重新构建另一个有关,但在制作一个全新的应用程序并制作一个简单的实体"A"之后,我无法在运行时创建类A的对象.
我试过使用let a = A(context: myMOC)哪个返回错误:
类"MyApp.A"的NSManagedObject必须具有有效的NSEntityDescription.
尝试旧的let a = NSEntityDescription.insertNewObject(forEntityName: "A", into: context) as! A返回错误:
无法将"NSManagedObject_A_"(0x7fd114626f80)类型的值转换为"MyApp.A"(0x10d2fdf28).
我已经检查了我的xcdatamodel十几次,以确保我拼写正确的一切,并创建了一个新项目进行测试,以确保我没有在设置CD时出错.思考?
更新: xcdatamodel包内容是这样的:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11147.23" systemVersion="16A201w" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
<entity name="Coordinate" syncable="YES" codeGenerationType="class">
<attribute name="latitude" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/>
<attribute name="longitude" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/>
<relationship name="route" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Route" inverseName="coordinates" inverseEntity="Route" syncable="YES"/>
</entity>
<entity name="Route" syncable="YES" codeGenerationType="class">
<attribute name="uuid" optional="YES" attributeType="String" syncable="YES"/>
<relationship name="coordinates" …Run Code Online (Sandbox Code Playgroud) 我的目标是创建一个执行clang格式的扩展.我的代码看起来像这样:
- (void)performCommandWithInvocation:(XCSourceEditorCommandInvocation *)invocation completionHandler:(void (^)(NSError * _Nullable nilOrError))completionHandler
{
NSError *error = nil;
NSURL *executableURL = [[self class] executableURL];
if (!executableURL)
{
NSString *errorDescription = [NSString stringWithFormat:@"Failed to find clang-format. Ensure it is installed at any of these locations\n%@", [[self class] clangFormatUrls]];
completionHandler([NSError errorWithDomain:SourceEditorCommandErrorDomain
code:1
userInfo:@{NSLocalizedDescriptionKey: errorDescription}]);
return;
}
NSMutableArray *args = [NSMutableArray array];
[args addObject:@"-style=LLVM"];
[args addObject:@"someFile.m"];
NSPipe *outputPipe = [NSPipe pipe];
NSPipe *errorPipe = [NSPipe pipe];
NSTask *task = [[NSTask alloc] init];
task.launchPath = executableURL.path;
task.arguments = …Run Code Online (Sandbox Code Playgroud) 在我安装Xcode 8并将项目转换为Swift 3之前,以下行很好.现在转换后它看起来像这样:
let valueData:Data = Data(bytes: UnsafePointer<UInt8>(&intVal), count: sizeof(NSInteger))
Run Code Online (Sandbox Code Playgroud)
它显示错误
模糊地使用'init'
它在Swift 3中有什么问题?怎么解决?
最近,我已将我的Xcode升级到版本8,我的控制台中出现了一些奇怪的错误,如下所示:
Painter Z index: 1023 is too large (max 255)
Painter Z index: 1023 is too large (max 255)
Painter Z index: 1023 is too large (max 255)
Painter Z index: 1023 is too large (max 255)
Painter Z index: 1023 is too large (max 255)
ERROR /BuildRoot/Library/Caches/com.apple.xbs/Sources/VectorKit_Sim/VectorKit-1228.30.7.17.9/GeoGL/GeoGL/GLCoreContext.cpp 1763: InfoLog SolidRibbonShader:
ERROR /BuildRoot/Library/Caches/com.apple.xbs/Sources/VectorKit_Sim/VectorKit-1228.30.7.17.9/GeoGL/GeoGL/GLCoreContext.cpp 1764: WARNING: Output of vertex shader 'v_gradient' not read by fragment shader
Run Code Online (Sandbox Code Playgroud)
任何专家都知道如何处理它?
先谢谢你.
问题是,在XCode 8中构建Swift应用程序时,源文件会快速编译,但Copying Swift标准库会占用蛋糕 - 相位可以运行几分钟(通常整个构建大约需要4-5分钟,最坏的情况是慷慨地超过10分钟 - 曾经不到一分钟).
此外,存档导出的签名阶段非常缓慢,有时需要接近半小时(再次,过去非常快).
我已经在网上搜索了几天的答案,重新安装了XCode无数次,尝试了新的Swift工具链,尝试打开/关闭Sierra的iCloud Drive(衍生文件夹仍然需要隐藏起来),尝试了每个构建设置,任何人,和他们的母亲一起推荐,做了许多新的空白项目,并失去了所有希望......
所以我的问题是,我怎样才能使它正常?
编辑:我的Mac钥匙串中还有867个 Apple ID密钥(相同数量的pub-s和priv-s,以及附带的证书)- 这个问题是否有可能与它有关?需要大量时间来完成它们并找到正确的签名?
此代码不再适用于Swift 3.
imageData = NSData(base64EncodedString: mediaFile, options: NSDataBase64DecodingOptions.fromRaw(0)!)
Run Code Online (Sandbox Code Playgroud)
这是一个.
imageData = NSData(base64EncodedString: mediaFile, options: .allZeros)
Run Code Online (Sandbox Code Playgroud) 首先,我想声明没有bitcode,一切都很完美.当我打开应用程序中的"bitcode"标志时,问题就出现了.
此外,所有构建都是通过CI流(不是手动在xcode-> archive et.al中).
该框架是在与应用程序本身分开的流程中构建的(该应用程序嵌入了编译的框架)
当我尝试打包ipa时,我收到此错误:
❌ld:bitcode bundle无法生成,因为'..../Framework.framework/Framework'是在没有完整bitcode的情况下构建的.bitcode的所有框架和dylib必须从Xcode Archive或Install build for architecture armv7生成
❌clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)
关于框架:
我正在使用以下命令构建框架:(省略技术细节)
# iphone (arm)
xcodebuild -configuration Release -sdk iphoneos CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
# iphone (simulator)
xcodebuild -configuration Release -sdk iphonesimulator CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
Run Code Online (Sandbox Code Playgroud)
然后脂肪(FAT二进制)
lipo -create /Release-iphonesimulator/Framework.framework/Framework -output /Universal/Framework.framework/Framework
Run Code Online (Sandbox Code Playgroud)
我已经将编译器标志添加到框架中以"嵌入bitcode"
我甚至"验证"它有其他所有问题的bitcode :( 编译启用了bitcode的iOS库)
另外,检查二进制文件是否包含bitcode的最简单方法是使用otool和grep:
otool -l binary_name | grep __LLVM
你会看到一个或多个segname __LLVM条目,如果它有bitcode或空输出,如果没有.
otool -arch arm64 -l Frameworks/Framework.framework/Framework | grep __LL
segname __LLVM
segname __LLVM
Run Code Online (Sandbox Code Playgroud)
我还尝试了添加编译标志的其他变体
xcodebuild OTHER_CFLAGS="-fembed-bitcode"
Run Code Online (Sandbox Code Playgroud)
并报告给我相同的错误
在以下环境中:
Xcode 8.3.2
react-native-cli 2.0.1
react-native: 0.44.0
macOS Sierra 10.12.5
Run Code Online (Sandbox Code Playgroud)
刚刚更新了Xcode和macOS以运行React Native并像我几天前一样继续练习...但是每次我尝试运行时:
react-native run-ios
Run Code Online (Sandbox Code Playgroud)
我得到错误:
Scanning 555 folders for symlinks in /Users/juangarcia/projects/react-tests/CountDown/node_modules (6ms)
Found Xcode project CountDown.xcodeproj
Could not find iPhone 6 simulator
Run Code Online (Sandbox Code Playgroud)
我尝试查看可用设备的列表,然后得到:
~/projects/react-tests/CountDownSample » xcrun simctl list devices
== Devices ==
-- iOS 10.3 --
-- tvOS 10.2 --
Apple TV 1080p (323FA90C-0366-4B5B-AEEE-D0477C61762A) (Shutdown)
-- watchOS 3.2 --
Apple Watch - 38mm (F42C0C0D-325B-41DD-948D-E44B0A08B951) (Shutdown)
Apple Watch - 42mm (75D8BAF1-27CB-47EE-9EE3-D400B962F8BC) (Shutdown)
Apple Watch Series 2 - 38mm (64D01BD4-5C37-4885-A73A-52479D9CCF4F) (Shutdown) …Run Code Online (Sandbox Code Playgroud) xcode8 ×10
ios ×7
swift3 ×4
xcode ×3
swift ×2
base64 ×1
bitcode ×1
build ×1
clang-format ×1
core-data ×1
macos-sierra ×1
nsdata ×1
nstask ×1
react-native ×1
sqlite ×1
uiimage ×1
xcodebuild ×1