Search code examples
swiftiphonexcodeuuidipa

Will Vendor ID change or get affected if I install an .ipa over the existing .ipa file?


Currently I am facing a very doubtful scenario regarding VENDOR ID. I am getting VENDOR ID by using the code :

UIDevice.currentDevice().identifierForVendor!.UUIDString

So I want to know whether it will create different vendor id if I installed an .ipa file with version 1.2.23 and without deleting it if I installed another .ipa by just changing the version number from 1.2.23 to 1.2.24? I know vendor id changes if we reinstall but is the above mentioned scenario reinstallation or an update ?

If I install an ipa file over another existing ipa file will it be regarded as update or reinstallation? Because currently my Vendor ID changes if I install ipa over the another existing ipa. Any idea will be helpful for me


Solution

  • According to my experience the UUIDString is stable if you use the same installation method.

    Apple provides several installation methods:

    • installed from AppStore
    • installed from "OverTheAir"-Installation (AdHoc)
    • installed from XCode
    • etc.

    As long as you keep the the same way to install the app, the UUIDString will be the same..

    Example:

    • you develop an app with xCode and use your own physical devices for testing, providing new versions by xCode
    • you have a group of testers. They receive new versions to test by AdHoc (OverTheAir) installations on their own devices.

    If you start building the app in xCode and do the tests by installing the app on your physical devices by xCode the UUID will be stable.

    If you than switch to adHoc installations to provide the group of testers with that version, the UUID per device will be stable on that devices.

    BUT: If one of the testers will install the app by AppStore, the UUID will change to another UUID and will be stable again as long as the tester will install the new versions by the App Store.

    BUT: if he again starts to get new versions by AddHoc, the UUID will change again to a new one and will be stable as long as he gets his new version by AdHoc installations ..

    it will change again to a new different one, if he starts to get new versions by the appStore ... and so on

    You can overcome this, by using different targets. I usually use three development targets: One for alpha tests, one for the group of beta testers and the third one for the final release for the App Store.

    The advantage is, that this are three independent versions of your app (same source, but three target versions). Within these target versions the UUID will stay stable as the different targets will be installed as different apps.

    So it would be possible to have an alpha (by xCode), a beta (by AdHoc) and a final version (by AppStore) of your app in parallel on the same device.

    It's a little tricky to set it up, but after that it is very easy to use.

    This is a description you might find helpful to get a first feeling. The concept of targets is very powerful and this article shows the basics to get started: https://medium.com/@andersongusmao/xcode-targets-with-multiples-build-configuration-90a575ddc687