到目前为止,我一直在努力解决这个问题.我有我的Xcode Swift项目及其github存储库用于源代码控制.我想用这个项目创建一个新的CocoaPod.
我已经浏览了CocoaPods文档,但是到目前为止还没有任何工作,我现在真的很困惑,有人可以按照我需要做的步骤编写步骤来从现有的Xcode项目中创建新的pod,该项目已经有一个Github存储库链接到它.
提前致谢!
我搜索过去几个小时但尚未找到答案.我实现了一个AVFoundation摄像头,我将图像数据保存到磁盘并仅存储核心数据中的路径.一切正常,但在随机拍摄照片后,我收到此错误:
CoreData:错误:严重的应用程序错误.在Core Data更改处理期间捕获到异常.这通常是NSManagedObjectContextObjectsDidChangeNotification的观察者中的错误. - [__ NSDate localizedCaseInsensitiveCompare:]:无法识别的选择器发送到实例
这是我的获取请求代码:
NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"Photo"];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"notebook = %@", notebookItem];
[request setPredicate:predicate];
request.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"dateTaken"
ascending:NO
selector:@selector(compare:)]];
Run Code Online (Sandbox Code Playgroud)
以下是我将数据保存在单独的类中的方法:
//I create a photo Object to save to core data and set properties like dateTaken and tittle
//Here is where I create the path name
NSDate *dateString = [[NSDate alloc] init];
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSS"];
NSString *path = [formatter stringFromDate:dateString];
//Now I save to disk
NSArray …Run Code Online (Sandbox Code Playgroud) core-data objective-c avfoundation ios unrecognized-selector