4 Replies
      Latest reply on Dec 30, 2019 9:22 AM by Ibin
      mbueno Level 1 Level 1 (0 points)

        When I try to import the UIKit into Xcode Playgrounds, the error 'No such module' appears. Does anyone know how to fix this?

        • Re: import UIKit error
          eskimo Apple Staff Apple Staff (12,705 points)

          Are you sure you created an iOS playground; this is exactly the error you’d get if you created a macOS playground and then tried to import UIKit.

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"

          • Re: import UIKit error
            Luca_65 Level 1 Level 1 (0 points)

            I had the same error with xCode 9.3; even creating a iOS Playground.

            After some failed tentatives, I closed xCode and reopened it and this time was able to import UIKit.

            • Re: import UIKit error
              crush Level 1 Level 1 (0 points)

              With your playground window open, open the left-hand and right-hand sidebars from the window's toolbar.  On the left, click on the name of your playground.  On the right, you should see some options including "Playground Settings" and "Platform".  Make sure it's set to "iOS" instead of "macOS"