<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Get Info: #xcode</title>
    <description>Posts tagged “xcode” — Blog of independent game and app developer Matt Sephton. Featuring vintage Macintosh, game development, digital artwork, Japanese esoterica, video game reviews, hacks and tips, and much more.</description>
    <link>https://blog.gingerbeardman.com/tag/xcode/</link>
    <atom:link href="https://blog.gingerbeardman.com/tag/xcode/index.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Fri, 03 Jul 2026 20:16:48 +0000</pubDate>
    <lastBuildDate>Fri, 03 Jul 2026 20:16:48 +0000</lastBuildDate>
    <generator>Jekyll v4.4.1</generator>

    
      
        <item>
          <title>Automatic build number incrementing in Xcode</title>
          <description>&lt;p&gt;Note: these days I mostly let App Store Connect manage version numbers.&lt;/p&gt;

&lt;p&gt;There are many ways to do automatic build version number incrementing in Xcode. I don’t know of any really easy universal way of doing it, so this is simply my preferred way of doing it. I just added it to a new project so thought I’d document if only for my own future reference!&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;1-create-a-xcconfig&quot;&gt;1. Create a .xcconfig&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Add a file &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BuildNumber.xcconfig&lt;/code&gt; to your project&lt;/li&gt;
  &lt;li&gt;Add a &lt;em&gt;Pre-Action Script&lt;/em&gt; to your &lt;em&gt;Scheme&lt;/em&gt;:
    &lt;ul&gt;
      &lt;li&gt;In Xcode, edit your scheme (&lt;em&gt;Product &amp;gt; Scheme &amp;gt; Edit Scheme&lt;/em&gt;).&lt;/li&gt;
      &lt;li&gt;For both “Run” and “Archive” actions, add a &lt;em&gt;Pre-action&lt;/em&gt; with a script like the one below&lt;/li&gt;
      &lt;li&gt;Here I’m using a sort of reverse notation timestamp format, &lt;em&gt;you can use whatever works for you&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;Make sure to set “Provide build settings from” to your project&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;#!/bin/sh&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;BUILD_NUMBER&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;date&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;+%y%m%d.%H%M&apos;&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;PROJECT_NAME&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;basename&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$PROJECT_FILE_PATH&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; .xcodeproj&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;CURRENT_PROJECT_VERSION = &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$BUILD_NUMBER&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PROJECT_DIR&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PROJECT_NAME&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/BuildNumber.xcconfig&quot;&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Updated build number to: &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$BUILD_NUMBER&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;https://cdn.gingerbeardman.com/images/posts/xcode-automatic-build-number-01.png&quot; alt=&quot;IMG&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;2-reference-the-xcconfig-in-your-project&quot;&gt;2. Reference the .xcconfig in your project&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;In your project set the base configuration file to your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BuildNumber.xcconfig&lt;/code&gt;
    &lt;ul&gt;
      &lt;li&gt;In the main editor, you’ll see two sections: &lt;em&gt;PROJECT&lt;/em&gt; and &lt;em&gt;TARGETS&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;Click the name of your project and make sure &lt;em&gt;Info&lt;/em&gt; tab is selected&lt;/li&gt;
      &lt;li&gt;You can set the base configuration at the project level (as here) or for each target individually&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://cdn.gingerbeardman.com/images/posts/xcode-automatic-build-number-02.png&quot; alt=&quot;IMG&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;3-set-the-version-to-use-the-config-variable&quot;&gt;3. Set the version to use the config variable&lt;/h2&gt;

&lt;p&gt;In the target build settings, set: Current Project Version to: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$(CURRENT_PROJECT_VERSION)&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;It will show the version number in place&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://cdn.gingerbeardman.com/images/posts/xcode-automatic-build-number-03.png&quot; alt=&quot;IMG&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;4-confirm-by-displaying-the-value-in-your-app&quot;&gt;4. Confirm by displaying the value in your app&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CFBundleVersion&lt;/code&gt; for the build version number&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://cdn.gingerbeardman.com/images/posts/xcode-automatic-build-number-04.png&quot; alt=&quot;IMG&quot; /&gt;&lt;/p&gt;
</description>
          <author>by Matt Sephton</author>
          <pubDate>Sat, 28 Jun 2025 16:01:00 +0000</pubDate>
          <link>https://blog.gingerbeardman.com/2025/06/28/automatic-build-number-incrementing-in-xcode/</link>
          <guid isPermaLink="true">https://blog.gingerbeardman.com/2025/06/28/automatic-build-number-incrementing-in-xcode/</guid>
        </item>
      
    
      
        <item>
          <title>Building BasiliskII for iOS</title>
          <description>&lt;p&gt;I’ve had numerous requests for a guide to building BasiliskII on iOS. Let me know of anything is unclear or would benefit from more details!&lt;/p&gt;

