Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8333191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:56:19+00:00 2026-06-09T02:56:19+00:00

I have an iOS project that has two targets. The first one is intended

  • 0

I have an iOS project that has two targets. The first one is intended to be used as the normal application, while the second one will include third party classes to extend functionality.
I wish to be able to compile both of them within the same Xcode project, but I need to exclude third party classes in the first target in order to avoid paying licenses that we won’t use.

I’ve considered doing something like this:

#ifdef THIRD_PARTY
  NSLog(@"Third party enabled");
#else
  NSLog(@"Third party disabled");
#endif

But I’d need to define THIRD_PARTY in a building settings file, and I couldn’t do so.

What do you think?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T02:56:22+00:00Added an answer on June 9, 2026 at 2:56 am

    Create multiple TARGETS in your XCode project. You can then add the 3rd party classes to one of the targets, and exclude from the other.

    Perhaps I’m misunderstanding as I see you’ve already got two targets … you can either do the conditional compile thing in your code where needed, adding the #define to one of the targets build settings, or you could create a stub class that has same interface as your 3rd party classes, but all empty implementation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on an iOS project that has to work from iOS4. I have
I have an iOS project that sends a Person class with one attribute name
I have an Xcode 4 project that has my iOS app and a static
I have two dependancies on my iOS project. The first is named LK, it
I have an iOS project (not using Storyboards) that has 2 UITextField and 1
I have inherrtied an IOS project that was being built primarly for iphone. When
I have an iOS project in Xcode that works great. I added the classes
I am a noob of iOS development. Now I have a project that parses
I have a 3.1 xcode project that has been running my app just fine
I have an iOS project that is built upon a framework project that we

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.