Xcode Targets Arent Schemes (2024)

When developing an application, We most often follow the standard development life cycle pattern — development, testing, and production. For each of these stages, we have different API environments. For instance, when the app is in the development stage, it will communicate with olx.dev.api.com. Testing and production each have their respective API environments, too. Similarly when developing an application for different countries from a single source code, For each supported countries we need to take care of configuration, asset, etc. We at OLX Engineering team decided to utilize the knowledge of targets, schemes & configuration to improve the overall structure of developing an application considering multi-country support.

Today let us discuss how we at OLX manage, apps in multiple countries using the same codebase.

What was the requirement?

We needed to manage apps in multiple countries with one codebase, where we could even have a different set of features available as per country, or have different sets of configuration for the same.

How we did it?

We first used different targets for different countries, which used the same set of resources except for some configuration files which were different. This lead to problems such as whenever we needed to change something which was earlier common to all targets, multiple files had to be created in order to accommodate the changes, also increasing the build time as we had to compile the source code for each and every target.

Xcode Targets Arent Schemes (2)

What could be done to make it better?

We tried to further optimize our process thus coming up with a solution of using schemes for different countries, thus giving us the flexibility we were pushing for by having different configurations for different countries yet all running using the same codebase. So now even our build time was reduced as we didn’t have multiple targets to build but only one, which now could be resigned as per the configuration required for the country.

In order to appreciate what we are doing, we need to understand what are targets and schemes.

Xcode Targets Arent Schemes (2024)
Top Articles
Latest Posts
Article information

Author: Trent Wehner

Last Updated:

Views: 6215

Rating: 4.6 / 5 (56 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Trent Wehner

Birthday: 1993-03-14

Address: 872 Kevin Squares, New Codyville, AK 01785-0416

Phone: +18698800304764

Job: Senior Farming Developer

Hobby: Paintball, Calligraphy, Hunting, Flying disc, Lapidary, Rafting, Inline skating

Introduction: My name is Trent Wehner, I am a talented, brainy, zealous, light, funny, gleaming, attractive person who loves writing and wants to share my knowledge and understanding with you.