![]() See more in Create run/debug configurations for tests. When creating a Swift Package Test configuration, you need to select a test target in the Target field: AppCode will suggest you the lists of targets and executables available in the manifest file: ![]() To create a configuration from the Swift Package Run template, you have to specify a target and executable in the corresponding fields. To create a new run/debug configuration for a Swift package or Swift package test, click the in the top left corner of the Run/Debug Configurations dialog and select Swift Package Run or Swift Package Test. See more in the Run/debug configurations section. In the Before launch section, you can set up the actions that should be executed prior to launching the run/debug configuration, for example, opening some link in a web browser. Here you can specify a working directory, program arguments, and environment variables. In the dialog that opens, select the configuration that you want to edit: To edit a run/debug configuration, click Edit Configuration in the run/debug configurations selector. You can also run tests with coverage: select a test run/debug configuration and click. To start debugging, set breakpoints and press Shift+F9 or click. To run a Swift package or test, select its configuration in the list and press Shift+F10 or click on the toolbar. To do this, click in the top-right corner of the editor or press ⇧⌘I: Run/debug Swift packagesĪppCode automatically creates run/debug configurations for all products and test targets in the package manifest: When editing the Package.swift file in AppCode, you can use the target name and path completion:Įvery time you edit the manifest file, the structure of the Swift Package Manager project changes, and you need to load these changes to AppCode. In the dialog that opens select a folder where the new package will be created and click Open Project.ĪppCode will create an empty Swift package project and default run/debug configurations for the library and tests: Edit the package manifest file On the next page, type the package name and click Finish: Select Multiplatform| Framework & Library | Swift Package and click Next: In AppCode, you can create standalone Swift packages using the New Project wizard:įrom the main menu select File | New Project or click the New Project button from the Welcome screen. If code assistance features are unavailable for your Swift package project, try to resolve Swift package dependencies. General code assistance features (completion, highlighting, and navigation) that you have in a regular Xcode project are available for Swift packages as well. You can manually invoke the synchronization later by selecting Tools | Swift Package Manager | Resolve Dependencies from the main menu or Swift Package Manager | Resolve Dependencies from the context menu of the Project tool window: ![]() After loading a project, AppCode will start syncing its dependencies declared in Package.swift.
0 Comments
Leave a Reply. |