ios9

Cordova - window.history.back() not working on HTML back button in iOS 9

本小妞迷上赌 提交于 2019-11-27 21:39:55
In my application I am using window.history.back to navigate back to previous View Declaration of back button <div class="back_icon" id="verification_back_icon"><a href="#" data-rel="back" data-transition="slidedown"><img src="images/back_btn.png" width="23"/></a></div> Button action: $("#verification_back_icon").on("click", function(e) { if(checkDirtyVacation()) { e.preventDefault(); if(backbtnAlt== false) { backbtnAlt =true; confirm("All data will be lost. Do you want to continue?", function(r){ if(r){ //onBackKeyDown(); clearVacationvalues(); window.history.back();//this is not working in

HTTPS request in iOS 9 : NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)

久未见 提交于 2019-11-27 21:24:22
I'm updating my app to accommodate Apple's new ATS . Without any changes to the Plist-Info,the following code throws an error at sendSynchronousRequest() in a vanilla `iOS 9 simulator. NSURL *url =[NSURL URLWithString:@"https://Google.com"]; NSMutableURLRequest *request = [[NSMutableURLRequest alloc]init]; [request setHTTPMethod:@"GET"]; [request setURL:url]; NSURLResponse *urlResponse = nil; NSError *error = nil; NSData *reponse = [NSURLConnection sendSynchronousRequest:request returningResponse:&urlResponse error:&error]; Error: NSURLSession/NSURLConnection HTTP load failed

How to play mp3 audio from URL in ios swift

不羁岁月 提交于 2019-11-27 20:11:29
I am getting mp3 url as a response of api calling. I want to play that audio, so how can i do that? (ios swift) here is my response { content = "En este primer programa se tratar\U00e1n asuntos tan importante como este y aquel sin descuidar un poco de todo lo dem\U00e1s"; file = "http://radio.spainmedia.es/wp-content/uploads/2015/12/ogilvy.mp3"; image = "http://radio.spainmedia.es/wp-content/uploads/2015/12/tapas.jpg"; number = 0001; subtitle = Titulareando; title = "Tapa 1"; } here is my code:: @IBAction func btnplayaudio(sender: AnyObject) { let urlstring = "http://radio.spainmedia.es/wp

NSURLConnection deprecated in iOS9

烈酒焚心 提交于 2019-11-27 19:47:59
I want to download a file with a NSURLRequest and save it but in the line with the NSData * data = ... happens an error. NSURL *Urlstring = [NSURL URLWithString:@"http://yourdomain.com/yourfile.pdf"]; NSURLRequest *request = [NSURLRequest requestWithURL: Urlstring]; NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]; NSURL *documentsURL = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; documentsURL = [documentsURL URLByAppendingPathComponent:@"localFile.pdf"]; [data writeToURL

Remove duplicate structs in array based on struct property in Swift

烈酒焚心 提交于 2019-11-27 19:27:15
问题 I have made a simple struct and implemented the Equatable protocol : extension MyModelStruct: Equatable {} func ==(lhs: NModelMatch, rhs: NModelMatch) -> Bool { let areEqual = lhs.id == rhs.id return areEqual } public struct MyModelStruct { var id : String? var staticId : String? init(fromDictionary dictionary: NSDictionary){ id = dictionary["id"] as? String ... } Then in my project i get an array of [MyModelStruct], what i what to do is to remove all the MyModelStruct that have the same id

Facebook share content only shares URL in iOS 9

怎甘沉沦 提交于 2019-11-27 19:14:26
问题 Share FBSDKShareLinkContent with FBSDKShareDialog works fine in iOS 8 but fails to share imageURL , contentTitle , contentDescription on iOS 9 devices. The app is built with iOS 9 SDK, Xcode 7, Facebook SDK 4.7.0, all actions mentioned in Preparing Your Apps for iOS9 are done. The app is currently not available in App Store and Facebook app is in dev mode. The code to present the dialog is pretty common (Swift 2.0): let content = FBSDKShareLinkContent() content.contentURL = <URL to the app in

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

◇◆丶佛笑我妖孽 提交于 2019-11-27 19:08:28
问题 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=;

Clicking on NSURL in a UITextView

二次信任 提交于 2019-11-27 18:56:29
问题 I have a UITextView that spans 100.0 points across my UIView . In the UITextView , I have links that get captured with the following function: - (BOOL) textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange This works great to capture certain characters but I have one problem: if the link is the last characters in the text view, then the tap will get pressed all the way across that line. So if I have the text view with the following text where @test

Check if user has Facebook Messenger installed iOS 9

非 Y 不嫁゛ 提交于 2019-11-27 18:49:34
问题 Facebook has deprecated the method [FBSDKMessengerSharer messengerPlatformCapabilities] that is used to check if the user has Messenger app installed. In the warning message, it says: messengerPlatformCapabilities is deprecated: This is deprecated as of iOS 9. If you use this, you must configure your plist as described in https://developers.facebook.com/docs/ios/ios9 I would like to remove this method, but haven't found any other option to replace this code (that makes a button disabled if

Apple Live Photo file format

主宰稳场 提交于 2019-11-27 18:48:47
Apple will introduce Live Photo in iOS 9/iPhone 6s. Where is the file format documented? Here's the link . Otherwise, here's the text: Live Photos Live Photos is a new feature of iOS 9 that allows users to capture and relive their favorite moments with richer context than traditional photos. When the user presses the shutter button, the Camera app captures much more content along with the regular photo, including audio and additional frames before and after the photo. When browsing through these photos, users can interact with them and play back all the captured content, making the photos come