1. #1
    Sencha User charris's Avatar
    Join Date
    Sep 2010
    Location
    Brooklyn, NY
    Posts
    106
    Vote Rating
    13
    charris will become famous soon enough

      0  

    Question Testing iPhone app wihout iphone (or simulator): Chrome user agent spoofing?

    Testing iPhone app wihout iphone (or simulator): Chrome user agent spoofing?


    Hi everyone,

    I have an app that makes frequent use of Ext.platform.isIPhoneOS to build an iPhone-specific UI. I see that this boils down to Ext.userAgent (which, I think, uses navigator.userAgent).

    I can't get Chrome to "spoof" an iPhone user-agent at the javascript level (i.e., navigator.userAgent); there is a --user-agent flag you can pass to chrome.exe, but it seems to only affect the HTTP headers.

    Does anyone have a clever way of doing iPhone testing via Chrome? I realize that ultimately it should be tested on an actual Apple device, but my employer hasn't provided any yet.

    Thanks!

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    chrome doesn't have all of the bells and whistles that mobile webkit for the iphone does.

    Are you using windows? If you're on a mac, you can use safari 5.x.

  3. #3
    Sencha User charris's Avatar
    Join Date
    Sep 2010
    Location
    Brooklyn, NY
    Posts
    106
    Vote Rating
    13
    charris will become famous soon enough

      0  

    Default


    Thanks Jay. Due to environment restrictions, I only have access to Windows for the time being. Would you recommend Safari for Windows over Chrome?

  4. #4
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    Good lord, no. heh. Apple products on windows are worse than microsoft products on the mac.

    Simply set it to true in your code for the time being.


    Ext.platform.isIPhoneOS = true;


    Just don't expect SenchaTouch be 100% accurate. :-\ There are things that mobilewebkit offer that chrome does not.

  5. #5
    Sencha User charris's Avatar
    Join Date
    Sep 2010
    Location
    Brooklyn, NY
    Posts
    106
    Vote Rating
    13
    charris will become famous soon enough

      0  

    Default


    Quote Originally Posted by jgarcia@tdg-i.com View Post
    Ext.platform.isIPhoneOS = true;
    And suddenly I feel really stupid... *face in palm*

    And since I've already embarrassed myself: mobilewebkit is just a webkit port that really only exists inside Mobile Safari (and maybe in Android), correct (hence the need for real testing in the iPhone Simulator or via an actual device)?

    Thanks

  6. #6
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    From my understanding its that + native touch event implementation (iOS -> webkit) and custom CSS3 transitions.

  7. #7
    Sencha User bclinton's Avatar
    Join Date
    Nov 2007
    Posts
    285
    Vote Rating
    9
    bclinton will become famous soon enough

      0  

    Default


    I've just started with Sencha Touch and after a lot of downloads and trial/error I've been using Chrome for development and testing too. I was hoping I might find a better suggestion or some alternatives in this thread, but maybe there aren't any better methods. Has anyone tried Android OS in a VM?

  8. #8
    Ext User
    Join Date
    Sep 2010
    Location
    Ireland
    Posts
    3
    Vote Rating
    0
    paddy2k is on a distinguished road

      0  

    Default


    From the kitchen sink example, Google Chrome (Ubuntu) seems to do the trick, however it's more of a iPad simulator than an iPhone one.

  9. #9
    Sencha User
    Join Date
    Sep 2010
    Posts
    20
    Vote Rating
    1
    mnjacobs is on a distinguished road

      0  

    Question API Documentation for Ext.platform.isIPhoneOS

    API Documentation for Ext.platform.isIPhoneOS


    I am just getting started with Sencha Touch. I would like to learn more about the suggested solution, but I am unable to find this in the Touch or the Ext API documentation.

    Should I be looking elsewhere?

    Thanks,
    Mike

  10. #10
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    481
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default


    Quote Originally Posted by mnjacobs View Post
    I am just getting started with Sencha Touch. I would like to learn more about the suggested solution, but I am unable to find this in the Touch or the Ext API documentation.

    Should I be looking elsewhere?

    Thanks,
    Mike
    The API has changed in version 0.94. All the supporting properties were moved to Ext.is namespace. Look here: http://dev.sencha.com/deploy/touch/docs/?class=Ext.is

Similar Threads

  1. Ipad Iphone Simulator
    By tomalex0 in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 8 Jan 2013, 10:28 PM
  2. Recognizing when app is stored on home screen? - iPhone
    By jamespaxi in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 28 Jul 2010, 3:39 PM
  3. Turning Sencha Touch-based app into a true native iPhone app?
    By inapp in forum Sencha Touch 1.x: Discussion
    Replies: 7
    Last Post: 21 Jul 2010, 5:59 PM
  4. ExtJS on iPhone
    By jsakalos in forum Community Discussion
    Replies: 25
    Last Post: 4 Apr 2010, 1:08 PM
  5. iPhone resize?
    By Judy in forum Community Discussion
    Replies: 5
    Last Post: 24 Feb 2009, 3:36 AM

Thread Participants: 6

Tags for this Thread