nake ios - Undefined symbols for architecture arm64
Trying to do build an iOS app results in several "Undefined symbols for architecture arm64" errors.

Here's the last part of the error:

```
Undefined symbols for architecture arm64:
  "_AVAudioSessionCategoryAmbient", referenced from:
      _update_audio_session in libSDL2.a(SDL_coreaudio.o)
  "_AVAudioSessionCategoryPlayAndRecord", referenced from:
      _update_audio_session in libSDL2.a(SDL_coreaudio.o)
  "_AVAudioSessionCategoryPlayback", referenced from:
      _update_audio_session in libSDL2.a(SDL_coreaudio.o)
  "_AVAudioSessionCategoryRecord", referenced from:
      _update_audio_session in libSDL2.a(SDL_coreaudio.o)
  "_AVAudioSessionCategorySoloAmbient", referenced from:
      _update_audio_session in libSDL2.a(SDL_coreaudio.o)
  "_AVAudioSessionInterruptionNotification", referenced from:
      _update_audio_session in libSDL2.a(SDL_coreaudio.o)
  "_AVAudioSessionInterruptionTypeKey", referenced from:
      -[SDLInterruptionListener audioSessionInterruption:] in libSDL2.a(SDL_coreaudio.o)
  "_MTLCreateSystemDefaultDevice", referenced from:
      _METAL_CreateRenderer in libSDL2.a(SDL_render_metal.o)
  "_OBJC_CLASS_$_AVAudioSession", referenced from:
      objc-class-ref in libSDL2.a(SDL_coreaudio.o)
  "_OBJC_CLASS_$_MTLRenderPassDescriptor", referenced from:
      objc-class-ref in libSDL2.a(SDL_render_metal.o)
  "_OBJC_CLASS_$_MTLRenderPipelineDescriptor", referenced from:
      objc-class-ref in libSDL2.a(SDL_render_metal.o)
  "_OBJC_CLASS_$_MTLSamplerDescriptor", referenced from:
      objc-class-ref in libSDL2.a(SDL_render_metal.o)
  "_OBJC_CLASS_$_MTLTextureDescriptor", referenced from:
      objc-class-ref in libSDL2.a(SDL_render_metal.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: execution of an external program failed: 'clang   -o /private/tmp/nimxios/build/ios/NimxApp.app/NimxApp  /private/tmp/nimxios/build/ios/nimcache/main.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_system.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_sharedlist.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_locks.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_window.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_abstract_window.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_view.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_animation.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_context.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_font.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_composition.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_image.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_notification_center.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_mini_profiler.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_portable_gl.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_drag_and_drop.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_typetraits.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_tables.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_sequtils.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_hashes.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_math.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_strutils.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_parseutils.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_bitops.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_algorithm.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_unicode.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_macros.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_types.c.o /private/tmp/nimxios/build/ios/nimcache/opengl_opengl.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_system_logger.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_logging.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_times.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_options.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_strformat.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_posix.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_os.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_ospaths.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_matrixes.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_streams.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_timer.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_font_data.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_stb_ttf_glyph_provider.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_url_stream.c.o /private/tmp/nimxios/build/ios/nimcache/rect_packer_rect_packer.c.o /private/tmp/nimxios/build/ios/nimcache/ttf_ttf.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_write_image_impl.c.o /private/tmp/nimxios/build/ios/nimcache/ttf_edtaa3func.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_simple_table.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_json.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_lexbase.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_parsejson.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_asset_loading.c.o /private/tmp/nimxios/build/ios/nimcache/variant_variant.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_asset_cache.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_asset_manager.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_abstract_asset_bundle.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_asset_loader.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_pathutils.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_native_asset_bundle.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_load_image_impl.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_threadpool.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_cpuinfo.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_cpuload.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_perform_on_main_thread.c.o /private/tmp/nimxios/build/ios/nimcache/sdl2_sdl2.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_unsigned.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_worker_queue.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_http_request.c.o /private/tmp/nimxios/build/ios/nimcache/async_http_request_async_http_request.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_asyncdispatch.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_heapqueue.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_lists.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_asyncstreams.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_asyncfutures.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_deques.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_cstrutils.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_nativesockets.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_net.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_sets.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_selectors.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_kqueue.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_httpclient.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_uri.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_strtabs.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_base64.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_mimetypes.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_random.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_httpcore.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_asyncnet.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_asyncfile.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_marshal.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_typeinfo.c.o /private/tmp/nimxios/build/ios/nimcache/stdlib_intsets.c.o /private/tmp/nimxios/build/ios/nimcache/nimsl_nimsl.c.o /private/tmp/nimxios/build/ios/nimcache/nimsl_glsl_codegen.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_helper_macros.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_text_drawing.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_animation_runner.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_property_visitor.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_class_registry.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_serializers.c.o /private/tmp/nimxios/build/ios/nimcache/kiwi_kiwi.c.o /private/tmp/nimxios/build/ios/nimcache/kiwi_variable.c.o /private/tmp/nimxios/build/ios/nimcache/kiwi_constraint.c.o /private/tmp/nimxios/build/ios/nimcache/kiwi_expression.c.o /private/tmp/nimxios/build/ios/nimcache/kiwi_term.c.o /private/tmp/nimxios/build/ios/nimcache/kiwi_strength.c.o /private/tmp/nimxios/build/ios/nimcache/kiwi_util.c.o /private/tmp/nimxios/build/ios/nimcache/kiwi_symbolics.c.o /private/tmp/nimxios/build/ios/nimcache/kiwi_solver.c.o /private/tmp/nimxios/build/ios/nimcache/kiwi_symbol.c.o /private/tmp/nimxios/build/ios/nimcache/kiwi_row.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_pasteboard_item.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_sdl_window.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_event.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_keyboard.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_js_platform_detector.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_app.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_window_event_handling.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_view_event_handling.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_screen.c.o /private/tmp/nimxios/build/ios/nimcache/darwin_ui_kit.c.o /private/tmp/nimxios/build/ios/nimcache/darwin_uiscreen.c.o /private/tmp/nimxios/build/ios/nimcache/darwin_runtime.c.o /private/tmp/nimxios/build/ios/nimcache/darwin_cggeometry.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_linkage_details.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_sdl_vk_map.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_layout.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_kiwi_vector_symbolics.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_button.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_control.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_text_field.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_unistring.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_table_view_cell.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_pasteboard.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_abstract_pasteboard.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_key_commands.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_formatted_text.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_lower_bound.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_scroll_view.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_scroll_bar.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_slider.c.o /private/tmp/nimxios/build/ios/nimcache/nimx_clip_view.c.o  -lm -framework OpenGLES -framework Foundation -framework Foundation -framework OpenGLES -framework UIKit -framework GameController -framework CoreMotion -arch arm64 -framework AudioToolbox -framework CoreAudio -framework CoreGraphics -framework QuartzCore  -mios-version-min=11.2 -fobjc-link-runtime -LSDL2-2.0.9/Xcode-iOS/SDL/build/Release-iphoneos -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk -lSDL2  -ldl'
```

