ios8

CloudKit Push Notification, App running on background

夙愿已清 提交于 2019-12-05 12:45:16
When iOS8.2-app is running in the background, it does not receive any push notification, while if it is running on the foreground, it receives the push notifications fine. Any idea what is going on ? Running on CloudKit Development mode, the subscription is for add,edit,and remove, and using the following didReceiveRemoteNotification : -(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { NSLog(@"Push received."); NSDictionary * apsDict = [userInfo objectForKey:@"aps"];

How to dismiss two UIViewControllers in iOS 8?

不羁岁月 提交于 2019-12-05 12:34:14
I am working on iPhone application using Objective C. As I need to dismiss two UIViewControllers at once, so I am using below code : [self.presentingViewController.presentingViewController dismissViewControllerAnimated:YES completion:nil]; This code is working fine in iOS6 and iOS7, but it is not working in iOS8. I have checked by using breakpoint, my ViewController viewDidLoad and viewWillAppear method is calling but my view is not loading at all, so as an output, I am getting blank white screen. Can anyone please help me that for iOS8, how can I solve this problem, should I need to use

UIAutomation test invocation from the command line with Xcode 6

隐身守侯 提交于 2019-12-05 12:25:45
Running UIAutomation tests from the command line seems to break often with new Xcode releases (judging by past posts). Having never used the command line scripting for this, I found this post from 2012: Automation Instrument from the Command Line . The Problem: My command returns without error, without output results and without anything logged to the system console. The simulator does not even launch! Checking some of the paths for updates (notably, the Automation trace instrument path), I came up with this command. Note the path in the first parameter (it's different than in past Xcode

Swift: Keyboard Observer via NSNotificationCenter doesn't work

半城伤御伤魂 提交于 2019-12-05 12:25:36
I'm trying to implement a simple keyboard observer in my iOS 8 Swift app but it really doesn't work. This is the code im currently using: override func viewDidAppear(animated: Bool) { NSNotificationCenter().addObserver(self, selector: Selector(keyboardWillAppear()), name: UIKeyboardWillShowNotification, object: nil) NSNotificationCenter().addObserver(self, selector: Selector(keyboardWillHide()), name: UIKeyboardWillHideNotification, object: nil) } override func viewDidDisappear(animated: Bool) { NSNotificationCenter().removeObserver(self) } func keyboardWillAppear() { logoHeightConstraint

XCode 6 verificationController.m issues

痞子三分冷 提交于 2019-12-05 12:02:32
I am using VerificationController.m provided by Raywenderlich for validating receipts for in ap purchase. It is working fine for XCode5 but in XCode6 it is giving number of errors. probably due to C++ code like: Missing Code for Method declaration @end must appear in objective-c context Conflicting types for 'checkReiptSecurity' can anyone tell me what is needed to be done ? Edit : Here are errors screenshot Have you fixed this? I was running in to the exact same problem so I'll leave my fix here for anyone that comes looking. It turns out in newer versions of Xcode you aren't allowed to put C

iOS8 issue - UIView drawRect is not called

心不动则不痛 提交于 2019-12-05 12:00:19
I have a very simple UIView , that is only drawing a triangle. It implements a UIView drawRect method that is drawing a figure. It is working fine on iOS7, but when I run the same code on iOS8 it is not even called. Any ideas what has changed on iOS8? My code in nutshell: @interface MyView : UIView @end @implementation MyView - (instancetype)init { self = [super init]; if (self) { self.backgroundColor = [UIColor clearColor]; } return self; } - (void)drawRect:(CGRect)rect { // draw things } @end myView = [MyView new]; [self addSubview:myView]; Update My view hierarchy: UIViewController View-

Objective C- iCal not creating custom calendar and new event to it in iOS 9

故事扮演 提交于 2019-12-05 11:52:03
This working perfectly in iOS 8. But creating issue in iOS 9.Here is code : self.eventManager.eventStore requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) { if (granted) { // Create a new calendar. EKCalendar *calendar = [EKCalendar calendarForEntityType:EKEntityTypeEvent eventStore:self.eventManager.eventStore]; // Set the calendar title. calendar.title = @"<APP name>"; calendar.CGColor=APP_Blue_COLOR.CGColor; // Find the proper source type value. for (int i=0; i<self.eventManager.eventStore.sources.count; i++) { EKSource *source = (EKSource *)[self

Error creating LLDB target at path, Xcode 6 GM seed

和自甴很熟 提交于 2019-12-05 11:30:13
I'm getting this error whenever I build in Xcode 6 GM Seed. It seems to be making my app insanely slow. What exactly does this mean and how do I fix it? I had the following error: Warning: Error creating LLDB target at path '.....'- using an empty LLDB target which can cause slow memory reads from remote devices. PS : im not able to run my app, its stuck on the splash screen There is a thread in the Apple Developer Forum, https://devforums.apple.com/message/1010068#1010068 that describes how to diagnose this issue. I had his issue for Xcode 6 GM Seed, specifically - Version 6.0.1 (6A317). This

iOS 8 share extension and authentication flows

给你一囗甜甜゛ 提交于 2019-12-05 11:06:27
问题 I have an iOS 8 share extension for posting content from a web browser. Users need to be prompted to login if they've never logged in via the containing app. Pinterest appears to support fast-switching to the containing app (I'm assuming they've implemented a share extension). iOS documentation suggests that only Today extensions can open containing apps. Is there a way to fast-switch to the containing app via a share extension for authentication? 来源: https://stackoverflow.com/questions

Moving a modally presented UIViewController up when keyboard appears on iPad with iOS8

妖精的绣舞 提交于 2019-12-05 11:02:42
I've got a UIViewController inside of a UINavigationController, presented modally on an iPad with iOS8. I'm using self.myNavController.modalPresentationStyle = UIModalPresentationFormSheet; Within my view controller, I have a text field. Because of the UI design of the view controller, when the user taps in the text field, and the keyboard appears, I need to move the view controller up on the screen. On iOS7, I had been animating a change to self.myNavController.view.superview.frame.origin in order to move the view controller up, and back down. This worked well. However, on iOS8, this is no