This project has moved and is read-only. For the latest updates, please go here.

SPGetCurrentUser data on iPhone

Jul 31, 2012 at 12:41 PM
Edited Jul 31, 2012 at 1:01 PM

Hi guys im building an IOS app for "a secret project" and i need some help. 

It seems like you cant get the data when your mobile. Im using really basic code to get it.


$(document).ready(function() {
var currentUser = $().SPServices.SPGetCurrentUser({
	fieldName: "Title",
	debug: true


I think I know whats the problem is, its going for the mobile version - so how to i get it not to?

Jul 31, 2012 at 12:49 PM

You may be right about the mobile version. You may need to write your own version of SPGetCurrentUser, as I haven;t focused on mobile.


Jul 31, 2012 at 1:02 PM

Would be cool if you did dough :-)

Well i´m trying to figur out some workaround maybe turning of the mobile version of Sharepoint can do the trick. I will return with the answer.

Jul 31, 2012 at 2:10 PM

Update: There seems to be different mobile version depending on which sharepoint ver. your using. I might have solved this problem but i will have to deal with it tomorrow. 

Dec 2, 2013 at 3:40 PM
sympmarc, I believe that the mobile Phone issue can be solved by just adding "&mobile=0" to the AJAX url .... this worked on iPhone... maybe consider wrapping this into your next version if you agree? I am on line 2299 of the jquery.SPServices-2013.01.js
// Get the UserDisp.aspx page using AJAX
        // Need this to be synchronous so we're assured of a valid value
        async: false,
        // Force parameter forces redirection to a page that displays the information as stored in the UserInfo table rather than My Site.
        // Adding the extra Query String parameter with the current date/time forces the server to view this as a new request.
        url: thisWeb + "/_layouts/userdisp.aspx?Force=True&mobile=0&" + new Date().getTime(),
        complete: function (xData) {
            thisUserDisp = xData;
Again thank you so much for your contribution...
Dec 2, 2013 at 3:53 PM
Interesting. I don't have a way to test this at the moment, but I can add it and make sure it doesn't cause any other issues.

Dec 2, 2013 at 3:54 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.