&lt;p&gt;February 2024: Updated for building with Xcode 15.2 on macOS 14.3 to iOS 17.3. YMMV.&lt;/p&gt;

&lt;h2 id=&quot;building&quot;&gt;Building&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Install &lt;a href=&quot;https://apps.apple.com/gb/app/xcode/id497799835?mt=12&quot;&gt;Xcode from Mac App Store&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Clone &lt;a href=&quot;https://github.com/zydeco/macemu/tree/ios/BasiliskII/src/iOS&quot;&gt;project source from GitHub&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Switch to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ios&lt;/code&gt; branch&lt;/li&gt;
  &lt;li&gt;Open .xcodeproj file&lt;/li&gt;
  &lt;li&gt;Set &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Product &amp;gt; Destination&lt;/code&gt; to point to your device&lt;/li&gt;
  &lt;li&gt;Run&lt;/li&gt;
&lt;/ol&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;optional-changes&quot;&gt;Optional Changes&lt;/h2&gt;

&lt;p&gt;These are changes I made that give a better experience on my specific iPad.&lt;/p&gt;

&lt;h3 id=&quot;adding-chunky-screen-resolutions&quot;&gt;Adding chunky screen resolutions&lt;/h3&gt;

&lt;p&gt;I added chunky “half resolution” screen modes to increase the size of user interface elements so that buttons, menu items and so on are all around the 44pt recommended in the Apple iOS HIG.&lt;/p&gt;

&lt;p&gt;For iPad Pro 12.9” these changes were:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[self addVideoMode:CGSizeMake(512, 496) to:videoModes]; // portrait minus keyboard
[self addVideoMode:CGSizeMake(512, 672) to:videoModes]; // portrait &quot;full&quot; screen
[self addVideoMode:CGSizeMake(683, 502) to:videoModes]; // landscape &quot;full&quot; screen
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Enter those after &lt;a href=&quot;https://github.com/zydeco/macemu/blob/9b90ebad780f35afb9f0001109bdca9c7e1cb478/BasiliskII/src/iOS/BasiliskII/B2ScreenView.mm#L56-L61&quot;&gt;line 61 in file B2ScreenView.mm&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;disabling-graphics-smoothing&quot;&gt;Disabling graphics smoothing&lt;/h3&gt;

&lt;p&gt;My personal preference is to disable filtering/smoothing on all graphics scaling, but only because I’ve dialled in resolutions that fit exactly so there will be no scaling happening anyway:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;NSString *filter = kCAFilterNearest;
videoLayer.magnificationFilter = filter;
videoLayer.minificationFilter = filter;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Make this change at &lt;a href=&quot;https://github.com/zydeco/macemu/blob/9b90ebad780f35afb9f0001109bdca9c7e1cb478/BasiliskII/src/iOS/BasiliskII/B2ScreenView.mm#L108&quot;&gt;line 108 in file B2ScreenView.mm&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;custom-keyboard-layouts&quot;&gt;Custom Keyboard Layouts&lt;/h3&gt;

&lt;p&gt;These are defined in JSON and &lt;a href=&quot;https://github.com/zydeco/macemu/tree/ios/BasiliskII/src/iOS/Keyboard%20Layouts&quot;&gt;compiled&lt;/a&gt; to a custom format:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/zydeco/macemu/tree/ios/BasiliskII/src/iOS/BasiliskII/Keyboard%20Layouts&quot;&gt;source file location on GitHub&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;several regional layouts are already provided&lt;/li&gt;
  &lt;li&gt;you don’t have to make your own!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/gingerbeardman/artworks-keyboard&quot;&gt;Here’s one that I made&lt;/a&gt;, based on the British layout, for use with Deneba artWORKS/UltraPaint. To install it you should copy the file &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;artWORKS.nfkeyboardlayout&lt;/code&gt; to BasiliskII’s &lt;em&gt;Keyboard Layout&lt;/em&gt; folder using the Files app on your iPad.&lt;/p&gt;

