share Xcode compiled app to other emulator

Discussion in 'iOS Programming' started by al404, Jun 29, 2017.

  1. al404 macrumors 6502

    al404

    Joined:
    Apr 24, 2011
    Location:
    Novara, Italy
    #1
    I'm realizing my first phonegap app and i need o share the iOS app with a coworker that has a mac and iPhone emulator woking

    I can compile my app in Xcode and see it on iPhone emulator, i guess that the .ipa file is somewhere on my local machine, can i get it and pass the .ipa to coworker so he can see it on his emulator?
     
  2. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #2
    Yes.

    You can copy a directory containing your app built for the iOS Simulator from here:
    ~/Library/Developer/CoreSimulator/Devices/{magic-number}/data/Containers/Bundle/Application/
    where each Simulated iOS device has its own magic number.

    Best way I've found to find the magic number is to create and run an iOS test app with a unique name, run it on just the one Simulated device of interest (do this for both the source Mac and your coworker's target Mac), then use Spotlight to find in which subdirectory Xcode put the app bundle. Then copy the magic number from the directory path to use for copying apps. You can zip up the app bundle (directory) and then unzip it on the destination Mac.
     
  3. PBG4 Dude macrumors 68000

    PBG4 Dude

    Joined:
    Jul 6, 2007
    #3
    Or.. you could print the app bundle's directory to your log window:

    print("Path = \(Bundle.main)") // Swift 4
     
  4. al404 thread starter macrumors 6502

    al404

    Joined:
    Apr 24, 2011
    Location:
    Novara, Italy
    #4
    the app is compiled from PhoneGap, where I should insert

    print("Path = \(Bundle.main)")
     
  5. kage207 macrumors 6502a

    Joined:
    Jul 23, 2008
    #5
    Why would you want to compile to another simulator? Why not have the person clone the project and compile it themselves? That's generally the best way.
     
  6. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #6
    This assumes you want to give that person access to the repository, project and/or source code, and that that person knows how to build and run a project, as opposed to merely how to run a Simulation (which can be launched by merely tapping an icon).
     
  7. kage207 macrumors 6502a

    Joined:
    Jul 23, 2008
    #7
    Then they should provide an .ipa file to install it onto an iOS device.
     
  8. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #8
    That only works for Developer registered devices, which are limited in number. iOS Simulator builds can be distributed without restriction to anyone who can download and install Xcode. Even interested parties who have no iOS device.
     
  9. kage207 macrumors 6502a

    Joined:
    Jul 23, 2008
    #9
    Then ask yourself, does this person really need to be testing?

    Also you can build the *.ipa file and have the person install it onto an iOS device using iTunes and this doesn't waste a Developer Registered Device slot.
     
  10. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #10
    This is really what TestFlight is for. You get a very large number of testers (2000) and the apps can be installed on any device. It also avoids messing with adhoc distribution and sharing Simulator builds.
     
  11. firewood, Jul 16, 2017
    Last edited: Jul 16, 2017

    firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #11
    Note that the OP's original question specified that the other person had a Mac, not an iOS device. Making TestFlight useless.

    Possibly yes. There are lots of skilled graphics artists (as well as more than a few UI designers, mobile app developers, usability testers, and general app users with insightful opinions) who have Macs, but are Android mobile phone users. The coworker at the next desk over might be one of them.
     
  12. al404 thread starter macrumors 6502

    al404

    Joined:
    Apr 24, 2011
    Location:
    Novara, Italy
    #12
    What it says firewood is correct, some people have a mac and Android phone ( like me ) so I thought that sharing an .ipa over iPhone simulator could be an easy way to share the app.

    I occasionally develop an app via PhoneGap and make my client buy a developer subscription, so we would like to make the purchase when app will be almost ready.
     
  13. kage207, Aug 14, 2017
    Last edited: Aug 14, 2017

    kage207 macrumors 6502a

    Joined:
    Jul 23, 2008
    #13
    Then they should learn Git and have Xcode installed if they are so skilled.

    That's what my designers have done while we were busy setting up automating distribution.

    EDIT: I'm really not trying to be rude here but the facts are the facts. You can't distribute the .ipa file from the simulator. You can setup read access to the Git repository to ensure that a designer doesn't accidentally make changes.

    Also, you really should have a good README to have anyone be able to setup the code to at least get the project built / simulator going. Otherwise the project isn't going to be maintainable.

    Invest into some test iOS devices, otherwise you're just providing another barrier into the development process. Remove these as much as possible so you can get back to doing what you do best, writing code.
     
  14. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #14
    No, but you can distribute a pre-built for Simulator iOS app bundle. (I know because I've done it. Required because portions of the source code in a project had legal or contract restrictions on distribution. Thus, no repository access allowed outside the core development team.)
     
  15. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #16
    But it still works. I just dragged a pre-built-for-Simulator app bundle into:
    ~/Library/Developer/CoreSimulator/Devices/{magic-number}/data/Containers/Bundle/Application/
    and the app ran on the new Simulated iOS device just fine. Xcode 8.3.3 Simulator 10.0 latest Mac App Store latest release.
     

Share This Page