[iOS8] add codesigning for embedded frameworks

http://hipbyte.myjetbrains.com/youtrack/issue/RM-558
This commit is contained in:
Watson
2014-08-20 15:17:37 +09:00
parent 3962728508
commit 57f09234d7

View File

@@ -99,6 +99,16 @@ PLIST
# Codesign.
codesign_cmd = "CODESIGN_ALLOCATE=\"#{File.join(config.platform_dir(platform), 'Developer/usr/bin/codesign_allocate')}\" /usr/bin/codesign"
app_frameworks = File.join(config.app_bundle(platform), 'Frameworks')
config.embedded_frameworks.each do |framework|
framework_path = File.join(app_frameworks, File.basename(framework))
if File.mtime(config.project_file) > File.mtime(framework_path) \
or !system("#{codesign_cmd} --verify \"#{framework_path}\" >& /dev/null")
App.info 'Codesign', framework_path
sh "#{codesign_cmd} -f -s \"#{config.codesign_certificate}\" --preserve-metadata=\"identifier,entitlements,resource-rules\" \"#{framework_path}\""
end
end
if File.mtime(config.project_file) > File.mtime(bundle_path) \
or !system("#{codesign_cmd} --verify \"#{bundle_path}\" >& /dev/null")
App.info 'Codesign', bundle_path