Swift UIImage named returns nil with universal image in assets
<p>I have an iPhone app (iOS/Swift) Xcode project.
I have an image called map_pin_icon.svg saved to my Desktop (from wikicommons @ <a href="https://commons.wikimedia.org/wiki/File:Map_pin_icon.svg" rel="nofollow">https://commons.wikimedia.org/wiki/File:Map_pin_icon.svg</a>).</p>

<p>I drag and drop it into my Xcode project's Assets.xcassets folder, and it shows up in the list. When I click on map_pin_icon in the list (below the app icon set) and it says the image set has a Universal image for Any/Any size, but the icon it shows is the blank file icon, not the icon in the image file. If I select the Universal image and press spacebar it shows the correct icon in a "quick view" window.</p>

<p>In ViewController.swift I have in viewDidLoad():</p>

<pre><code>    let theImage = UIImage(named: "map_pin_icon.svg")
    if(theImage == nil) {
        print("NIL IS NOT ALLOWED")
    } else {
        print("\(theImage)")
    }
    let theImageView = UIImageView(image: theImage)
</code></pre>

<p>And sure enough when I run the simulator (iOS 8.0 on iPhone 4s, which is my minimum desired compatibility device) I get the following output log:</p>

<pre><code>    NIL IS NOT ALLOWED
</code></pre>

<p>Where am I going wrong? Thanks in advance.</p>