ios9

ios9 self signed certificate and app transport security

蓝咒 提交于 2019-12-10 17:33:36
问题 I've spent a while trying to get this working. I have an API that I'm connecting to that i'm trying to switch to SSL with self signed certificates. I have control on the server and app. I generated a self signed cert according to this: https://kyup.com/tutorials/create-ssl-certificate-nginx/ sudo openssl genrsa -des3 -out ssl.key 2048 sudo openssl req -new -key ssl.key -out ssl.csr sudo cp ssl.key ssl.key.orig & sudo openssl rsa -in ssl.key.orig -out ssl.key sudo openssl x509 -req -days 365

UITextView height according to content is wrong in iOS 9

痴心易碎 提交于 2019-12-10 17:32:24
问题 I adding views dynamically in to scrollview with layout constraint by programatically, For text view component I wanted to set the height constraint according to text set in textview, so I did created class extending UITextView. Inside text view class I have written following code to adding height constraint. #import "CETextView.h" @implementation CETextView - (void)layoutSubviews { [super layoutSubviews]; if (!self.heightConstraint) { self.heightConstraint = [NSLayoutConstraint

How to dynamically share data between MyAppUITests and the MyApp target?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 17:04:40
问题 Within MyAppUITests I can pass some parameters to MyApp in following way: app.launchEnvironment = ["my_param": "value"] app.launch() This is visible for MyApp and I can read this: if let value = NSProcessInfo.processInfo().environment["my_param"] { //do sth with value } But this is how I can set it up BEFORE I launch the app. For some reason, I need to change "my_param" on runtime AFTER I launch the app. Any suggestions? I would appreciate any help. Why do I need to do it for? I need "my

UIPopoverPresentationController should have a non-nil sourceView or barButtonItem set before the presentation occurs on iOS 9

一曲冷凌霜 提交于 2019-12-10 16:23:58
问题 I'm trying to show a popup using a custom UIPopoverPresentationController class. But it crashes with the error (<UIPopoverPresentationController: 0x7a772950>) should have a non-nil sourceView or barButtonItem set before the presentation occurs. Below is my button click code where the crash occurs. - (IBAction)showPopup:(UIButton *)sender { ViewController *contentViewController = [[ViewController alloc] init]; contentViewController.preferredContentSize = CGSizeMake(200, 200);

Can't run app on device: iOS 9 frameworks won't codesign

流过昼夜 提交于 2019-12-10 16:16:17
问题 I'm updating an app with deployment target iOS 7 so it can work with iOS 9. Also, I'm adding some cool iOS 8 and 9 features. I've read a lot of article about backwards version compatibility and now that Swift 2.0 makes it easier. The things I've taken care of so far are: Having the Base SDK set at iOS 9 and the deployment target set at version 7 Checking the version at runtime with if #available(iOS 9.0, *) when using the new APIs Linking the only-iOS9 frameworks optionally, as seen here: As

UIDocumentMenuViewController crashes on iPad but not on iPhone

▼魔方 西西 提交于 2019-12-10 16:14:36
问题 Presenting a UIDocumentMenuViewController to be able to load file into app. On iPhone it works, but not on iPad. Using iOS9. Any idea what is wrong? dmvc = UIDocumentMenuViewController(documentTypes: ["public.data"], inMode: .Import) dmvc!.delegate = self dmvc!.popoverPresentationController?.sourceView = addSongButton self.presentViewController(dmvc!, animated: true, completion: nil) 2016-06-07 09:45:45.256 Memorise[2994:977408] the behavior of the UICollectionViewFlowLayout is not defined

Play facebook videos in ios application

雨燕双飞 提交于 2019-12-10 16:04:33
问题 I want to embed Facebook videos in my app. I am getting video links from a webservice. For example: "video_url": "https://www.facebook.com/urdutimes.ca/videos/520665921438799/" Is it possible to embed this video in native iOS app using Objective-C? Thanks in advance 回答1: Try this one: NSURL *url = [NSURL URLWithString:@"https://www.facebook.com/urdutimes.ca/videos/520665921438799/"]; MPMoviePlayerViewController *mp = [[MPMoviePlayerViewController alloc] initWithContentURL:url]; mp.moviePlayer

iOS 9 / Xcode 7: SKSpriteNode spriteNodeWithImageNamed not working on some devices

戏子无情 提交于 2019-12-10 15:38:50
问题 I am having problems to load a image from a .xcassets imageset for a SKSpriteNode. While it worked fine on iOS 8.x with [SKSpriteNode spriteNodeWithImageNamde:imageName] it doesn't work on some devices on iOS 9. For example it works on iPhone 6/6 Plus and iPad Air but not on the iPod Touch 5G. Works on all devices with iOS 8.x but not on all devices (for example iPod Touch 5g) on iOS 9.x (Xcode 7, Xcode 7.1 Beta 3): SKSpriteNode *background = [SKSpriteNode spriteNodeWithImageNamed:@

UIDatePicker not displaying properly in iOS 9

橙三吉。 提交于 2019-12-10 15:24:05
问题 I am NOT using auto layouts and this is how the UIDatePicker is appearing in my app on iOS 9. The picker is looking flawless in iOS 8 but the problem is only with iOS 9. Any idea how to resolve this.. (P.S using auto layouts in not a solution at the moment for me.) 回答1: In the viewDidLoad() method, change a property of the date picker, for example the mode. Note that, You don't have to leave it changed, you can set it to anything and then change it back to what you actually want. I am sure,

AVPlayer / AVPlayerLayer not appearing in subview using auto layout

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 15:17:28
问题 I'm trying to display a video inside of a subview which contains the video and some text. I used the recommended UIView subclass from Apple to create a UIView to contain my AVPlayer: import Foundation import AVFoundation class JSAVPlayerView : UIView { var player:AVPlayer? { get { return (self.layer as! AVPlayerLayer).player } set(newPlayer) { (self.layer as! AVPlayerLayer).player = newPlayer } } override class func layerClass() -> AnyClass { return AVPlayerLayer.self } } I used