教您的计算机自动为您创建 App 筛幕截图,这样您就不必再做这个工作了。本项目简化了创建自动 App 筛幕截图的 iOS 应用的过程。需要一些装配,因为您需要定义您的屏幕截图。一旦完成,此代码将处理剩下的工作。
有关更多详细信息,请参阅此博客文章:http://ksuther.com/2013/02/24/automating-ios-app-store-screenshots
git submodule update --init
检出 ios-sim 子模块。KSScreenshotManager.h
、KSScreenshotManager.m
、KSScreenshotAction.h
和 KSScreenshotAction.m
添加到项目中KSScreenshotManager
并覆盖 setupScreenshotActions
您还可以使用 CocoaPods。您应该在 XCode 中创建一个目标副本,这样 KSScreenshotManager 就不会包含在您的发布构建中。然后,将此添加到您的 Podfile 中
# Replace 'Screenhots Target' with your separate target name
target 'Screenshots Target', :exclusive => true do
pod 'KSScreenshotManager'
end
示例项目位于 Example 文件夹中(惊喜!)。它有一个非常简单的 KSScreenshotManager 扩展名,名为 MyScreenshotManager。您可以使用以下命令运行它
python make_screenshots.py config.json.example
这将编译示例项目、ios-sim,然后使用 ios-sim 运行模拟器构建并将截图存储到 /tmp/screenshots 中。
请确保在克隆此仓库后,通过运行 git submodule update --init
检出 ios-sim 作为子模块,否则 make_screenshots.py
不会工作。
MIT 许可协议
Copyright (c) 2013 Kent Sutherland
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.