ios9

App Orientation in iOS9 Split View

无人久伴 提交于 2019-12-08 07:35:48
问题 I'm looking at how my app will run in Split View on an iPad Pro. I use constraints for layout, but sometimes I want to know the window orientation in order to tweak the layout by modifying a couple of constraints. Things are easy to handle if the user rotates the device (I handle the call of viewWillTransitionToSize), but the app has to know its initial orientation. Until now, I have been using the status bar orientation to determine the device orientation: UIInterfaceOrientation o = [

SKEmitterNode iOS 9 GM problems

一个人想着一个人 提交于 2019-12-08 06:45:18
问题 This is the code I used in iOS 8 to get the particle to appear: func onCollision() { let explosion = SKEmitterNode(fileNamed: "rocketExplosion") explosion.position = rocket.position explosion.zPosition = 100 addChild(explosion) } Worked fine for iOS 8 but not for iOS 9. I've read that there were problems with the particle emitters in the beta, are they still the same in GM version? Also, I tried this after a "Swift 2" tutorial but no luck: if let explosion = SKEmitterNode(fileNamed:

Can't hide status bar in AVPlayerViewController's portrait mode

不问归期 提交于 2019-12-08 06:15:06
问题 I'm developing an app that first presents a UICollectionView with a bunch of buttons that modally open a subclass of AVPlayerViewController with a custom "Over Full Screen" segue. UIViewControllerBasedStatusBarAppearance is set to YES in my Info.plist. Here's a small (had to zoom out, sorry) screenshot of all the view controllers in Interface Builder: The segue was defined in IB. When the user taps a collection view cell, I use performSegueWithIdentifier() to, well, perform the segue. The

In-app purchase receipt verification for auto renewal using AFNetworking objective-c

一曲冷凌霜 提交于 2019-12-08 06:13:16
问题 I am writing below code using AFNetworking for receipt verification and it gives me status=210002 While it gives me status=0 in NSMutableURLRequest please help me by getting solution NSString *strurl = @"https://sandbox.itunes.apple.com/verifyReceipt"; NSData *receipt = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]]; NSDictionary *parameter=@{ @"receipt-data" : [receipt base64EncodedStringWithOptions:0], @"password" : @"xxxxxxxxxxxxxxxxxxxx", }; NSData *jsonParam =

No solution for Transport Security?

回眸只為那壹抹淺笑 提交于 2019-12-08 04:21:42
问题 I have tried all the methods of here for solving the problem of: "Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file." But if I try for example adding this in my plist file: <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>www.myserver.com</key> <dict> <!--Include to allow subdomains--> <key>NSIncludesSubdomains</key> <true/> <!--Include to allow

Using the fontWithSize API with San Francisco

二次信任 提交于 2019-12-08 03:08:09
问题 The new San Francisco fonts in iOS 9 are optimized for the size it will be used at, by adjusting tracking and dynamically switching between SF Display and SF Text. It was noted in the WWDC session #804 developers should not use San Francisco by attempting to initialize a UIFont using fontWithName , for example: UIFont *originalFont = [UIFont systemFontOfSize:11]; UIFont *newFont = [UIFont fontWithName:originalFont.fontName size:44]; This is because the system cannot optimize the font for the

SKAction.playSoundFileNamed not working in iOS 9

血红的双手。 提交于 2019-12-08 02:55:44
问题 I think I've got my game working almost the same as it was before iOS 9 came along... I have included the entire function, but the only thing I am having a problem with is the sound effect at the beginning of the function: func collisionHappened() { let bangSoundEffect = SKAction.playSoundFileNamed("Bang.mp3", waitForCompletion: false) runAction(bangSoundEffect) //nothing happens here let defaults = NSUserDefaults() let highscore = defaults.integerForKey("highscore") if (score > highscore){

Error in HealthKit: Error Domain=com.apple.healthkit Code=100 “Failed to open database” UserInfo= {NSLocalizedDescription=Failed to open database}

依然范特西╮ 提交于 2019-12-08 01:39:15
问题 We're getting an error on a certain few devices when trying to authorize with the HealthKit API. The call to [HKHealthStore requestAuthorizationToShareTypes:::] fails consistently with the following error and the system-generated "Allow access to Health App" modal never gets presented: Error Domain=com.apple.healthkit Code=100 "Failed to open database" UserInfo= {NSLocalizedDescription=Failed to open database} We have a device that is able to reproduce this consistently, even after force

How can we disable the effect of enabled “bold text” from settings in the iphone (in my app)? - swift 2.0

依然范特西╮ 提交于 2019-12-07 23:43:32
问题 If the user’s device has bold text enabled there are certain parts of the system that will automatically respond to that. For example, if you are using a default navigation controller in your app, the title and the UIBarButtonItem at the top of the screen will become bold. How can I disable the effect of bold text to all my app and specially to the default navigation controller ( to the title and the UIBarButtonItem ) in my app ? - swift 2.0 ( iOS 8 & 9 ) . thx all : ) I have this code to

navigator.geolocation.getCurrentPosition no longer working in Safari mobile after iOS9 update

只愿长相守 提交于 2019-12-07 23:14:45
问题 I have a web app that has this code for getting the user's coordinates: if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { But the moment I updated to iOS9 it ceased to work. I'm not even getting the Safari prompt anymore asking permission to get my location. Anyone else having this issue after updating to iOS9 and was able to resolve it? 回答1: I've noticed this myself and i'm wondering if iOS 9 Webkit has started to prevent this working via HTTP as I