# Is there a way to force building on OS X

**URL:** <https://discuss.circleci.com/t/is-there-a-way-to-force-building-on-os-x/4079>\
**Category:** Build Environment\
**Tags:** osx\
**Created:** [May 18, 2016, 8:55pm UTC](https://discuss.circleci.com/t/is-there-a-way-to-force-building-on-os-x/4079 "2016-05-18T20:55:32Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![cschroed](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/cschroed/32/241_2.png) [@cschroed](https://discuss.circleci.com/u/cschroed)\
**Post date:** [May 18, 2016, 8:55pm UTC](https://discuss.circleci.com/t/is-there-a-way-to-force-building-on-os-x/4079/1 "2016-05-18T20:55:33Z")

</div>

I have a sinatra app that needs to run on an OS X server. However when I try to configure this in Circle CI, it won’t let me add this to an OS X configuration. It looks at the repo as a linux app, not the MAC OS X app the I need.

Is there a way to force a repo to use OS X for the environment selection?

---

<div class="post-metadata">

**Author:** ![tom](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/tom/32/27680_2.png) [@tom](https://discuss.circleci.com/u/tom)\
**Post date:** [May 19, 2016, 1:00pm UTC](https://discuss.circleci.com/t/is-there-a-way-to-force-building-on-os-x/4079/2 "2016-05-19T13:00:41Z")

</div>

If you got to ‘Project Settings \> Build environment’ screen you can set the build to run on OS X there.

Hope that helps,  
Tom

---

<div class="post-metadata">

**Author:** ![cschroed](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/cschroed/32/241_2.png) [@cschroed](https://discuss.circleci.com/u/cschroed)\
**Post date:** [May 19, 2016, 6:59pm UTC](https://discuss.circleci.com/t/is-there-a-way-to-force-building-on-os-x/4079/3 "2016-05-19T18:59:51Z")

</div>

Tom,

Thanks for the reply. This did in fact start to build on OS X, so thanks again. However it assumes that I need something built in Xcode as I’m getting the following message:

No shared schemes were found in your repo. Please ensure you have shared your  
scheme. See the iOS documention for more information on sharing schemes.  
Alternatively, you can explicitly set a scheme with the 'XCODE\_SCHEME’  
environment variable.

Action failed: Configure the build

However after reading the documentation, I don’t need anything built in Xcode, but do need Xcode installed. I then need my repo checked out and run like a ruby rake command.

This may not be doable, which is fine, but any thoughts here by you or anyone would be great.

---

<div class="post-metadata">

**Author:** ![FelicianoTech](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/felicianotech/32/21348_2.png) [@FelicianoTech](https://discuss.circleci.com/u/FelicianoTech)\
**Post date:** [May 19, 2016, 7:20pm UTC](https://discuss.circleci.com/t/is-there-a-way-to-force-building-on-os-x/4079/4 "2016-05-19T19:20:39Z")

</div>

Hi,

In the different phases that CircleCI will run through, machine, dependencies, test, deployment, etc there are sometimes commands that CircleCI will infer that you need based on your project. This is called Inference. You can override a specific phase, and run your own commands instead of what CircleCI infers but using the override section of that phase.

Our [Configuration Guide](https://circleci.com/docs/configuration/) explains how `circle.yml` works and how you can override phases.

---

<div class="post-metadata">

**Author:** ![limoragni](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/limoragni/32/3061_2.png) [@limoragni](https://discuss.circleci.com/u/limoragni)\
**Post date:** [May 24, 2016, 3:00pm UTC](https://discuss.circleci.com/t/is-there-a-way-to-force-building-on-os-x/4079/5 "2016-05-24T15:00:45Z")

</div>

Hi!

I’m having this same last error. I’ve tried overriding the settings. But in this case, Which setting is inferring? What do I need to override in order to prevent this error from happening?

---

<div class="post-metadata">

**Author:** ![FelicianoTech](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/felicianotech/32/21348_2.png) [@FelicianoTech](https://discuss.circleci.com/u/FelicianoTech)\
**Post date:** [May 24, 2016, 5:44pm UTC](https://discuss.circleci.com/t/is-there-a-way-to-force-building-on-os-x/4079/6 "2016-05-24T17:44:21Z")

</div>

Your build output shows you each phase and what is being run. You can look there, see what phase is running something you don’t want, and that’s the phase you override.

---

<div class="post-metadata">

**Author:** ![limoragni](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/limoragni/32/3061_2.png) [@limoragni](https://discuss.circleci.com/u/limoragni)\
**Post date:** [May 24, 2016, 8:04pm UTC](https://discuss.circleci.com/t/is-there-a-way-to-force-building-on-os-x/4079/7 "2016-05-24T20:04:58Z")

</div>

Thanks for the response!  
There’s not enough information, at least for me that I never used CircleCi before. As you can see in the image, is telling me is trying to find a scheme. I know that’s something you need when you are building for IOS or an Xcode project which is not my case, and I know the problem is somewhere on the machine module. If you can tell what do I need to override from the image that would be great!

 ![](https://global.discourse-cdn.com/circleci/original/2X/9/90701c61c226a2a377f1151d5b5bb728250478a2.png)

---

<div class="post-metadata">

**Author:** ![cschroed](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/cschroed/32/241_2.png) [@cschroed](https://discuss.circleci.com/u/cschroed)\
**Post date:** [June 2, 2016, 1:25pm UTC](https://discuss.circleci.com/t/is-there-a-way-to-force-building-on-os-x/4079/8 "2016-06-02T13:25:49Z")

</div>

I had to solve some other issues, and got back around to this today. I finally got it working based on the input from this thread, so thank you. I’m posting my circle.yml file in the hopes it helps someone else trying to do a similar setup/operation.

Keep in mind that I’m trying to run a ruby on sinatra application test suite that **has** to run on OS X with Xcode installed. I’m not testing a Mac or iOS application (_yet_), so I don’t need the usual Xcode build operations. Instead i need to set the ruby version I need (2.3.1), update bundler and then only run bundle exec rake, not Xcode build.

The other thing I needed done is the location of Xcode to be /Applications/Xcode.app, so I do a quick symlink to the 7.3.app location. This may break if circleCI changes the way they deploy their container. However, for now it works.

Like I said, this is working for me, hope it helps someone else…

# circle.yml

`## Customize the test machine machine: environment: XCODE_SCHEME: symbolicator XCODE_WORKSPACE: symbolicator # Turn off Ruby whinning RUBYOPT: W0 xcode: version: 7.3 dependencies: pre: # The application is expecting xcode to be installed in its normal location - sudo ln -s /Applications/Xcode-7.3.app /Applications/Xcode.app - brew uninstall --force ruby20 - brew install --force ruby - gem install bundler test: override: - bundle exec rake`

Sorry I can’t get the formatting on the preview to look right, hopefully you can figure out the indentation from my example. If someone has a better way to update the formatting, let me know.

---

<div class="post-metadata">

**Author:** ![drazisil](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/drazisil/32/24029_2.png) [@drazisil](https://discuss.circleci.com/u/drazisil)\
**Post date:** [June 2, 2016, 7:20pm UTC](https://discuss.circleci.com/t/is-there-a-way-to-force-building-on-os-x/4079/9 "2016-06-02T19:20:31Z")

</div>

For formatting, you want to either wrap the whole bit in a code block (\< / \> button), or start the indenting at 4 spaces in.

---

<div class="post-metadata">

**Author:** ![cschroed](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/cschroed/32/241_2.png) [@cschroed](https://discuss.circleci.com/u/cschroed)\
**Post date:** [June 2, 2016, 7:33pm UTC](https://discuss.circleci.com/t/is-there-a-way-to-force-building-on-os-x/4079/10 "2016-06-02T19:33:42Z")

</div>

I did use the \</\> but it doesn’t apparently work. Or I used it incorrectly.

---

<div class="post-metadata">

**Author:** ![tonymathew](https://avatars.discourse-cdn.com/v4/letter/t/ac91a4/32.png) [@tonymathew](https://discuss.circleci.com/u/tonymathew)\
**Post date:** [October 13, 2016, 9:54pm UTC](https://discuss.circleci.com/t/is-there-a-way-to-force-building-on-os-x/4079/11 "2016-10-13T21:54:47Z")

</div>

Were you able to resolve this ? I am also trying to set up some projects which are not built using xcode instead other tool chains that depends on macos build system. I get the same error of XCODE\_SCHEME not defined.

---

<div class="post-metadata">

**Author:** ![cschroed](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/cschroed/32/241_2.png) [@cschroed](https://discuss.circleci.com/u/cschroed)\
**Post date:** [October 13, 2016, 10:19pm UTC](https://discuss.circleci.com/t/is-there-a-way-to-force-building-on-os-x/4079/12 "2016-10-13T22:19:11Z")

</div>

Yes, this has been working for several days, using the example configuration fie I posted. In my case, the app isn’t built by Xcode, but it does use it, hence the need for the XCODE\_SCHEME.

Where you able to take what I posted before and modify it to your environment?

---

<div class="post-metadata">

**Author:** ![anon47539524](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@anon47539524](https://discuss.circleci.com/u/anon47539524)\
**Post date:** [October 14, 2016, 11:33am UTC](https://discuss.circleci.com/t/is-there-a-way-to-force-building-on-os-x/4079/13 "2016-10-14T11:33:40Z")

</div>

You will have to set a “phony” Xcode scheme and either project or workspace. We enforce that because we officially only support iOS and macOS projects on the platform.

Once you’ve done that our system is happy and you can do whatever you want on the build machine by specifying it in your `circle.yml` file. You will receive errors but it will build just fine.  
Since you run a Sinatra app there isn’t really much that you require from Xcode dependency wise so you can happily ignore it.

/cc @tonymathew @limoragni

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:38am UTC](https://discuss.circleci.com/t/is-there-a-way-to-force-building-on-os-x/4079/14 "2018-06-18T11:38:22Z")

</div>


