If i typeswifton the

terminal, the console screen will appear, so you can play with it, but you can not import UIKit etc., so it is in UIKit It is very disappointing that we cannot check the operation of the class.
So I'm looking for something like a console screen that can be checked easily using UIkit without having to press the xcode play button and stop at breakPoint.
Please let me know if there is any good console tool.

  • Answer # 1


    A good console tool

    Unfortunately I don't know. But if you have MacOS, you can install Xcode and start playground with Get started with a playground. Of course, you can import UIKit and Faundation. I have a playground on the side where the project is running, and use it when I want to write a small function to check it. If there is no error in the code, it will run automatically and it is helpful.

    After that, play with Swift Playgrounds on a relatively new iPad.

  • Answer # 2

    Are you building with xcodebuild and starting the simulator with xcrun?
    Of course XCode is required. .

    Once the build environment has been prepared, it seems likely that a general-purpose script will be applied for the purpose of checking simple code, but Playground seems to be attacked by a feeling like Rakuchin after all.