diff --git a/lib/motion/project/builder.rb b/lib/motion/project/builder.rb index 93275b9d..d29eb36e 100644 --- a/lib/motion/project/builder.rb +++ b/lib/motion/project/builder.rb @@ -487,6 +487,8 @@ def build(config, platform, opts) end end + embed_provisioning_profile(config, bundle_path) + # Optional support for #eval (OSX-only). if config.respond_to?(:eval_support) and config.eval_support repl_dylib_path = File.join(datadir, '..', 'librubymotion-repl.dylib') @@ -554,6 +556,10 @@ def copy_resource(res_path, dest_path) end end + def embed_provisioning_profile(config, bundle) + + end + def profile(config, platform, config_plist) plist_path = File.join(config.versionized_build_dir(platform), 'pbxperfconfig.plist') App.info('Create', plist_path) diff --git a/lib/motion/project/template/osx/builder.rb b/lib/motion/project/template/osx/builder.rb index 40d744cf..087adfb9 100644 --- a/lib/motion/project/template/osx/builder.rb +++ b/lib/motion/project/template/osx/builder.rb @@ -104,5 +104,13 @@ def codesign_bundle(config, bundle) sh(command) end end + + def embed_provisioning_profile(config, bundle) + if config.provisioning_profile + bundle_provision = File.join(bundle, "embedded.provisionprofile") + App.info 'Copy', bundle_provision + FileUtils.cp config.provisioning_profile, bundle_provision + end + end end end; end diff --git a/lib/motion/project/template/osx/config.rb b/lib/motion/project/template/osx/config.rb index 6e631d22..ebe46a30 100644 --- a/lib/motion/project/template/osx/config.rb +++ b/lib/motion/project/template/osx/config.rb @@ -33,7 +33,7 @@ class OSXConfig < XcodeConfig variable :icon, :copyright, :category, :embedded_frameworks, :external_frameworks, :codesign_for_development, :codesign_for_release, - :eval_support + :eval_support, :provisioning_profile def initialize(project_dir, build_mode) super @@ -44,6 +44,7 @@ def initialize(project_dir, build_mode) @codesign_for_development = false @codesign_for_release = true @eval_support = false + @provisioning_profile = nil end def platforms; ['MacOSX']; end