简体   繁体   中英

How do i prevent Xcode from overwriting iTunes binary?

I have a really annoying problem. My app is published in the AppStore.

Everytime i run the app from Xcode, the iTunes binary just gets overwritten... and next time i need to test something with the production version of the app, i need to re-download it.

Is there any way to solve this?

Thanks in advance!

You need to change your bundle identifier. Here's how I set it up in my projects

  • Select your Project
  • Select your target
  • Navigate to the Info tab
  • Change the bundle identifier to a custom build setting eg I have it as ${BUNDLE_IDENTIFIER}

在此处输入图片说明

  • Now click on Project - (you may wish to keep at target level your choice)
  • Navigate to the Build Settings tab
  • Scroll all the way to the bottom to see User-Defined
  • Click Add Build Setting
    • (1) Select Add User-Defined Setting
  • (2) Add Key as the name you chose earlier
  • Set a different bundle identifier for each scheme

在此处输入图片说明


Bonus

You can use the same trick for icons so you can easily tell apart your builds on one device

Changing the bundle identifier, as Paul.s suggested, works — but it means your Release and Debug builds will diverge. Technically they will be different apps that use different containers. There can be good reasons to do this, but it has it's risks too: it's a bit more complicated, and you usually have to work a little harder to make sure you test that the development version properly handles data from the production version . You'll want to make sure any ad hoc builds you send to testers use the production bundle identifier.

Another way to approach the problem is to streamline installing the old version. If you Archive your production builds, then you can install them without downloading them again through the App Store. Just open-up a previously exported IPA and sync.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM