Previously distributed through: Gumroad ($0+)
Automated and localized App Store Screenshots without leaving Xcode.
Blacksmith supports installation via Swift Package Manager. To install, add the package via this url:
https://github.com/chFlorian/Blacksmith
Blacksmith is used to automatically generated simple App Store screenshots for multiple localizations.
import Blacksmith
import XCTest
import SwiftUI
classForgeUITests:XCTestCase{func testScreenshot_AddElementToLayoutBuilder()throws{letapp=XCUIApplication() app.launchArguments =["-AppleLanguages","(en)"]
app.launch()letwindow= app.windows.firstMatch
window.outlines.buttons["🛠 Layout Builder"].click()letaddElementButton= window.toolbars.buttons["Add Element"]
addElementButton.click()letscreenshot= app.screenshot()You can either use quickExportWithTitle directly on the XCUIScreenshot or follow step 6 and 7
letexportSize=ExportSize.mac
letcapturingView=ScreenshotWithTitle(
title:"Create your own image layouts.", image: screenshot.image, background:.color(.blue),
exportSize:.mac
)leturl=FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent("result.png")exportMarketing(image: capturingView, toURL: url) app.terminate()}}import Blacksmith
import XCTest
import SwiftUI
classForgeUITests:XCTestCase{func testExample()throws{letapp=XCUIApplication()
app.launchArguments =["-AppleLanguages","(en)"]
app.launch()letwindow=XCUIApplication().windows.firstMatch
window.outlines.buttons["🛠 Layout Builder"].click()letaddElementButton= window.toolbars.buttons["Add Element"]
addElementButton.click()letscreenshot= app.screenshot()letexportSize=ExportSize.mac
letcapturingView=ScreenshotWithTitle(
title:"Create your own image layouts.", image: screenshot.image, background:.color(.blue),
exportSize:.mac
)leturl=FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent("result.png")exportMarketing(image: capturingView, toURL: url)
app.terminate()}}