ios9

iOS: limit app to 64-bit devices only

半世苍凉 提交于 2019-11-30 11:57:32
问题 According to the latest Apple WWDC, starting from ios 9 there should be a way to limit installing app only on 64 bit devices. I searched in XCode for this option but could not find anything. Is this already possible and if yes, how can i enable it? 回答1: In Xcode, set the following values: Build settings > Architectures Set to arm64 only. (click Other -> + and than enter arm64 ) Build settings > Valid architectures Set to arm64 only. Info.plist Set UIRequiredDeviceCapabilities to arm64 only.

iOS9 GoogleAnalytics and NSAppTransportSecurity

こ雲淡風輕ζ 提交于 2019-11-30 11:56:59
问题 I am running into trouble due to the new security opportunity from Apple's iOS9 to restrict ssl requests to any kind of servers. See reference: https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW33 Actually, I want to make use of the default and not allow any kind of connection NSAllowsArbitraryLoads: false <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <false/>

Screen zooms in when a Bootstrap modal is opened on iOS 9 Safari

家住魔仙堡 提交于 2019-11-30 11:47:02
问题 When I open a Bootstrap 3 modal on iOS9 Safari, the screen zooms in. It is working as expected on the Chrome app on iPhone. Below are the pictures which show the issue. Safari screenshot: Chrome screenshot(expected behavior): 回答1: The following code fixed the issue for me (and some other people -> see GitHub link): body { padding-right: 0px !important } .modal-open { overflow-y: auto; } Source: https://github.com/jschr/bootstrap-modal/issues/64#issuecomment-55794181 回答2: According to

NSURLErrorDomain Code=-1004 for few seconds after app start up

别说谁变了你拦得住时间么 提交于 2019-11-30 11:24:47
问题 I'm getting "NSURLErrorDomain Code=-1004" error with Alamofire API calls, but only for few seconds after app started (or took a rest for few minutes while the app's opened and make a call after that) If I try to make the same call after few seconds, everything works fine. I searched all the Stack Overflow questions and checked all the possible causes below: No problem with Internet connection "App Transport Security Settings" are correct and server's using https (I also tried

Set the application badge number in ios 9

久未见 提交于 2019-11-30 11:08:11
I'd used [UIApplication sharedApplication].applicationIconBadgeNumber = 5; for setting application badge number. It's not working in ios 9 alone. Can anyone suggest why? I tried, [[UIApplication sharedApplication] setApplicationIconBadgeNumber:5]; Hi You need to register UIUserNotificationSettings like this UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:nil]; [[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings];

How can I create UIStackView with variable spacing between views?

笑着哭i 提交于 2019-11-30 10:53:50
问题 I have a simple horizontal UIStackView with several UIViews stacked inside. My goal is to create variable spacing between views. I am well aware that I can create constant space between the subviews using "spacing" property. However my goal is to create variable space. Please note, if at all possible, I would like to avoid using invisible views that act as spacers. The best I came up with was to wrap my UIViews in a separate UIStackView , and use layoutMarginsRelativeArrangement = YES to

UIAlertController tint color defaults to blue on highlight

有些话、适合烂在心里 提交于 2019-11-30 10:49:41
I'm use the following code to present a UIAlertController action sheet with the item text as red. I've used the tint property to set the color. UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet]; alertController.view.tintColor = [UIColor redColor]; The text color seems to be defaulting to blue on highlight or selection. Is this normal and how do I stop this? This is a known Bug, see https://openradar.appspot.com/22209332 To fix it, reapply the tint color in the Completion handler. Here's my Swift

didReceiveRemoteNotification is not running when app is running (FOREGROUND)

爷,独闯天下 提交于 2019-11-30 09:55:48
问题 I have a strange case. My swift ios app is connected to Cloudkit. If the app is NOT running (background state), I receive my notifications badge and alert just fine, every time! If the app is running, no notifications are received! I know it is not hitting the remote because I do this: 1. Adding a breakpoint to the didReceiveRemoteNotification event 2. Running xcode in a plugged iphone 3. NSLog("detected didReceiveRemoteNotification"), so final code look like this func application(application

Cannot change WKWebView's scroll rate on iOS 9 beta / 9.3

送分小仙女□ 提交于 2019-11-30 09:25:54
On iOS 8, the below code works fine, it can scroll with more inertia. webView.scrollView.decelerationRate = UIScrollViewDecelerationRateNormal; As for iOS 9 beta 3, this code is meaningless, even without an error. Is this a bug or are there any other ways around? Note: UIWebView's scroll rate can be changed two types on both versions. Hekod Update: this has been fixed but not deployed in iOS 9.3 (see workaround below). More detail here: https://bugs.webkit.org/show_bug.cgi?id=148086 http://trac.webkit.org/changeset/188541/trunk/Source/WebKit2/UIProcess/ios/WKScrollView.mm I had the same issue

Install app on iOS without Apple Developer Program (Xcode 7)

戏子无情 提交于 2019-11-30 09:20:34
On June 8th, Apple announced that with Xcode 7, everyone would be able to install any apps they develop on their devices without an Apple Developer Program Certificate. The Apple Developer website says you only need to log in with your Apple ID. I already did that on Xcode, but every time I try to run an app on my iPad, this happens: I've been looking through the Apple Developer website on any instructions on how to do this, but I have not found anything. Does anyone know how to solve this problem? Thanks! If you've previously enrolled in the Safari Developer Program you may find yourself to