ios10

How to pass access token to Alamofire?

旧时模样 提交于 2019-11-30 07:06:23
I am trying to pass access token in Alamofire but getting confuse in various methods around web. Below are methods which we need to use. let todosEndpoint: String = "https:url......." let headers = [ "Authorization": "Bearer \(token!)", "Content-Type": "application/X-Access-Token" ] let Auth_header = [ "Authorization" : tokenString! ] Alamofire.request(todosEndpoint, method: .get, parameters: nil, encoding: JSONEncoding.default, headers: Auth_header) .responseJSON { response in print("response.request \(response.request)") // original URL request print("response.response \(response.response)")

How to handle UserNotifications Actions in iOS 10

淺唱寂寞╮ 提交于 2019-11-30 05:30:00
So I am able to schedule notifications like so; //iOS 10 Notification if #available(iOS 10.0, *) { var displayDate: String { let dateFormatter = DateFormatter() dateFormatter.dateStyle = DateFormatter.Style.full return dateFormatter.string(from: datePicker.date as Date) } let notif = UNMutableNotificationContent() notif.title = "I am a Reminder" notif.subtitle = "\(displayDate)" notif.body = "Here's the body of the notification" notif.sound = UNNotificationSound.default() notif.categoryIdentifier = "reminderNotification" let today = NSDate() let interval = datePicker.date.timeIntervalSince

exc_bad_access in Facebook sdk login Xcode 8 beta

眉间皱痕 提交于 2019-11-30 05:15:51
recently I started adding my application IOS 10 features while I encountered a weird bug: When authenticating with facebook SDK via browser as soon as I click the confirmation button in facebook itself at the embeded browser, the app crashes. Unfortunately this bug is not informative, the console doesn't tell me anything about it and there is not call stack to see where this exception was occurred. Two points for demonstrating this bug cause: 1. This bug doesn't occur if the login is via System account but only when it in browser as you can see in the next photo: (As soon as I tap OK the

IOS HTML disable double tap to zoom

廉价感情. 提交于 2019-11-30 05:00:00
I am designing a website primarily focused on data entry. In one of my forms I have buttons to increment and decrement the number value in a form field quickly. I was using <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> to disable the zoom which appeared to work using the Firefox app for IOS. However, when another user tested it with Safari, clicking on the button too fast resulted in zooming in on the page, distracting the user and making it impossible to increase the value quickly. It appears that as of IOS 10

iOS 10.0 UIRefreshControl not showing indicator

时光怂恿深爱的人放手 提交于 2019-11-30 04:49:41
I am using a UITableView Which has a Pull down to refresh function but the spinner for pull down to refresh is not showing up when I call the [self.refreshControl beginRefreshing] The above code is called inside the viewDidLoad cause the table is loading some data initially. The spinner works fine if I perform a pull down to refresh after the initial refresh. The title shows up but not the spinner. Cant seem to solve this problem. It works fine on iOS 9.3.2 but not on iOS 10. Here is the code I am using currently. - (void)viewDidLoad { [super viewDidLoad]; [self setupView]; [self customSetup];

Debug Notification Extensions

余生颓废 提交于 2019-11-30 04:19:12
I'm building a set of Notification Extensions (Service/Content). I'm unable to connect to Xcode debugger or even log out to the device log or console. Is there any way to see any kind of output? Change the target to run the extension then select run and choose your app from the 'Choose an app to run:' window. I have tried as per brendan's Answer but is not working for me at all! I am getting below error in console Program ended with exit code: 0 Then after searching on google i have checked this answer . however this also not worked for me for while! Then i have tried same steps again as given

ios speech recognition Error Domain=kAFAssistantErrorDomain Code=216 “(null)”

青春壹個敷衍的年華 提交于 2019-11-30 04:13:20
Basically I am learning ios speech recognition module following this tutorial: https://medium.com/ios-os-x-development/speech-recognition-with-swift-in-ios-10-50d5f4e59c48 But when I test it on my iphone6, I always got this error: Error Domain=kAFAssistantErrorDomain Code=216 "(null)" I searched it on the internet, but find very rare info about this. Here is my code: // // ViewController.swift // speech_sample // // Created by Peizheng Ma on 6/22/17. // Copyright © 2017 Peizheng Ma. All rights reserved. // import UIKit import AVFoundation import Speech class ViewController: UIViewController,

How (and when) do I use iCloud's encodeSystemFields method on CKRecord?

廉价感情. 提交于 2019-11-30 03:51:27
encodeSystemFields is supposed to be used when I keep records locally, in a database. Once I export that data, must I do anything special when de-serializing it? What scenarios should I act upon information in that data? As a variation (and if not covered in the previous question), what does this information help me guard against? (data corruption I assume) encodeSystemFields is useful to avoid having to fetch a CKRecord from CloudKit again to update it (barring record conflicts). The idea is: When you are storing the data for a record retrieved from CloudKit (for example, retrieved via

Quicklook/QLPreviewController delegate methods are not calling in iOS 10 Xcode 8

懵懂的女人 提交于 2019-11-30 03:28:02
问题 Currently I am testing my current version in iOS10. I am using Xcode 8 beta 6 for testing. Here Quicklook/QLPreviewController delegate methods are not calling. This code set had been worked with XCode 7 and iOS 9.3 versions. I checked this issue in Apple Developer forum. But could not find a answer. Anyone have fixed this issue? (I am using Objective-C) How to use Quicklook/QLPreviewController in XCode 8 ( iOS 10 )? //----------------- SOLUTION for iOS 10 ( previewer as a subview) -----------

iPad Application shows app icon as launch screen in iOS 10

醉酒当歌 提交于 2019-11-30 03:01:53
In iPad iOS 10 Application shows app icon as launch screen / Splash screen if we don't provide any launch screen. I had not set any launch screen or image. And LaunchImage asset is blank. It looks weird. see Is it bug ? or feature? FYI Application is not in App Store it's enterprise app. I was also getting this issue in my app for iPad and I found solution of this. Solution: I added a launchscreen.xib in my app and select this file in to LaunchScreen section of 'General' section in target window. I did not add launch images of iPad devices, may be this is the reason of issue. So now this issue