java - Cordova passbook from restful response -
i building cordova application using cordova-plugin-passbook plugin, can seen here: https://github.com/passslot/cordova-plugin-passbook.
i trying consume pkpass our java server returning file expected if directly hit our service browser, problem need use auth token , go through our oauth server first. must request pass via ajax in front end using angular.
the data octet-stream , somehow need parse , work plugin above. plugin configured url ending in ".pkpass", wondering if can configured parsed data instead of url.
can see in src of plugin if there possible way that? not familiar objective c, trying think of options.
thanks
using cordova filetransfer plugin, got working:
filetransfer.download( uri, fileurl, function(entry) { passbook.downloadpass(fileurl); }, function(error) { alert('error retrieving pass, please try again in little while.'); }, true, { headers: { "authorization": "bearer " + ls.get( 'user_token' ) } } );
Comments
Post a Comment