ios8

xcodebuild - codesign -vvvv says“resource envelope is obsolete”

自古美人都是妖i 提交于 2019-12-17 21:52:44
问题 I've just updated my xcode install to use xcode 6.0.1 in order to start compiling my app for ios8 devices. For some reason I am not able to ever sign the app file correctly that is generated using the following: xcodebuild -project GrantM/GrantM.xcodeproj -configuration Release it compiles the code and appears to be fine, but running: /usr/bin/codesign --verify -vvvv GrantM/GrantM.app give me: Program /usr/bin/codesign returned 1 : [GrantM/GrantM.app: resource envelope is obsolete] Codesign

Override a setter in swift

纵饮孤独 提交于 2019-12-17 20:56:08
问题 I've got a strange problem with setter in swift. I've got class PlayingCard with code: var rank: NSInteger { get{ return self.rank } set(rank){ self.rank = rank } } var suit: NSString { get{ return self.suit } set(suit){ self.suit = suit } } init(suit: NSString, rank: NSInteger) { super.init() self.suit = suit self.rank = rank } I use this init() method in another class, and implementation looks like this: init() { super.init(cards: []) for suit in PlayingCrad.validSuit() { var rank: Int = 0

UIAlertView automatic newline gone in iOS8?

本小妞迷上赌 提交于 2019-12-17 20:39:43
问题 It appears that UIAlertView is not compatible with iOS8. I've just discovered that all my multiline UIAlertViews become truncated one-liners in iOS8 (for the message). In iOS7 they are displayed correctly with multilines. iOS7: iOS8: [[[UIAlertView alloc] initWithTitle:@"Namn saknas" message:@"Du måste fylla i ditt namn för att kommentera" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil] show]; I'm aware of that UIAlertController should be used in iOS8 and later and that

iOS 8 [UIApplication sharedApplication].scheduledLocalNotifications empty

吃可爱长大的小学妹 提交于 2019-12-17 20:20:01
问题 i'm trying to update my app to iOS 8. In a function i schedule a local notification (i've already checked that firedate and all other parts of the notification are right) in this way: [[UIApplication sharedApplication] scheduleLocalNotification:localNotification]; then i use this code to print the scheduled local notification: NSLog(@"notifications %@", [UIApplication sharedApplication].scheduledLocalNotifications ); but the array [UIApplication sharedApplication].scheduledLocalNotifications

How can I pause and resume NSTimer.scheduledTimerWithTimeInterval in swift?

南楼画角 提交于 2019-12-17 19:32:45
问题 I'm developing a game and I want to create a pause menu. Here is my code: self.view?.paused = true but NSTimer.scheduledTimerWithTimeInterval still running... for var i=0; i < rocketCount; i++ { var a: NSTimeInterval = 1 ii += a delaysShow = 2.0 + ((stimulus + interStimulus) * ii) var time3 = NSTimer.scheduledTimerWithTimeInterval(delaysShow!, target: self, selector: Selector("showRocket:"), userInfo: rocketid[i], repeats: false) } I want time3 to pause the timer when player click pause menu

iPhone app compiled with Xcode 6 on runs as Universal on iPad

喜欢而已 提交于 2019-12-17 19:31:53
问题 I have got an app developed for iPhone family only, and I used to run it on iPad to test how it will look on iPhone 4s (since it launched with iPhone 4s resolution, size, and else '2x' round button for fullscreen support). However, now when I run it on my iPad with iOS 8, Xcode ignores all build settings and runs it as for iPad. My storyboard constraints were not projected for iPad screen. I have: Devices option set to iPhone on General tab in project settings Main storyboard file name and

How do I set up a mirroring session between iOS 8 and Yosemite?

有些话、适合烂在心里 提交于 2019-12-17 19:27:28
问题 On OS X Yosemite, the screen of an iOS 8 device can be mirrored to the OS X machine and saved as a media file. This can be done manually using QuickTime Player, but I want to do the same programatically. Reading the docs, the iOS 8 device should be exposed as a webcam. Calling [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo] on my Mac returns an NSArray with no elements. How can I setup a mirroring session using iOS 8 and Yosemite? How can I detect the capture device for the mirroring

What is the best way to detect orientation in an app extension?

假装没事ソ 提交于 2019-12-17 18:53:14
问题 What is the best way to detect a device's orientation in an application extension? I have had mixed results with solutions I've found on here: How to detect Orientation Change in Custom Keyboard Extension in iOS 8? Get device current orientation (App Extension) I have looked at size classes and UITraitCollection and found that the device inaccurately reports that it is in portrait when it is in fact in landscape (not sure if this is OS bug, or I am not querying the right APIs the right way).

How to Pass information Back in iOS when reversing a Segue using Swift?

淺唱寂寞╮ 提交于 2019-12-17 18:48:07
问题 I have two view controllers, One and Two. I go from VC One to VC Two. On VC Two, I select some data that I store in an array. When I press the "Back" button on the navigation bar, I would like to send that array back to VC One. What's the best way to do this using Swift & Storyboards? Thanks! 回答1: If you were presenting a modal view with Done and Cancel buttons (sort of like a picker), grabbing the value during an unwind segue method would probably be the easiest. Given that you want to use

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