5 Replies Latest reply on Jul 23, 2014 11:27 AM by Jon Tara

    Build for iPhone only (not iPad)

    Marcus Atkins

      Is it possible to specify we are only building for iPhone. We do not want to support iPad.


      I am submitting my app to the app store through iTunes Connect and am getting the 'Missing screenshot' error as the iPad screenshots are missing.


      We are building using rake.

        • Re: Build for iPhone only (not iPad)
          Fernando Coelho da Silva

          Yes it is possible. When you do build your Xcode application you should put in:


          General / Deployment Info / Devices: iphone

          • Re: Build for iPhone only (not iPad)
            Marcus Atkins

            Bump. Has anyone experienced this issue? motoroladev-admin

              • Re: Build for iPhone only (not iPad)
                Robert Galvin

                I don;t think what you are trying to do is available via Rake. Since 4.0 we have made the iOS XCode projects separate per project (before they were one shared project). So using XCode is the preferred way going forward. http://docs.rhomobile.com/en/4.1.0/guide/build_ios

                  • Re: Build for iPhone only (not iPad)
                    Jon Tara

                    I've been looking into this a bit. (Robert: in my travels I noticed that Rhodes no longer pollutes the Gem with your built project. Good job! That's what the new "project" directory is for.)


                    It's pretty common to have to change some settings in Info.plist. And, so, it would be awfully nice if the build scripts would provide some handy "hook" so that we can modify the Info.plist after Rhodes build is done creating it, and before it is bundled. (I assume just changing it in the bundle will not work, because then signing of the package will not be correct as something was changed.)


                    Sorry, I had this all open in my editor the other day, but moved on to more pressing things. But I recall that building Info.plist is in it's own sub-task, so if you knew more Rake than I do, you can probably arrange to do something of your own either before or after that subtask.


                    This has a whole host of uses: e.g. set flags to run in background. (My reason for looking into it.)


                    The main rake file to build is in your project directory, so you can easily change it. The bulk of it is "under the hood" in the Gem, though, and normally shouldn't be touched.


                    I do some kludgy addition to my project rakefile to automatically switch Xcode versions when switching between 3.5 and 4.x projects. (Rhodes still has some dependency on the Xcode being use to build being named "Xcode.app") But I admittedly do it the wrong way - I just parse the command-line parameters looking for clean:iphone, run:iphone, and device:iphone instead of stepping in front of the rake sub-tasks. So, won't work for a build all, etc.


                    We use command-line builds exclusively, for one, because we can automate app publication. Push a button, and the app (actually, several apps) appear on TestFlight for user test. (Much of that is shell scripts rather than Rake, but ultimatly uses rake to build the apps.)