Reputation: 5247
I am writing iOS native client for a service that is written in Javascript. I have no prior experience with Javascript and URL session with javascript login, but assume I would be using the new JavascriptCore Framework Objective-C API for working with objects and functions. How can I authenticate to start the URL Session if the login functionality is in the .js file?
I have this info:
Javascript file: js/Applications/Html/HtmlLogin.js
WebService: /WebServices/Service.asmx/
Function: LoginUser
CodeFile: CallWeb.Membership.User
Function: GetUser
Upvotes: 0
Views: 192
Reputation: 94733
It does not look like your service is written in Javascript. Javascript is a client side scripting language (embedded in HTML). It looks like your service is written in .Net (based on the ".asmx" extension).
If you really want to continue to use javascript as the client code within the iOS app, I recommend you just do it as HTML in an embedded UIWebView. However, this might have a sub-par user experience. If you want to do it as a true native app, you need to figure out how the javascript is interacting with the web service, but reimplement it in Objective-C.
Upvotes: 1