ios9

iOS9: canOpenURL returning false for WhatApp's url scheme

蹲街弑〆低调 提交于 2019-11-30 18:52:25
In my current project I need to share text on whatsapp from iOS app. Here is my code to share text on whatsapp:- NSURL *whatsappURL = [NSURL URLWithString:@"whatsapp://send?text=Hello%2C%20World!"]; if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) { [[UIApplication sharedApplication] openURL: whatsappURL]; } but canOpenURL always returning false in iOS9. Is there any iOS9 privacy policy ? Can anyone help me out. Thanks in advance. In iOS 9 you must whitelist any URL schemes your App wants to query in Info.plist under the LSApplicationQueriesSchemes key (an array of strings):

Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:],

不羁的心 提交于 2019-11-30 18:24:53
I am getting the following error in iOS9 only. Here is my code:- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; if ([[NSUserDefaults standardUserDefaults] objectForKey:@"login_dict"]) { if ([[NSUserDefaults standardUserDefaults] objectForKey:@"isLogout"] == nil || [[[NSUserDefaults standardUserDefaults] objectForKey:@"isLogout"] integerValue]== 0) { self.loginDict = [[BaseViewController sharedInstance] removeNullFromDictionary:[[NSUserDefaults

SKEmitterNode particleAction not working iOS9 Beta

时光总嘲笑我的痴心妄想 提交于 2019-11-30 17:38:03
问题 I'm testing my app in iOS9 Beta 4 and finding lots of code that used to work in iOS8 that is no longer performing as expected. Another example is SpriteKit's SKEmitterNode "particleAction" property. The following code worked in iOS8 but does not work on iOS9: // create the particle movement action SKAction *move = [SKAction moveByX:100 y:100 duration:5]; // also, I've tested several other SKActions, such as scaleBy, fade, rotate, to no effect here // create a target node and add to the

View aligned to top of keyboard appears in wrong place in iOS 9 Shortcut Bar only mode

邮差的信 提交于 2019-11-30 17:29:23
问题 iOS 9 adds a Shortcut Bar to the iOS 8 QuickType bar. As part of this change, if you connect a bluetooth keyboard to an iPad, the keyboard is in a minimized Shortcut Bar only mode (which can be simulated by pressing command-k in the simulator). I have code which gets the keyboard height using a method similar to the following: CGRect keyboardFrame = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; CGFloat keyboardHeight = keyboardFrame.size.height; // = 313 The problem is that

iOS 9 removed the possibility to change certain symbol colors using CSS

二次信任 提交于 2019-11-30 17:16:09
We've been using various symbols such as checkmarks (✔) on our website and just noticed that with the release of iOS 9, Safari and other browsers have been updated to not respect the color attribute. The same behaviour can be found in both Safari and Chrome on iOS 9. <div>test ✔</div> div { color: #ff0000; -webkit-appearance: none; } https://jsfiddle.net/afb14b2k/1/ The above example displays fine on other platforms (e.g. OS X). Is there a known workaround to get this to work on iOS 9? Edit: It appears that this only applies to certain variants of check marks (and other variants of symbols).

NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802) on a subdomain?

蹲街弑〆低调 提交于 2019-11-30 15:44:33
Our app is working fine on both our production and development environments but on our staging environment we get the common error: NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802) From my understanding this error occurs when you try to connect to a non https URL. We use ngrok for our local tunnel which has a https url and works fine. For production we also use https://ourdomain.com and it works fine. For staging we use https://staging.ourdomain.com and the error occurs. I've seen many solutions stating to do this: <key>NSAppTransportSecurity</key> <dict> <key

iOS 9 - keyup event not firing

自古美人都是妖i 提交于 2019-11-30 14:02:05
问题 Is anybody else having problems with the keyup event in iOS 9 not firing? Just a simple test bed replicates the issue for me. <input id="txtInput" /> Vanilla JS: document.getElementById('txtInput').onkeyup = function () { console.log('keyup triggered'); } jQuery: $('#txtInput').on('keyup', function () { console.log('keyup triggered'); }); Neither fire... 回答1: I suggest using the keypress event on browsers with touch screens. I know that you can't really detect touch screen screens, though, so

iOS 9 - NSUserActivity userinfo property showing null

筅森魡賤 提交于 2019-11-30 13:05:46
I had a quick question about NSUserActivity's userInfo property. NSString *activity = @"com.test.activity"; NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:activity]; userActivity.title = @"Test"; userActivity.keywords = [NSSet setWithArray:@[@"Test"]; userActivity.userInfo = @{@"location": location}; userActivity.eligibleForSearch = YES; self.userActivity = userActivity; [self.userActivity becomeCurrent]; I have the above snippet implemented in one of view controllers viewDidLoad(). When my item appears within spotlight search it calls the continueUserActivity

Find first element matching condition in Swift array (e.g. EKSource)

假如想象 提交于 2019-11-30 12:26:54
问题 I would like to find the first EKSource of type EKSourceType.Local with a "single"-line expression in Swift. Here is what I currently have: let eventSourceForLocal = eventStore.sources[eventStore.sources.map({ $0.sourceType }) .indexOf(EKSourceType.Local)!] Is there a better way of doing this (such as without mapping and/or with a generic version of find )? 回答1: There's a version of indexOf that takes a predicate closure - use it to find the index of the first local source (if it exists), and

Testing UIWebView with Xcode UI Testing

谁说我不能喝 提交于 2019-11-30 12:02:40
I'm using new Xcode UI Testing from XCTest Framework with the Xcode 7 GM . I've got an app with simple UIWebView (it's just a navigation controller + view controller with web view and button) and I want to check following scenario: Web View loads page www.example.com User taps on button Web View loads some page with URL: www.example2.com I want to check which page is loaded in UIWebView after pressing button. Is this possible with UI Testing right now? Actually I'm getting web view like this: let app:XCUIApplication = XCUIApplication() let webViewQury:XCUIElementQuery = app