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 6740145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:34:16+00:00 2026-05-26T11:34:16+00:00

This is probably a long shot but doesn’t hurt to ask… Do you think

  • 0

This is probably a long shot but doesn’t hurt to ask…
Do you think it’s possible to obtain the IP address of the build host when building for iOS in Objective-C under xcode?
It’d be useful for my testing if it were possible.
For example:

NSString* backendUrl = [NSString stringWithFormat:@"http://%@:5000/", HOST_IP];

Where I would expect HOST_IP (if there was something like that) to be something like this, but of course automatically controlled at build time to hold the correct IP:

#define HOST_IP @"172.76.77.5"
  • 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-05-26T11:34:16+00:00Added an answer on May 26, 2026 at 11:34 am

    No convenient solution, but here are some options to consider.

    1. In your #define, type your computer’s Host-Name (if it’s on a LAN) – http://mylaptop:5000/
      or simply sign up to a free domain @ http://www.no-ip.com/

    2. If it’s necessary to specifically have a #define macro that contains your IP Address, you could simply write a small bash script that updates the defined ip in your .m/.cpp/.h file or whatever holds this #define.
      then you can add the script as a pre-build phase, or just run the script when you know that the IP Address has changed. although I admit it’s kinda hackish.

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

Sidebar

Related Questions

This is probably a long shot, but I'm trying to minimize the repition in
This is probably a long shot, but I have vague sense I ran across
this is probably trivial, but i have a quite long sql query and echo
It's probably a long-shot that anyone can answer this without seeing all the source
This is a long shot, but does anyone know of an algorithm for estimating
This is probably a longshot but.. is it possible to duplicate a whole database
This question is probably a long shot. I can't figure out the errors I'm
This is probably a dumb question but I'm going to ask it anyways... I
This probably has a simple answer, but I must not have had enough coffee
This probably sounds really stupid but I have noo idea how to implement jquery's

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.