Prevent an iOS app from being updated - ios

I am doing some research to find out if an app developer can set up an app in a way that it can't be updated, at least in some circumstance.
Or in another way: what can be done by a developer in order to create on purpose issue during the update of its own app?

It sounds like what you actually want to do is create another Target in your project. This way, you can have multiple copies of your app on the same device. For example, you could have a dev target that is constantly moving and a release target that you don't want to override.
You can do this by selecting your project in the project navigator, right clicking on your app's target, and then selecting Duplicate. It will create a new target called YourAppName-copy. You can then select your target next to where you select the device/simulator to run on & select the new target. Run the new target & it will install the new target and leave your other one alone.

For an enterprise app, you could support your own app updating (and create a web service to check to see if the app needs to be updated -- or if the user's credentials are still valid, etc.).
For a public App Store app, this is not currently possible.

Related

Xcode: sharing the same Bundle ID among multiple people

I'm developing an iOS app with a friend. We both enrolled for the Apple development program as a Single person (we don't have an organization).
We're using git and we'd like to be both able to build the app from our Mac, but I can't compile sinche the Bundle ID is already used by my friend. Is it even possible to be both able to work on the same project without being an organization? What we should do?
Thanks
The problem is that only one developer account can register the bundle ID. What Xcode is trying to do is register the bundle ID to your development account (as you can do manually at https://developer.apple.com). Since your friend already did this, you cannot do this as well.
What you can do is either change the value of your bundle ID to a development one (in the end, only one of you can release the app on the App Store) however, this is kind of messy since it'll change the .xcodeproj and can be a real conflict mess when using versioning (as I guess you are using).
Another option is to use .xcconfig files, and define the bundle ID dynamically in your project. This way you can change your config file locally and just don't push that change. What you do is:
Add a new file to your project. Select Other under iOS and then select Configuration Settings File. Save the file and call it Debug.xcconfig (or whatever you want).
Add the following row to the file: BUNDLE_ID = io.example.app.
Select your project in the Project Navigator and then select the project itself under PROJECT.
Select the Info tab and expand both Debug and Release. For both Debug and Release select the Debug option.
Now open your Info.plist file and change the value of Bundle Identifier (CFBundleIdentifier) to $(BUNDLE_ID).
Now you can change the bundle ID (and a shitload of other Xcode project properties) using the configuration file. You could add one for yourself and your friend as well, each with their own bundle ID.
One problem though when changing the BundleID is that services such as APNS won't work. Keep that in mind. If that is important that both should be able to test, then make sure to get an organisation account.
Hope this helped you a little bit!

What are the best practices for preparing an iOS demo app along with main app?

This question is about the App development/testing process. I've an app on the App Store (say ABC); now I added some features on a separate git code branch and want to show these to my teammates.
I can use TestFlight to install it on their iPhones, although that overwrites my original app on the phone.
I'm looking for the best way to get a new App, say ABC Demo, installed on their iPhones.
If you want the "new" version of the app to work alongside the old version on the same device then each app will have to have different Bundle Ids. You can achieve this by creating a new Target in Xcode
http://www.itexico.com/blog/bid/99497/iOS-Mobile-Development-Using-Xcode-Targets-to-Reuse-the-Code
two finger click the existing target and select Duplicate
Then under the new target change the Bundle Identifier to something different
Go to Targets in Xcode
Get Info on your project's target
Search for Product Name under Packaging. Change it to ABC Demo
Press Enter

iOS making a new project for an existing app

I'm remaking from scratch an app that was previously in Objective-C, to Swift. But I'm not really sure how can I make the new project be linked to the app that is already in iTunes Connect. What I mean to say is that I have a new project whose binary is supposed to be uploaded as the binary of the already registered app.
Besides using the same Bundle Identifier, what else do I need to do to achieve this?
PS: For some reason, the new project won't let me change the bundle identifier's last part: the old one was com.example.myproject while the new one is com.exmaple.MyProject (the new one has capital letters). When I click on the text box to change it to lower case, the MyProject color change to gray and I can't delete it
Go into your app's Info.plist and change the bundle identifier manually. Also, you need to have a higher app version so when you submit, the version is one higher than the one currently in the App Store (so you can make a new version and get it approved).

Creating new Xcode project from an existing Project

I have one app with some app name in the App Store, is it possible to create a different app from the same project in the Xcode by changing the info plist values like bundle id ,bundle name etc with out creating a new project.And can i upload the same to the App Store with a different app name.
Thanks.
One way to do this is to create a second 'target' inside your existing XCode project.
There are a number of different target types you can create, one of them being another application.
This new application target then needs a different bundle id etc. However that target can see all the existing code you wrote for your existing app so you don't need to copy the files into another project to reuse them. Use the search facility in Apple dev website, or Google the use of XCode targets for more information about how to do this.

iOS: Customize App Icon and Splash Screen via Enterprise (In-House) Distribution

When deploying an App via the Enterprise Developer Programs In-House Distribution there is a .plist file acting as descriptor for the .ipa file.
Does anyone know if it is possible to change standard info.plist values via this file?
The background is that I want to adjust the App Icon and Splash Screen. I want to customize the app for different customers without recompiling it. If the above approach is not possible what else can I do to ease that process?
I want to customize the app for different customers without recompiling it.
Not possible. The app is signed before you distribute it. Any change will invalidate the signature and the device will refuse to run it. You'll need to recompile if you want to change things like the app icon.
The splash screen is somewhat different. You can't change the default image, but you can omit the default image and display your own splash screen as soon as the app is loaded. That screen can contain an image that you download from a server, for example.
Give that you're talking about enterprise distribution, I think the best plan is to simply create separate targets in your project, one for each customized version. Each target would reference different icon and default image files. You can even create an aggregate target, so that all the customized versions are built at the same time.
Instructions for adding a customized target, assuming Xcode 4:
Select the project in the project navigator.
Click the Add Target button at the bottom of the detail area, or just select the target and use the Edit->Duplicate command.
Make a copy of the Info.plist file from your first target and add it to the project.
Select the new target and change it's "Info.plist" setting in the Packaging section of Build Settings. (You may also want to adjust the product name.)
To add an aggregate target that builds all the others, add a target using the Aggregate target template (under Other in the template picker). Then select the new aggregate target, click Build Phases, and add all your other targets as target dependencies.

Resources