Here's the exact steps I've used to cause this error:

```bash
#!/bin/bash
set -e
[ -e "nimxios" ] && rm -r nimxios
mkdir nimxios
cd nimxios
wget https://www.libsdl.org/release/SDL2-2.0.9.tar.gz
tar xf SDL2-2.0.9.tar.gz
cat <<E'O'F > main.nim
import nimx / [ window, layout, button, text_field ]

runApplication:
  let w = newWindow(newRect(50, 50, 500, 150))
  w.makeLayout:
    - Label as greetingLabel: # Add a view of type Label to the window. Create a local reference to it named greetingLabel.
        center == super # center point of the label should be equal to center point of superview
        width == 300 # width should be 300 points
        height == 15 # well, this should be obvious now
        text: "Press the Greet button to see the greeting" # property "text" should be set to whatever the label should display
    - Button: # Add a view of type Button. We're not referring to it so it's anonymous.
        centerX == super # center horizontally
        top == prev.bottom + 5 # the button should be lower than the label by 5 points
        width == 100
        height == 25
        title: "Greet"
        onAction:
          greetingLabel.text = "Hello, world!"
EOF

echo 'import nimx/naketools' > nakefile.nim
mkdir res
cat <<E'O'F > res/Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>$(DEVELOPMENT_LANGUAGE)</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>$(PRODUCT_NAME)</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleVersion</key>
    <string>1</string>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>armv7</string>
        <string>metal</string>
    </array>
    <key>UIStatusBarHidden</key>
    <true/>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
</dict>
</plist>
EOF

SDL_HOME="SDL2-2.0.9" nake ios
```

And here's my version info:

```
$ nimble list -i --ver
android  [0.1.0]
argparse  [#head, 0.1.0]
async_http_request  [0.1.0]
asynctools  [0.1.0]
c2nim  [0.9.14]
cairo  [1.0]
classy  [0.0.2]
closure_compiler  [#head]
cmder  [#head]
compiler  [#head, 0.19.0]
darwin  [0.1.0]
glfw  [0.3.1]
glm  [1.1.1]
gtk2  [1.3]
httpbeast  [#head, 0.2.0]
jester  [#head]
jnim  [0.4.0]
jsbind  [0.1]
kiwi  [0.1.0]
nake  [#head, 1.9.3]
nanovg  [#head]
nimble  [0.9.0]
nimBMP  [0.1.5]
nimboost  [0.5.4]
nimfp  [0.4.3]
nimgen  [0.4.0]
nimnuklear  [0.1.0]
nimsl  [#head, 0.3]
nimx  [#head, 0.1]
objc  [0.1.0]
oldwinapi  [2.1.0]
opengl  [#head, 1.2.0]
os_files  [0.1]
parsetoml  [0.3.2]
patty  [0.3.1]
plists  [0.1.0]
rect_packer  [0.1.0]
regex  [0.8.1]
sdl2  [1.2]
ttf  [0.2.8]
ui  [0.9.2]
unicodedb  [0.6.0]
unicodeplus  [0.4.0]
variant  [0.2.8]
winim  [1.2.0]
x11  [1.0]
```

```
$ nim --version
Nim Compiler Version 0.19.1 [MacOSX: amd64]
Compiled at 2018-10-19
Copyright (c) 2006-2018 by Andreas Rumpf

git hash: 863d3ef4ed7d18877a42f0060ebe63c34a27cf32
active boot switches: -d:release
```
