ios10

iOS 10 Custom URL Scheme no longer working

只愿长相守 提交于 2019-12-25 08:31:51
问题 I have an app with a custom URL scheme set up, and I added the URL to the LSApplicationQueriesSchemes array in the Info.plist. If I go straight into Safari on the device or simulator and hit myapp:// then the app will open up. However, I have an externally hosted website with a servlet that calls response.redirect("myapp://") and when this is called, the app does not open. The servlet redirect works in iOS 9 and below. What changed in iOS 10 so that this call no longer works? It's odd that if

Can't set URLRequest Authorization Header

若如初见. 提交于 2019-12-25 08:07:22
问题 Since swift 3 update I change my requests from NSMutableURLRequest to URLRequest. After that all my requests stopped worked due invalid credentials problem. Already tried and search everything. My service continue same as before and tested my requests from a request simulator and went fine. let url : NSString = "http://url.service.com/method?param=\(name)" as NSString var request = URLRequest(url: URL(string: url.addingPercentEscapes(using: String.Encoding.utf8.rawValue)!)!) request

NSDate which is returned is incorrect

白昼怎懂夜的黑 提交于 2019-12-25 08:03:20
问题 I am build a function to get the date for the Chinese new year from the date which is passed from a datePicker. the convertDateFormater converts a string formatted date to a date object. the date which i get back is Returned date = "03-Feb-2030" for the year "1970-05-22" but if i run the current date with "NSDate() as Date" i get the right output. for the year 2016. func convertDateFormater(date: String) -> Date { let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd"/

OAuth2 for MapMyRun using Swift 3

…衆ロ難τιáo~ 提交于 2019-12-25 05:14:20
问题 I'm trying to get user to authenticate my app to work with his data stored on MapMyRun(https://developer.underarmour.com/apps/myapps). Here is my code: let oauth2 = OAuth2CodeGrant(settings: [ "client_id": "asdasdasd", "client_secret": "asdasdasd123", "authorize_uri": "https://www.mapmyfitness.com/v7.1/oauth2/uacf/authorize/?client_id=asdasdasd&response_type=code&redirect_uri=http://localhost.mapmyapi.com:12345/callback", "token_uri": "https://api.mapmyfitness.com/v7.1/oauth2/access_token/",

OAuth2 for MapMyRun using Swift 3

半腔热情 提交于 2019-12-25 05:14:07
问题 I'm trying to get user to authenticate my app to work with his data stored on MapMyRun(https://developer.underarmour.com/apps/myapps). Here is my code: let oauth2 = OAuth2CodeGrant(settings: [ "client_id": "asdasdasd", "client_secret": "asdasdasd123", "authorize_uri": "https://www.mapmyfitness.com/v7.1/oauth2/uacf/authorize/?client_id=asdasdasd&response_type=code&redirect_uri=http://localhost.mapmyapi.com:12345/callback", "token_uri": "https://api.mapmyfitness.com/v7.1/oauth2/access_token/",

How to change button title from table static cells?

China☆狼群 提交于 2019-12-25 04:57:14
问题 I have HomeViewController that's segued modally to a Navigation Controller with an identifier of: pickSubjectAction And on SubjectPickerTableViewController is where my subjects to choose. This is my code import UIKit class SubjectPickerTableViewController: UITableViewController { var subjects:[String] = [ "English", "Math", "Science", "Geology", "Physics", "History"] var selectedSubject:String? { didSet { if let subject = selectedSubject { selectedSubjectIndex = subjects.index(of: subject)! }

Cordova app can't connect with Dynamics NAV Web-Service (ODATA) after update to iOS 10

那年仲夏 提交于 2019-12-25 04:28:26
问题 We are developing an app with Cordova that syncs information with an ODATA Web-Service made available by a Microsoft Dynamics NAV 2013 Middle tier. Under Android there is no problem with the connection and under iOS 8 and 9 it works as well. On Devices using iOS 10 the connection does not work and returns a HTTP 400 Bad Request error. The connection has the following structure (this is test code, works on Android and iOS 8 and 9, but not on iOS 10) var xreq = new XMLHttpRequest(); xreq.open(

How to ask for remote permission in iOS 10/Swift 3

旧街凉风 提交于 2019-12-25 04:27:39
问题 I want to ask the user for permissions (remote and local notifications, camera and audio) from a separate viewController. The viewcontroller will be presented during the onboarding process, and never again. How can I ask for permissions to display remote notifications outside the AppDelegate? My question is not how to trigger them, but how to make sure that the AppDelegate is "responsible" for handling them once a permission have been granted. Current code in AppDelegate import UIKit import

Unable to run app created in xcode on iPhone

99封情书 提交于 2019-12-25 04:24:48
问题 I want to learn IOS development and so I installed xcode and tried running my first app on my iPhone. I'm using xcode 8 beta 6 and my iPhone is running the latest beta of IOS 10. I have an Apple ID as a developer account, but I'm not part of the Apple Developer program, for which you have to pay. I have selected my iPhone under "Device" and when I click the play button I get "build failed" and the following error messages: Signing for "My First Project" requires a development team. Select a

My app only work in background ios 10

若如初见. 提交于 2019-12-25 04:24:31
问题 I have ios app ( phonegap ) , the idea of my app to detect if there is headsrt , record and play audio , the problem of my app its only work in background . When I click record button when the app in foreground , its did not do any thing , but when I press home button and go to back ground , every thing work . Also I have put test button , when I click it , it should alert u with message , the message not appear only if I press home button and then come back to foreground . Please note it was