6 Replies Latest reply on Jun 13, 2016 9:34 AM by laurels19031048

    Had PhoneGap working on iPhone - Now it isn't

    laurels19031048

      Really hard simplifying my question without putting in a lot of detail

      Basically - I had working examples (tutorial and own example) using my iPhone and laptop, and now I can't get any working examples

      Also I sat with a friend and tried to get working examples with his iPhone and laptop and we couldn't manage to do that either.

       

      .... Details

      This is my laptop setup

      My Machine Setup.png

       

      * A few months back (maybe January or February?) I downloaded and installed PhoneGap Developer on laptop

      (Desktop Version PhoneGap v0.2.0)

       

       

      and the Phonegap app on my iPhone (can't find anything that indicates a version number)

       

      iphoneAppSettingPhoneGap.PNG

       

      I used these two tutorials to install

      http://docs.phonegap.com/getting-started/1-install-phonegap/desktop/

      http://docs.phonegap.com/getting-started/2-install-mobile-app/

       

       

      * Then, using the following tutorials, I learned how to create a sample project, and also do a little html editing and get another project working. These first tests were successful

       

       

      http://docs.phonegap.com/getting-started/3-create-your-app/desktop/

      http://docs.phonegap.com/getting-started/4-preview-your-app/desktop/

       

       

      * In mid-May, still using the same desktop  - Desktop Version PhoneGap v0.2.0 - and iPhone versions , I was successful in loading a sample app that I had created and tested on my browser, as I've been learning to work with JavaScript, CSS and HTML5. This test was somewhat successful. The app connected and ran, one of the buttons worked and I was able to click on and change some images as I had on my laptop version.

       

      This was a sample app that I had also put into a posting on Blogger. I had external file links working for my images and my java script code. I was pretty pleased!

       

      I went back to working on just learning these new-to-me languages

       

      * This last week I had another sample app working on my laptop, and via Blogger. I went to test it on my iPhone. I was still using the same desktop (Desktop Version PhoneGap v0.2.0 )  and iPhone versions, with which I'd previously had success. I haven't done any new software installations on my laptop that I can recall.

       

      * I got this alert on my iPhone

      AlertOnPhone.PNG

       

      Of course I did a lot of retrying, triple and quadruple checking of the local url I need to connect to, quitting and restarting apps, restarting my laptop, my iPhone. I restarted our in home wifi.

       

      I tried it again the next day. The problem continued.

       

      * I then attempted to recreate a project from the original tutorial links (shown above). I got the same error.

       

      * I consulted this faq

      http://docs.phonegap.com/references/developer-app/troubleshoot-faq/#phonegap-developer-app -is-unable-to-download-from-the-server

       

      When I got to the ping stage, I got suspicious. Sitting down with the troubleshooting faq  list above, and a friend at a Starbucks, we made sure that both our laptops and iPhones were using the same network. We used the 'Google Starbucks' network shown in the screenshot below.

       

      We then tried pinging both of our iPhones, as directed by the faq. Though we were able to ping DNS and the Router, we were not able to ping either of our phones using the IP Address shown in our WiFi views (WiFi settings view below)

       

      We searched and found out that we should not expect to be able to ping our iPhones

      http://stackoverflow.com/questions/9863333/is-there-a-way-to-ping-an-iphone-to-see-if-its- turned-on

       

      At this point we realized that the faq we were using for resolving PhoneGap problems was oriented towards Windows machines. Succeeding suggestions refer to Windows.

       

      *We then tried downloading the current version of PhoneGap -ver 0.3.3 - and each had unsuccessful Installations. I went back to my old version. My friend just got disgusted!

       

      *AT this point he suggested I'd be better off considering using a different UI Framework!

       

      However we both like what we've learned about PhoneGap so far, and  I'm suspicious that there is something obvious and basic that we are both not realizing we should be doing.

       

      Ideas?

      NetworksAtStarbucks.PNG

       

       

       

       

       

       

       

      (*Ping Logs shown below)

       

       

       

       

      PhoneGap Desktop ver 0.3.3 - newer one

       

       

      * pinging google server - DNS server

       

       

      Laurels-MacBook-Pro-2:~ laurelshimer$ ping 8.8.8.8

      PING 8.8.8.8 (8.8.8.8): 56 data bytes

      64 bytes from 8.8.8.8: icmp_seq=0 ttl=54 time=13.045 ms

      64 bytes from 8.8.8.8: icmp_seq=1 ttl=54 time=13.209 ms

      64 bytes from 8.8.8.8: icmp_seq=2 ttl=54 time=13.225 ms

      64 bytes from 8.8.8.8: icmp_seq=3 ttl=54 time=13.316 ms

      64 bytes from 8.8.8.8: icmp_seq=4 ttl=54 time=14.086 ms

      64 bytes from 8.8.8.8: icmp_seq=5 ttl=54 time=10.847 ms

      64 bytes from 8.8.8.8: icmp_seq=6 ttl=54 time=12.943 ms

      64 bytes from 8.8.8.8: icmp_seq=7 ttl=54 time=13.224 ms

      64 bytes from 8.8.8.8: icmp_seq=8 ttl=54 time=13.334 ms

      64 bytes from 8.8.8.8: icmp_seq=9 ttl=54 time=13.843 ms

      64 bytes from 8.8.8.8: icmp_seq=10 ttl=54 time=10.724 ms

      64 bytes from 8.8.8.8: icmp_seq=11 ttl=54 time=12.992 ms

      ^C

      --- 8.8.8.8 ping statistics ---

      12 packets transmitted, 12 packets received, 0.0% packet loss

      round-trip min/avg/max/stddev = 10.724/12.899/14.086/0.998 ms

      Laurels-MacBook-Pro-2:~ laurelshimer$

       

       

      ping 172.31.98.1

       

       

      Laurels-MacBook-Pro-2:~ laurelshimer$ ping 172.31.98.1

      PING 172.31.98.1 (172.31.98.1): 56 data bytes

      64 bytes from 172.31.98.1: icmp_seq=0 ttl=63 time=3.588 ms

      64 bytes from 172.31.98.1: icmp_seq=1 ttl=63 time=1.077 ms

      64 bytes from 172.31.98.1: icmp_seq=2 ttl=63 time=3.701 ms

      64 bytes from 172.31.98.1: icmp_seq=3 ttl=63 time=3.744 ms

      64 bytes from 172.31.98.1: icmp_seq=4 ttl=63 time=3.760 ms

      64 bytes from 172.31.98.1: icmp_seq=5 ttl=63 time=7.891 ms

      64 bytes from 172.31.98.1: icmp_seq=6 ttl=63 time=0.922 ms

      ^C

      --- 172.31.98.1 ping statistics ---

      7 packets transmitted, 7 packets received, 0.0% packet loss

      round-trip min/avg/max/stddev = 0.922/3.526/7.891/2.137 ms

      Laurels-MacBook-Pro-2:~ laurelshimer$

       

       

      Laurels-MacBook-Pro-2:~ laurelshimer$

       

       

      Trying laurels phone (again)

      Laurels-MacBook-Pro-2:~ laurelshimer$ ping 172.31.98.197

      PING 172.31.98.197 (172.31.98.197): 56 data bytes

      Request timeout for icmp_seq 0

      Request timeout for icmp_seq 1

      Request timeout for icmp_seq 2

      Request timeout for icmp_seq 3

      Request timeout for icmp_seq 4

      Request timeout for icmp_seq 5

      Request timeout for icmp_seq 6

      ^C

      --- 172.31.98.197 ping statistics ---

      8 packets transmitted, 0 packets received, 100.0% packet loss

      Laurels-MacBook-Pro-2:~ laurelshimer$

       

       

       

       

      NOW TRYING D'R'S phone - it does not respond either

       

       

      8 packets transmitted, 0 packets received, 100.0% packet loss

      Laurels-MacBook-Pro-2:~ laurelshimer$ ping 172.31.98.217

      PING 172.31.98.217 (172.31.98.217): 56 data bytes

      Request timeout for icmp_seq 0

      Request timeout for icmp_seq 1

      Request timeout for icmp_seq 2

      Request timeout for icmp_seq 3

      Request timeout for icmp_seq 4

      Request timeout for icmp_seq 5

      Request timeout for icmp_seq 6

      Request timeout for icmp_seq 7

      Request timeout for icmp_seq 8

      ^C

      --- 172.31.98.217 ping statistics ---

      10 packets transmitted, 0 packets received, 100.0% packet loss

      Laurels-MacBook-Pro-2:~ laurelshimer$

        • 1. Re: Had PhoneGap working on iPhone - Now it isn't
          kerrishotts Adobe Community Professional

          A few thoughts:

           

          1. You're on someone else's network when trying to ping your phone. It's entirely possible that the network itself is configured to prevent local access. Try on your own local network that you control (which may be an issue if you're out and about, but adhoc wifi should do in a pinch, and personal hotspot also works). Also make sure that your laptop's firewall is properly configured to allow communications from your phone to the port you're serving from.
          2. Where in the world did that ' ") ' come from in the DNS settings? Did you override the DNS, or did that come from the network itself?
          3. What installation failure did you have with PhoneGap Desktop 0.3.3? 0.2.0 is really old at this point.
          4. If you have automatic updates turned on, you probably have the most recent version of PhoneGap Developer, which is 1.7.0. I wouldn't necessarily expect this to work with PG Desktop 0.2.0. If not, and you get 0.3.3 working, I'd definitely upgrade to match
          5. Please share your steps to starting the app in PG Desktop & the URL you were using to connect with in PhoneGap Developer.
          6. You could try installing PhoneGap CLI and using "phonegap serve" on the desktop side. It works with the developer app too.
          7. Remind your friend that PhoneGap is not a UI framework. ;-)

           

          Hope that helps some?

          • 2. Re: Had PhoneGap working on iPhone - Now it isn't
            laurels19031048 Level 1

            Thanks for the getting started list! Actually I was the one who identified PGap as a Ui framework. I found it listed that way in a posting on the web, so I thought that I had learned something I would sound smart about.

             

            What class of thing is PGap, Kerri, if it's not a UI framework?

             

            OK, I need to work on the things you said to do now.

            • 3. Re: Had PhoneGap working on iPhone - Now it isn't
              laurels19031048 Level 1

              Hummmm this is another one for the Unexplained Bugs List

               

              After reading Kerrishotts list...

              I thought before I reinstalled the newer version of PhoneGap, I would try the old one (I"m using that older developer version mentioned above) one more time, just to capture a little more history/screen shots. Note - am working on this with my in-home wifi. I have repeated this basic test several times over the past week or so,

               

              Bet you can guess what happened next. Yes, I got three examples to connect fine on my phone - well some facets didn't work exactly correctly - but it definitely connected, image up and put my desktop app up on my iPhone.

               

              I would guess it was something about our home wifi being restarted, except that on Wednesday, I had the same problems with the wifi at Starbucks when study partner and I tried this most basic test on our iPhones before we tried pinging etc.  We had also tried recreating the most basic of samples and all. Always the same alert on both our iPhones.

               

              The only thing I did before the test was to turn my phone off and on, and stop and start the PhoneGap app. I know I did both of these things before, because I commonly stop/shutdown/kill/cancel all the apps on my phone and I know I've turned phone off and on several times as well. If I hadn't seen the same problem on his iPhone, I would think there was some funny setting I'd turned off that was causing a conflict (I had double checked a lot of my settings while experiencing this problem)

               

              Now I have to decide how soon to try reinstalling the newer version!

              • 4. Re: Had PhoneGap working on iPhone - Now it isn't
                laurels19031048 Level 1

                In regards to the ping thing

                 

                I think those funny characters after the DNS are some kind of weird thing I did taking the screenshot, because I see the address that makes sense in the log  I saved (attached below) Clearly what I saw and typed -  and what saved off - not the same

                 

                QUESTION - So did we misunderstand our ability/inability to ping our iPhones? Our interpretation of the Stackoverflow response, was that we should not be able to ping them.

                 

                We searched and found out that we should not expect to be able to ping our iPhones

                http://stackoverflow.com/questions/9863333/is-there-a-way-to-ping-an-iphone-to-see-if-its- turned-on

                 

                 

                PIng log - partial

                 

                * pinging google server - DNS server

                 

                 

                Laurels-MacBook-Pro-2:~ laurelshimer$ ping 8.8.8.8

                PING 8.8.8.8 (8.8.8.8): 56 data bytes

                64 bytes from 8.8.8.8: icmp_seq=0 ttl=54 time=13.045 ms

                64 bytes from 8.8.8.8: icmp_seq=1 ttl=54 time=13.209 ms

                64 bytes from 8.8.8.8: icmp_seq=2 ttl=54 time=13.225 ms

                64 bytes from 8.8.8.8: icmp_seq=3 ttl=54 time=13.316 ms

                64 bytes from 8.8.8.8: icmp_seq=4 ttl=54 time=14.086 ms

                64 bytes from 8.8.8.8: icmp_seq=5 ttl=54 time=10.847 ms

                64 bytes from 8.8.8.8: icmp_seq=6 ttl=54 time=12.943 ms

                64 bytes from 8.8.8.8: icmp_seq=7 ttl=54 time=13.224 ms

                64 bytes from 8.8.8.8: icmp_seq=8 ttl=54 time=13.334 ms

                64 bytes from 8.8.8.8: icmp_seq=9 ttl=54 time=13.843 ms

                64 bytes from 8.8.8.8: icmp_seq=10 ttl=54 time=10.724 ms

                64 bytes from 8.8.8.8: icmp_seq=11 ttl=54 time=12.992 ms

                ^C

                --- 8.8.8.8 ping statistics ---

                12 packets transmitted, 12 packets received, 0.0% packet loss

                round-trip min/avg/max/stddev = 10.724/12.899/14.086/0.998 ms

                • 5. Re: Had PhoneGap working on iPhone - Now it isn't
                  kerrishotts Adobe Community Professional
                  1. Should you be able to ping your phone?

                    It depends. On my home wifi, I can ping my phone and receive a response if it is on the same network, but that isn't necessarily guaranteed on any network, and will certainly fail if the phone is not on the same network was the device sending the ping. Instead, a more reliable indicator of success is if your phone can ping your development machine (assuming your dev machine's firewall permits it). There are many apps available for iPhones and iPads that can be used to ping your dev machine. Of course, this still assumes that the network itself allows local pings, and that the devices are on the same network.

                  2. PhoneGap is perhaps best described as a support framework; it provides the bridge by which your web code can interface with native features provided by the device. PhoneGap itself provides no user interface to your app -- instead, your app generally uses a UI framework like Ionic, Angular, Sencha Touch, Kendo UI, Framework 7, etc. (there are too many to list!). Unfortunately a lot of online lists classify PhoneGap incorrectly, which leads to a huge misunderstandings and difficulties for developers new to the concept.

                  3. Definitely try installing the newest version (Desktop & Developer). The newest developer app will have newer plugins, and the newest desktop app has lots of bug fixes (especially when compared against 0.2.0). If you do get errors during installation (or after), post them here so we can help. I can confirm, however, that 0.3.3 works fine on OS X 10.11.5, and I don't see any reason why it shouldn't work on 10.10.5.
                  • 6. Re: Had PhoneGap working on iPhone - Now it isn't
                    laurels19031048 Level 1

                    Sounds like I can't generalize about ping, and thanks for the clarification about UI framework versus support framework. I'm not sure what my UI framework is then.... I'm still trying to figure out this whole environment, after shifting over from working in XCode/IOS. I guess maybe the closest is HTML5 mixed with CSS, but maybe I will have to figure out some other piece that fits in. Maybe by the time I get deeper into the client server portion of my O'Reilly JavaScript (Rhino) book, that will become more clear to me.

                     

                    Also I'm trying to figure out what other forums/newsgroups as well as other resources,  I need to find, where I can be a fly on the wall and figure out all of the pieces I need to use and understand with JavaScript/HTML5/CSS to develop for an iPhone.

                     

                    I promise I will try that install again soon. It's just nice having PhoneGap working again! Still wonder what kind of pixie dust got into the works and what funny thing I must have altered without being aware of it - particularly as problem persisted on other machines/devices and networks

                     

                    Thanks for taking the time

                     

                    LRS