• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Marxon13/iOS-Asset-Extractor: A tool to extract image assets from the iOS SDK.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

Marxon13/iOS-Asset-Extractor

开源软件地址:

https://github.com/Marxon13/iOS-Asset-Extractor

开源编程语言:

Objective-C 96.6%

开源软件介绍:

iOS Asset Extractor

iOS Asset Extractor is a tool to extract images from the iOS SDK. It extracts PNGs, PDFs, and CAR files. I made this tool as I base the icons and images I use in my apps off of the images in Apple's stock apps. And it is much easier to have the original files, than it is to take screenshots.

Features:

  • Exports PDF, PNG, and CAR resources.
  • Exports image and PDF assets from CAR files.
  • Takes a single file, or a directory for searching as input.
  • Exports the files to a single directory, or group by the bundle they came from.

Usage:

Note: The iOSAssetExtractor executable must be next to the CARExtractor executable in order for the program to work.

$ iOSAssetExtractor -i "inputFileOrFolder" -o "outputDirectory" -g 1 -t PDF,CAR,PNG

The "i" flag is for the input file or directory to export from. If a single file, just that file is exported. If a directory is given, the directory is searched for files to export.

The "o" flag is for the directory that you want the images exported to.

The "g" flag is optional. Set it if you want the output to be grouped by bundle. The flag needs to have a 1 behind it to be set, I wasn't sure how to know the flag was set by "-g". There is a surprising lack of information on building command line tools that take flags... or command line tools in general.

The "t" flag is optional. Set it to only export specific file types. The types should be listed a a comma separated string. The types currently supported are "PDF", "CAR", and "PNG".

Examples:

Export iOS Simulator SDK:

./iOSAssetExtractor -i /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -o /Users/bmcquilkin/Desktop/ExportIOS -g 1

Export TVOS Simulator SDK:

./iOSAssetExtractor -i /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk -o /Users/bmcquilkin/Desktop/ExportTV -g 1

Export WatchOS Simulator SDK:

./iOSAssetExtractor -i /Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk -o /Users/bmcquilkin/Desktop/ExportWatch -g 1

Export OSX SDK:

./iOSAssetExtractor -i /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -o /Users/bmcquilkin/Desktop/ExportOSX -g 1

Project Notes:

  • The car extractor needed to be placed in a separate executable. CoreUI seems to check if the current process has already loaded an "Assets.car" file, and if it has it throws a EXC_BAD_ACCESS exception. The way I found to get around it is to spawn a new extraction process for each car file we need to export. And to do that, I needed to create a separate exceutable that only extracted a single car file, and run the car extractor through NSTask as a separate process.

    There is probably a way to completely remove the evidence that a given process already loaded a car file, but this seems like an easier solution.

Contact Me:

If you have any questions comments or suggestions, send me a message. If you find a bug, or want to submit a pull request, let me know.

License:

MIT License

Copyright (c) 2016 Brandon McQuilkin

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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap