Even use cookie is possible to make an mobile application, but the server should provide api to verify username and password and return cookie value for this session. And the mobile then set the cookie for following requests.
I give it a sample for iOS platform.
// set cookie storage NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways]; CDVPluginResult * result = nil; NSString *appUrl = [command.arguments objectAtIndex:0]; NSString *appCookie = [command.arguments objectAtIndex:1]; if (appUrl != nil && [appUrl length] > 0 && appCookie != nil && [appCookie length] > 0) { NSArray *cookieArray = [appCookie componentsSeparatedByString:@";"]; for (NSString *cookieItem in cookieArray) { NSMutableDictionary *cookieDict = [NSMutableDictionary dictionary]; NSRange range = [cookieItem rangeOfString:@"connect.sid="]; if (range.location != NSNotFound){ NSString *cookieValue = [cookieItem substringFromIndex:(range.location + range.length)]; //domainCookie = [cookieItem stringByAppendingString:domainRapidApps]; //[cookieDict setObject:domainCookie forKey:NSHTTPCookieValue]; NSURL *url = [NSURL URLWithString:[appUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSString *domain = [url host]; // set cookie [cookieDict setObject:@"connect.sid" forKey:NSHTTPCookieName]; [cookieDict setObject:cookieValue forKey:NSHTTPCookieValue]; [cookieDict setObject:domain forKey:NSHTTPCookieDomain]; [cookieDict setObject:@"/" forKey:NSHTTPCookiePath]; [cookieDict setObject:@"0" forKey:NSHTTPCookieVersion]; NSHTTPCookie *cookie = [NSHTTPCookie cookieWithProperties:cookieDict]; [cookieStorage setCookie:cookie]; } }