Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
669f926a
Commit
669f926a
authored
Oct 16, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1427 from ulrikdamm/master
Compile .xcassets files from pods
parents
f3d66709
1dc69810
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
CHANGELOG.md
CHANGELOG.md
+4
-0
copy_resources_script.rb
lib/cocoapods/generator/copy_resources_script.rb
+12
-0
No files found.
CHANGELOG.md
View file @
669f926a
...
...
@@ -96,6 +96,10 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[
Fabio Pelosin
](
https://github.com/irrationalfab
)
[
#1273
](
https://github.com/CocoaPods/CocoaPods/pull/1273
)
*
Compiles xcassets from pods.
[
Ulrik Damm
](
https://github.com/ulrikdamm
)
[
#1427
](
https://github.com/CocoaPods/CocoaPods/pull/1427
)
###### Bug Fixes
*
The search paths of vendored frameworks and libraries now are always
...
...
lib/cocoapods/generator/copy_resources_script.rb
View file @
669f926a
...
...
@@ -73,6 +73,7 @@ module Pod
script
+=
%Q[install_resource "
#{
resource
}
"
\n
]
end
script
+=
RSYNC_CALL
script
+=
XCASSETS_COMPILE
script
end
...
...
@@ -109,6 +110,8 @@ install_resource()
echo "xcrun momc
\\
"${PODS_ROOT}/$1
\\
"
\\
"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd
\\
""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
*.xcassets)
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
...
...
@@ -131,6 +134,15 @@ fi
rm -f "$RESOURCES_TO_COPY"
EOS
XCASSETS_COMPILE
=
<<
EOS
if [ `find . -name '*.xcassets' | wc -l` -ne 0 ]
then
DEVICE=`if [ "${TARGETED_DEVICE_FAMILY}" -eq 1 ]; then echo "iphone"; else echo "ipad"; fi`
actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" --target-device ${DEVICE} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app" `find $PWD -name '*.xcassets'`
fi
EOS
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment