mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-24 04:46:05 +08:00
[iOS8] add codesigning for embedded frameworks
http://hipbyte.myjetbrains.com/youtrack/issue/RM-558
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user