&lt;h3 id=&quot;enable-split-view-support&quot;&gt;Enable Split View Support&lt;/h3&gt;

&lt;p&gt;This can be enabled by changing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BasiliskII-Info.plist&lt;/code&gt;: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;UIRequiresFullScreen&lt;/code&gt; should be &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;false&lt;/code&gt; in &lt;a href=&quot;https://github.com/zydeco/macemu/blob/ios/BasiliskII/src/iOS/BasiliskII/BasiliskII-Info.plist#L114&quot;&gt;BasiliskII-Info.plist&lt;/a&gt; but be wary of the following problem:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;the very top of the screen (where you’d expect the iOS status bar to be, and where part of the System 7 menu bar is) will become unresponsive to touch due to the Slide Over indicator&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This would need to be managed/avoided by the screen layout of BasiliskII, but when I attempted this it raised more issues.&lt;/p&gt;

&lt;p&gt;However, you can still use Slide Over to position Safari, Files, etc. along the edge of your screen.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;notes&quot;&gt;Notes&lt;/h2&gt;

&lt;p&gt;There are additional capabilities that come with the emulator integration. I go further into these, and more besides, in a additional posts listed at the bottom of the page.&lt;/p&gt;

&lt;h3 id=&quot;keyboard&quot;&gt;Keyboard&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Swipe up/down with two fingers to show/hide the on-screen keyboard&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;settings&quot;&gt;Settings&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Spread 4 or 5 fingers to show the &lt;em&gt;BasiliskII Settings&lt;/em&gt; pop-up&lt;/li&gt;
  &lt;li&gt;Tap outside of the &lt;em&gt;BasiliskII Settings&lt;/em&gt; pop-up to hide it&lt;/li&gt;
  &lt;li&gt;Settings can also be invoked through the app menu, long press the app icon&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;custom-screen-size&quot;&gt;Custom screen size&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Pinch with 2 fingers to dynamically resize screen&lt;/li&gt;
  &lt;li&gt;Separate tracking for horizontal and vertical resizing&lt;/li&gt;
  &lt;li&gt;Double-tap for full size screen&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;file-sharing&quot;&gt;File Sharing&lt;/h3&gt;

&lt;p&gt;A drive appears on the desktop that is mapped to the iOS file sharing folder of the app.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;You can use Files to transfer files into or out of the emulated machine&lt;/li&gt;
  &lt;li&gt;Share Sheet also works for getting files into the emulated machine&lt;/li&gt;
  &lt;li&gt;You can organise the files into folders using the Files app&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;apple-pencil&quot;&gt;Apple Pencil&lt;/h3&gt;

&lt;p&gt;This is supported the same way as regular touch so it acts as a mouse. Drawing works well and is very responsive, even at lower Hz.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Palm rejection is missing&lt;/li&gt;
  &lt;li&gt;Pressure sensitivity is missing&lt;/li&gt;
  &lt;li&gt;Multi touch seems to be missing&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;related-posts&quot;&gt;Related posts&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;/2021/04/17/turning-an-ipad-pro-into-the-ultimate-classic-macintosh&quot;&gt;Turning an iPad Pro into the Ultimate Classic Macintosh&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;How to install BasiliskII on your iPad&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/2021/04/19/automating-interactions-using-apple-events/&quot;&gt;Exploring Custom Keyboards and Automation&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/2021/03/28/changing-the-size-of-toolbar-items-using-resedit/&quot;&gt;Optimising Macintosh app toolbars for touch&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/2021/04/24/macintosh-drawing-software-compared/&quot;&gt;Macintosh drawing software compared&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/2021/04/25/mixing-external-tools-across-deneba-software/&quot;&gt;Mixing External Tools across Deneba software&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/2021/04/30/my-system-7-software-choices/&quot;&gt;My System 7 software choices&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/2021/05/03/interoperability-of-system-7-and-ios/&quot;&gt;About the interoperability of System 7 and iOS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
          <author>by Matt Sephton</author>
          <pubDate>Wed, 21 Apr 2021 00:00:00 +0000</pubDate>
          <link>https://blog.gingerbeardman.com/2021/04/21/building-basiliskii-for-ios/</link>
          <guid isPermaLink="true">https://blog.gingerbeardman.com/2021/04/21/building-basiliskii-for-ios/</guid>
        </item>
      
    

  </channel>
</rss>
