ios9

the behavior of the UICollectionViewFlowLayout is not defined, because the cell width is greater than collectionView width

懵懂的女人 提交于 2019-11-27 18:43:25
2015-08-18 16:07:51.523 Example[16070:269647] the behavior of the UICollectionViewFlowLayout is not defined because: 2015-08-18 16:07:51.523 Example[16070:269647] the item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right values. 2015-08-18 16:07:51.524 Example[16070:269647] The relevant UICollectionViewFlowLayout instance is , and it is attached to ; animations = { position=; bounds.origin=; bounds.size=; }; layer = ; contentOffset: {0, 0}; contentSize: {1024, 770}> collection view layout: . 2015

Xcode7 | Xcode UI Tests | How to handle location service alert?

…衆ロ難τιáo~ 提交于 2019-11-27 18:32:15
I am writing UI Test Cases for one one of my app using the XCUIApplication, XCUIElement and XCUIElementQuery introduced in Xcode7/iOS 9. I have hit a road block. One of the screens in test case requires iOS's Location Services. As expected the user is prompted about allowing use of location service with alert titled: Allow “App name” to access your location while you use the app? with Allow & Don't Allow buttons. Problem is or so it seems that since the alert is presented by OS itself it is not present in Application's element sub-tree. I have logged following: print("XYZ:\(app.alerts.count)")

How to reliably detect if an external keyboard is connected on iOS 9?

淺唱寂寞╮ 提交于 2019-11-27 18:21:58
Previous to iOS 9, the most reliable method of determining whether an external keyboard is connected was to listen for UIKeyboardWillShowNotification and make a text field the first responder, as discussed in this question . The notification would fire when using the virtual keyboard, but would not fire when using an external keyboard. However this behavior has now changed with iOS 9. UIKeyboardWillShowNotification also fires when an external keyboard is connected, since the new keyboard toolbar is now shown. It is still possible to detect the keyboard height and make a judgement whether it is

XPC connection interrupted in Xcode 7 for iOS 9

僤鯓⒐⒋嵵緔 提交于 2019-11-27 18:16:57
I recently updated to Xcode 7 and upgraded my iPhone to iOS 9. I have developed and released an iOS app that had worked perfectly fine on the latest version of iOS 8 and Xcode 6. Upon trying to go through the process of updated the app for iOS 9 support, I am getting the most ridiculously strange error that has left me baffled. I have done all the syntax corrections automatically through Xcode, and now my app builds properly. It even runs fine at first. I have a button that segues to a view controller with a WebView. This view controller loads a link that will display either an image, website,

sendAsynchronousRequest was deprecated in iOS 9, How to alter code to fix

谁说胖子不能爱 提交于 2019-11-27 17:58:15
Below is my code I am getting the issue with: func parseFeedForRequest(request: NSURLRequest, callback: (feed: RSSFeed?, error: NSError?) -> Void) { NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue.mainQueue()) { (response, data, error) -> Void in if ((error) != nil) { callback(feed: nil, error: error) } else { self.callbackClosure = callback let parser : NSXMLParser = NSXMLParser(data: data!) parser.delegate = self parser.shouldResolveExternalEntities = false parser.parse() } } } This is now deprecated as of iOS 9, and is telling me to use dataTaskWithRequest instead.

How to delete app Build in New iTunes Connect Site?

泪湿孤枕 提交于 2019-11-27 17:55:37
I want to upload my app's new version on iTunes connect , but I can't submit it as I mention here . Now I want to delete uploaded build and upload new build with save version, but I get an error as shown in the screenshot. Find Solution Here you can't delete old uploaded build.you have to upload new build with new build(+1) version. hmdeep You can't delete old uploaded build: you have to upload new build with a new build version (== Bundle version in plist ). For example, if your current build version is 1.3, archive & upload a new build with an incremented build version like 1.3.1: You cannot

Detect if app is running in Slide Over or Split View mode in iOS 9

寵の児 提交于 2019-11-27 17:50:34
In iOS 9, is it possible to detect when an app is running in iOS 9's Slide Over or Split View mode? I've tried reading through Apple's documentation on iOS 9 multitasking, but haven't had any luck with this… I ask because I might have a feature in my app that I'd like to disable when the app is opened in a Slide Over. Tamás Zahola Just check if your window occupies the whole screen: BOOL isRunningInFullScreen = CGRectEqualToRect([UIApplication sharedApplication].delegate.window.frame, [UIApplication sharedApplication].delegate.window.screen.bounds); If this is false, then you're running in a

Unable to lock orientation on iPad Air 2

狂风中的少年 提交于 2019-11-27 17:35:58
问题 The iOS application I am working on has a view that needs to be locked in landscape orientation. Up to this point, that was accomplished by using the shouldAutorotate and supportedInterfaceOrientations methods, but on an iPad Air 2 running iOS9 beta5 , these methods never fire and the orientation is not locked. I have tried on the following devices, methods fired on all except the Air2 (running debug with Xcode beta6): iPhone 6+, iPad Mini, iPad Air 2, iPad 2, iPad 3 The methods not firing

iOS9: Try to open app via scheme if possible, or redirect to app store otherwise

两盒软妹~` 提交于 2019-11-27 17:27:13
My question is about iOS9 only! I have an HTML landing page, and I try to redirect the user to my app via URL scheme if the app is installed, or redirect to the Appstore otherwise. My code is: document.addEventListener("DOMContentLoaded", function(event) { var body = document.getElementsByTagName('body')[0]; body.onclick = function () { openApp(); }; }); var timeout; function preventPopup() { clearTimeout(timeout); timeout = null; window.removeEventListener('pagehide', preventPopup); } function openApp(appInstanceId, platform) { window.addEventListener('pagehide', preventPopup); document

Check if location services are enabled

北慕城南 提交于 2019-11-27 17:26:06
I've been doing some research about CoreLocation. Recently, I encountered a problem that has been covered elsewhere, but in Objective C, and for iOS 8. I feel kinda silly asking this, but how can you check if location services are enabled using swift, on iOS 9? On iOS 7 (and maybe 8?) you could use locationServicesEnabled() , but that doesn't appear to be working when compiling for iOS 9. So how would I accomplish this? Thanks! Add the CLLocationManagerDelegate to your class inheritance and then you can make this check: Swift 1.x - 2.x version: if CLLocationManager.locationServicesEnabled() {