6 Replies Latest reply on May 25, 2018 9:59 AM by jamest61292479

    Phonegap Build and TestFlight?

    koalabarry Level 1

      I am developing an app in PGB. Can I somehow share that app using TestFlight? It appears that in order to use TestFlight, I need to upload my project using Xcode. Is that possible with a PGB app? I see there is a Phonegap/Cordova plugin for TestFlight, but is that just for apps built using PG/Cordova?  

        • 1. Re: Phonegap Build and TestFlight?
          VectorP Level 4

          You can 'share' the app using Testflight with a (large) group of known people. They must be invited by you to use it.

          Testflight is primarily meant to enable beta testing, not to distribute live apps.

          Here's your starting point: TestFlight Beta Testing - App Store - Apple Developer

           

          You don't have to use XCode to get your app into Testflight. Upload of the .ipa per 'Application Loader' is possible as well, after preparing the upload with iTunesConnect.

           

          If you just want to 'share' the app with Testflight, you don't need any special plugin.

          • 2. Re: Phonegap Build and TestFlight?
            koalabarry Level 1

            Thanks VectorP! I discovered  Application Loader and tried uploading my IPA. It failed App Store authorization for not having icons for iPhone5, iPod, etc. It's only built for iPad's though!

             

            Is there a way to get to TestFlight without having to get App Store authorization?

             

            Isn't there a Beta path?

            • 3. Re: Phonegap Build and TestFlight?
              VectorP Level 4

              There is no way around Apple's Developer account and Apple's review.

               

              Now, what is it you really want to do? 'Share' the app is a bit vague.

              Do you want to distribute your app without Apple knowing? Or do you have a small group of friends you want to have the app installed? Something else?

              • 4. Re: Phonegap Build and TestFlight?
                koalabarry Level 1

                Corporate client not allowed to download iTunes so they can't install an IPA on their iPads for beta testing.

                 

                They CAN download TestFlight so I assume they could load the app without need  iTunes.

                 

                Thoughts?

                • 5. Re: Phonegap Build and TestFlight?
                  kerrishotts Adobe Employee

                  Corporate client should be using an MDM solution (Mobile device management). This would let the corporate client distribute the IPA to whomever they chose without the need to go through Apple at all.

                   

                  You might also try https://www.diawi.com/ , but I have no direct experience with them. You'd need a way to get the device IDs from users who are going to test your app.

                  • 6. Re: Phonegap Build and TestFlight?
                    jamest61292479 Level 1

                    I have been able to use App Uploader to get my ipa files into TestFlight, but sometimes the uploads fail with cryptic messages.  Loading the PhoneGap source in Xcode gives you the benefit of seeing the actual errors and warnings which are preventing the upload.

                     

                    Importing PhoneGap code into Xcode is not for the faint of heart.

                     

                    I was able to set up a terminal script on my Macintosh which pulled the source code from my code repository, build it with the PhoneGap Command Line Interface, then launch Xcode and open the Xcode project that PhoneGap generated.  After assigning a 'Developer Team' using the Xcode project configuration, I was able to build and test with all the emulators.  The resultant ipa file could also be loaded up to TestFlight, but I preferred to debug in TestFlight, fix the original PhoneGap code, then use PhoneGap Build to generate a fresh ipa and load THAT with the App Uploader.  Personal preference I guess...

                     

                    Anyway, here is the script that worked for me in case you want to give it a whirl.  I have one of these scripts for each app, I just change the script file name from xcbscript.txt to scbwhatever.txt. The script assumes you have installed PhoneGap CLI on your machine, instructions for installing are outside the scope of this post. You may need to tweak various file and directory names and such, I've put those variables in ALL CAPS.  Then on your Mac, open the Terminal app and execute the script:

                     

                    #!/bin/sh

                    echo "Cordova Xcode Build. To run, '~/xcbscript.txt'. (May require 'sudo chmod +x xcbscript.txt')"

                    Echo "return to home directory"

                    cd ~

                     

                    Echo "quit xcode if open"

                    osascript -e 'quit app "Xcode"'

                     

                    Echo "delete any previous Cordova project"

                    rm -rf DIRECTORYNAME

                     

                    Echo "clone project from repository"

                    git clone https://YOURGITHUB(ORBITBUCKET)REPOSITORYURL

                     

                    Echo "cd x2 into Cordova home directory (yes, two directories, same name, one within other)"

                    cd DIRECTORYNAME

                    cd DIRECTORYNAME

                     

                    Echo "add iOS platform"

                    cordova platform add ios

                     

                    Echo "build project"

                    cordova build ios

                     

                    Echo "cd to Xcode project folder"

                    cd ~

                    cd DIRECTORYNAME

                    cd DIRECTORYNAME

                    cd platforms

                    cd iOS

                     

                    Echo "Open new project in Xcode (App name may sometimes be the same as directory name, but not always)"

                    Open "APPNAME.xcodeproj"