1/16/2024 0 Comments Swift note derpibooru![]() This doesn’t cause any changes to the execution of the scripts, but it makes Xcode more aware of the files you will change or use in your scripts. Xcrun -sdk macosx swiftc -parse-as-library $SCRIPT_INPUT_FILE_0 \ In the run phase you added, add to the Input Files list $(SRCROOT)/Scripts/HelloXcode.swift and update the script to: This way, your scripts can be more dynamic and portable to use. Think of it as sending a file as a parameter to a function. Xcode’s run phase allows you to specify files as configuration instead of having them explicit in the script. You’ll see the message you printed logged directly in Xcode’s log. The difference between this and what you did before on the terminal is that Xcode executes these scripts on the path of the project file - that’s why adding Scripts/ is important.īuild the project to try out the new script and build phase you just added, then open the build log when it finishes. Xcrun -sdk macosx swiftc -parse-as-library Scripts/HelloXcode.swift \ Going back to the new phase you added a moment ago, delete the commented line and add these commands: For this tutorial, you’ll add new operations to the beginning - so when you add a new run script phase, drag it to the top of the list. However, you may want to add your own operations at specific moments.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |