@PathVariable String applicationVersionId, UserAgentInfo userAgentInfo) throws TokenException {
checkRequiredEntity(applicationVersionService, Long.valueOf(applicationVersionId));
String sessionId = request.getSession(false).getId();
SingleUseToken token = new SingleUseToken(sessionId);
singleUseTokenRepository.putToken(token);
int index = request.getRequestURL().indexOf(request.getServletPath());
String newContext = "/ios/downloadIOSPlist/" + applicationVersionId + "/" + token.getSessionIdHash();
StringBuffer url = request.getRequestURL().replace(index, request.getRequestURL().length(), newContext);
applicationController.subscribeUserAndCreateStatistic(Long.valueOf(applicationVersionId), request);
String itmsURL = "itms-services://?action=download-manifest&url=" + url.toString();