xcode6-beta6

xcode 6 beta 7:A signed resource has been added modified or deleted.

南笙酒味 提交于 2020-01-12 04:44:06
问题 When I'm running the application on device aftercleaning, removing derived data, first time it runs without any issues. Second time when I'm trying to run, it say's "A signed resource has been added modified or deleted." On the simulator app run's without problem. I think it's because of extensions, I have editing, share and today extensions, when I'm deleting this extensions, then I can run second time without this message. The problem has been since from xcode 6 beta 5. Maybe issue related

Trying to use KeychainItemWrapper by Apple “translated” to Swift

本秂侑毒 提交于 2020-01-01 03:13:08
问题 Sigh, I have been working on this the whole afternoon... here is my nightmare: I am trying to use the KeychainItemWrapper made by Apple. But I "translated" its Objective-C codes to Swift: import Foundation import Security class MyKeychainItemWrapper: NSObject { var keychainItemData: NSMutableDictionary? var genericPasswordQuery: NSMutableDictionary = NSMutableDictionary() init(identifier: String, accessGroup: String?) { super.init() // Begin Keychain search setup. The genericPasswordQuery

Simulator and Storyboard Preview Difference

懵懂的女人 提交于 2019-12-24 08:45:07
问题 Currently, I'm using Xcode 6 Beta 6 for this thread. I have this single view application for iOS 8.0 and iPhone devices only. That single view have the value Inferred under the Attribute Inspector > Simulated Metrics . At first I didn't try to apply the Add Missing Constraints since I'm trying to layout the view to support a single layout both for 3.5" and 4" display. After running the current view - WYSIWYG on the simulator. That's fine and correct. When I tried to apply Add Missing

Missing argument for parameter #1 in call error for function with no params. Swift

这一生的挚爱 提交于 2019-12-18 13:59:19
问题 I am using xcode 6 beta 6 and I get this weird error for a function that has no params. Here is the function func allStudents ()-> [String]{ var appDel:AppDelegate = (UIApplication.sharedApplication().delegate as AppDelegate) var context:NSManagedObjectContext = appDel.managedObjectContext! var request = NSFetchRequest(entityName: "Student") request.returnsObjectsAsFaults = false //Set error to nil for now //TODO: Give an actual error. var result:NSArray = context.executeFetchRequest(request,

fatal error: NSArray element failed to match the Swift Array Element type

你离开我真会死。 提交于 2019-12-17 18:46:38
问题 Suddenly I'v started getting run time error as, fatal error: NSArray element failed to match the Swift Array Element type I'v declared my array as, var myArray : [CUSTOM_CLASS] = [CUSTOM_CLASS]() Now, in my server response success block I have, self.myArray = dicResponse["data"]! as Array println(self.myArray) // FATAL ERROR HERE Which was working perfect before upgrading to Xcode6 Beta6 FYI : dicResponse["data"]! // is verified as valid (Sorry to pointing wrong place before!) SOLVED : Dont

Domain=NSURLErrorDomain Code=-1001 “The operation couldn’t be completed. (NSURLErrorDomain error -1001.)”

妖精的绣舞 提交于 2019-12-09 20:11:20
问题 my program is write for upload the picture from the cam,sample code below: #define WEBSERVICE_URL @"http://192.168.0.104/upload.php" - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [picker dismissViewControllerAnimated:YES completion:^{ UIImage *selectedImage = [info objectForKey:UIImagePickerControllerOriginalImage]; NSData *imageData = UIImagePNGRepresentation(selectedImage); NSMutableURLRequest *request = [

Domain=NSURLErrorDomain Code=-1001 “The operation couldn’t be completed. (NSURLErrorDomain error -1001.)”

老子叫甜甜 提交于 2019-12-04 16:41:33
my program is write for upload the picture from the cam,sample code below: #define WEBSERVICE_URL @"http://192.168.0.104/upload.php" - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [picker dismissViewControllerAnimated:YES completion:^{ UIImage *selectedImage = [info objectForKey:UIImagePickerControllerOriginalImage]; NSData *imageData = UIImagePNGRepresentation(selectedImage); NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" URLString:WEBSERVICE_URL parameters:nil

Trying to use KeychainItemWrapper by Apple “translated” to Swift

本小妞迷上赌 提交于 2019-12-03 06:46:43
Sigh, I have been working on this the whole afternoon... here is my nightmare: I am trying to use the KeychainItemWrapper made by Apple. But I "translated" its Objective-C codes to Swift: import Foundation import Security class MyKeychainItemWrapper: NSObject { var keychainItemData: NSMutableDictionary? var genericPasswordQuery: NSMutableDictionary = NSMutableDictionary() init(identifier: String, accessGroup: String?) { super.init() // Begin Keychain search setup. The genericPasswordQuery leverages the special user // defined attribute kSecAttrGeneric to distinguish itself between other

Type 'AnyObject' does not conform to protocol 'SequenceType'

戏子无情 提交于 2019-11-30 07:19:44
问题 func loadThumbnails() { let paths = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true) let documentsDirectory:NSString = paths[0] as NSString var error:NSError? let fileManager = NSFileManager() let directoryContent:AnyObject = fileManager.contentsOfDirectoryAtPath(documentsDirectory, error: &error)! thumbnails = [QSPhotoInfo]() for item:AnyObject in directoryContent { let fileName = item as NSString if fileName.hasPrefix

Swift AnyObject is not convertible to String/Int

夙愿已清 提交于 2019-11-30 05:41:10
I want to parse a JSON to object, but I have no idea how to cast AnyObject to String or Int since I'm getting: 0x106bf1d07: leaq 0x33130(%rip), %rax ; "Swift dynamic cast failure" When using for example: self.id = reminderJSON["id"] as Int I have ResponseParser class and inside of it (responseReminders is an Array of AnyObjects, from AFNetworking responseObject): for reminder in responseReminders { let newReminder = Reminder(reminderJSON: reminder) ... } Then in Reminder class I'm initialising it like this (reminder as AnyObject, but is Dictionary(String, AnyObject)): var id: Int var receiver: