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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:12:01+00:00 2026-05-23T20:12:01+00:00

Is it possible to start an application test that runs in the simulator with

  • 0

Is it possible to start an application test that runs in the simulator with a terminal command(s)?

Thanks

  • 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-23T20:12:02+00:00Added an answer on May 23, 2026 at 8:12 pm

    Yes, I got it to work. My solution is somehow rough and might not be suitable in every case.

    Disclaimer: This solution requires to edit system files. It works for
    me, but may mess up XCode’s unit testing stack, especially if you
    do not understand what you are doing.

    In /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Tools/RunPlatformUnitTests
    replace

    if [ "${TEST_HOST}" != "" ]; then
    
        Warning ${LINENO} "Skipping tests; the iPhoneSimulator platform does not currently support application-hosted tests (TEST_HOST set)."
    
    else
    

    with

    if [ "${TEST_HOST}" != "" ]; then
    
        mkdir -p "${BUILT_PRODUCTS_DIR}/Documents"
        mkdir -p "${BUILT_PRODUCTS_DIR}/Library/Caches"
        mkdir -p "${BUILT_PRODUCTS_DIR}/Library/Preferences"
        mkdir -p "${BUILT_PRODUCTS_DIR}/tmp"
    
        export CFFIXED_USER_HOME="${BUILT_PRODUCTS_DIR}/"
    
        RunTestsForApplication "${TEST_HOST}" "${TEST_BUNDLE_PATH}"
    else
    

    You may move the fixed user home to a different location, but I think you would need to move the .app and .octest bundles along.

    Add -RegisterForSystemEvents to the OTHER_TEST_FLAGS build setting of your test bundle.

    Make sure your test bundle contains a run script build phase with the contents

    # Run the unit tests in this test bundle.
    "${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests"
    

    Create a new scheme for your tests.

    You should be able to run the tests from the command line using the standard xcodebuild:

    xcodebuild -workspace $(WORKSPACE_NAME).xcworkspace -scheme $(TEST_SCHEME) -configuration debug -sdk iphonesimulator

    The simulator must not be running, at the time you what to run the tests.

    I hope this information is complete, if something doesn’t work as expected please ask.

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

Sidebar

Related Questions

Is it possible to start other application that are installed on the system with
Is it possible to get a thread dump of a Java Web Start application?
Is it possible to start a program so that it is available to a
I just start learning WPF, is that possible I can create an IE toolbar
When I'm inside a destructor is it possible that some other thread will start
I am trying to load test a web application that uses SAML for SSO,
Is it possible to start your application and let it run on a popup
Is it possible to start an event when an UIWebView (Iphone) has finished loading
Is it possible to start an array at an index not zero...I.E. you have
Possible Duplicate: Why does BinaryWriter prepend gibberish to the start of a stream? How

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.