mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-06-11 08:14:16 +08:00
Fix all the extension templates
This commit is contained in:
@@ -89,13 +89,13 @@ module Motion; module Project;
|
||||
end
|
||||
|
||||
# Build targets
|
||||
target_frameworks = []
|
||||
unless config.targets.empty?
|
||||
config.targets.each do |target|
|
||||
target.build(platform)
|
||||
end
|
||||
|
||||
# Prepare target frameworks
|
||||
target_frameworks = []
|
||||
config.targets.select { |t| t.type == :framework && t.load? }.each do |target|
|
||||
target_frameworks << target.framework_name
|
||||
end
|
||||
|
||||
17
lib/motion/project/template/ios-action-extension/files/.gitignore
vendored
Normal file
17
lib/motion/project/template/ios-action-extension/files/.gitignore
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
.repl_history
|
||||
build
|
||||
tags
|
||||
app/pixate_code.rb
|
||||
resources/*.nib
|
||||
resources/*.momd
|
||||
resources/*.storyboardc
|
||||
.DS_Store
|
||||
nbproject
|
||||
.redcar
|
||||
#*#
|
||||
*~
|
||||
*.sw[po]
|
||||
.eprj
|
||||
.sass-cache
|
||||
.idea
|
||||
.dat*.*
|
||||
@@ -0,0 +1,4 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'rake'
|
||||
# Add your dependencies here:
|
||||
@@ -1,15 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
$:.unshift("/Library/RubyMotion/lib")
|
||||
require 'motion/project/template/ios-extension'
|
||||
|
||||
begin
|
||||
require 'bundler'
|
||||
Bundler.require
|
||||
rescue LoadError
|
||||
end
|
||||
|
||||
Motion::Project::App.setup do |app|
|
||||
# Use `rake config' to see complete project settings.
|
||||
app.extension do |ext|
|
||||
ext.name = '<%= extension_name %>'
|
||||
ext.type = 'ui-services'
|
||||
ext.attributes = {
|
||||
"NSExtensionActivationRule" => "TRUEPREDICATE",
|
||||
"NSExtensionPointName" => "com.apple.ui-services",
|
||||
"NSExtensionPointVersion" => "1.0"
|
||||
}
|
||||
ext.frameworks << "MobileCoreServices"
|
||||
end
|
||||
end
|
||||
app.name = '<%= name %>'
|
||||
app.frameworks << 'MobileCoreServices'
|
||||
app.info_plist['NSExtension'] = {
|
||||
'NSExtensionAttributes' => {
|
||||
'NSExtensionActivationRule' => {
|
||||
'NSExtensionActivationSupportsFileWithMaxCount' => 0,
|
||||
'NSExtensionActivationSupportsImageWithMaxCount' => 1,
|
||||
'NSExtensionActivationSupportsMovieWithMaxCount' => 0,
|
||||
'NSExtensionActivationSupportsText' => false,
|
||||
'NSExtensionActivationSupportsWebURLWithMaxCount' => 0
|
||||
},
|
||||
'NSExtensionPointName' => 'com.apple.ui-services',
|
||||
'NSExtensionPointVersion' => '1.0'
|
||||
},
|
||||
# Use 'NSExtensionPrincipalClass' if you want to setup the UI in code
|
||||
# 'NSExtensionPrincipalClass' => 'ActionViewController',
|
||||
'NSExtensionMainStoryboard' => 'MainInterface',
|
||||
'NSExtensionPointIdentifier' => 'com.apple.ui-services'
|
||||
}
|
||||
end
|
||||
@@ -20,13 +20,14 @@ class ActionViewController < UIViewController
|
||||
if itemProvider.hasItemConformingToTypeIdentifier(KUTTypeImage)
|
||||
# This is an image. We'll load it, then place it in our image view.
|
||||
imageView = WeakRef.new(self.imageView)
|
||||
itemProvider.loadItemForTypeIdentifier(KUTTypeImage, options:nil, completionHandler: proc { |image, error|
|
||||
if image
|
||||
itemProvider.loadItemForTypeIdentifier(KUTTypeImage, options:nil, completionHandler: proc { |url, error|
|
||||
if url
|
||||
image = UIImage.alloc.initWithData(NSData.dataWithContentsOfURL(url))
|
||||
NSOperationQueue.mainQueue.addOperationWithBlock(proc {
|
||||
imageView.setImage(image)
|
||||
}.weak!)
|
||||
})
|
||||
end
|
||||
}.weak!)
|
||||
})
|
||||
|
||||
imageFound = true
|
||||
break
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6205" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="ObA-dk-sSI">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6198"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Image-->
|
||||
<scene sceneID="7MM-of-jgj">
|
||||
<objects>
|
||||
<viewController title="Image" id="ObA-dk-sSI" customClass="ActionViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="qkL-Od-lgU"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="n38-gi-rB5"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="zMn-AG-sqS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="528"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<navigationBar contentMode="scaleToFill" horizontalCompressionResistancePriority="751" verticalCompressionResistancePriority="751" translatesAutoresizingMaskIntoConstraints="NO" id="NOA-Dm-cuz">
|
||||
<rect key="frame" x="0.0" y="20" width="320" height="44"/>
|
||||
<items>
|
||||
<navigationItem id="3HJ-uW-3hn">
|
||||
<barButtonItem key="leftBarButtonItem" title="Done" style="done" id="WYi-yp-eM6">
|
||||
<connections>
|
||||
<action selector="done" destination="ObA-dk-sSI" id="Qdu-qn-U6V"/>
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
</navigationItem>
|
||||
</items>
|
||||
</navigationBar>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="9ga-4F-77Z">
|
||||
<rect key="frame" x="0.0" y="64" width="320" height="464"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="NOA-Dm-cuz" secondAttribute="trailing" id="A05-Pj-hrr"/>
|
||||
<constraint firstItem="9ga-4F-77Z" firstAttribute="top" secondItem="NOA-Dm-cuz" secondAttribute="bottom" id="Fps-3D-QQW"/>
|
||||
<constraint firstItem="NOA-Dm-cuz" firstAttribute="leading" secondItem="zMn-AG-sqS" secondAttribute="leading" id="HxO-8t-aoh"/>
|
||||
<constraint firstAttribute="trailing" secondItem="9ga-4F-77Z" secondAttribute="trailing" id="Ozw-Hg-0yh"/>
|
||||
<constraint firstItem="9ga-4F-77Z" firstAttribute="leading" secondItem="zMn-AG-sqS" secondAttribute="leading" id="XH5-ld-ONA"/>
|
||||
<constraint firstItem="n38-gi-rB5" firstAttribute="top" secondItem="9ga-4F-77Z" secondAttribute="bottom" id="eQg-nn-Zy4"/>
|
||||
<constraint firstItem="NOA-Dm-cuz" firstAttribute="top" secondItem="qkL-Od-lgU" secondAttribute="bottom" id="we0-1t-bgp"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<size key="freeformSize" width="320" height="528"/>
|
||||
<connections>
|
||||
<outlet property="imageView" destination="9ga-4F-77Z" id="5y6-5w-9QO"/>
|
||||
<outlet property="view" destination="zMn-AG-sqS" id="Qma-de-2ek"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="X47-rx-isc" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="252" y="-124"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4">
|
||||
<size key="portraitSize" width="320" height="568"/>
|
||||
<size key="landscapeSize" width="568" height="320"/>
|
||||
</simulatedScreenMetrics>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
17
lib/motion/project/template/ios-custom-keyboard/files/.gitignore
vendored
Normal file
17
lib/motion/project/template/ios-custom-keyboard/files/.gitignore
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
.repl_history
|
||||
build
|
||||
tags
|
||||
app/pixate_code.rb
|
||||
resources/*.nib
|
||||
resources/*.momd
|
||||
resources/*.storyboardc
|
||||
.DS_Store
|
||||
nbproject
|
||||
.redcar
|
||||
#*#
|
||||
*~
|
||||
*.sw[po]
|
||||
.eprj
|
||||
.sass-cache
|
||||
.idea
|
||||
.dat*.*
|
||||
@@ -0,0 +1,4 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'rake'
|
||||
# Add your dependencies here:
|
||||
17
lib/motion/project/template/ios-document-picker/files/.gitignore
vendored
Normal file
17
lib/motion/project/template/ios-document-picker/files/.gitignore
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
.repl_history
|
||||
build
|
||||
tags
|
||||
app/pixate_code.rb
|
||||
resources/*.nib
|
||||
resources/*.momd
|
||||
resources/*.storyboardc
|
||||
.DS_Store
|
||||
nbproject
|
||||
.redcar
|
||||
#*#
|
||||
*~
|
||||
*.sw[po]
|
||||
.eprj
|
||||
.sass-cache
|
||||
.idea
|
||||
.dat*.*
|
||||
@@ -0,0 +1,4 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'rake'
|
||||
# Add your dependencies here:
|
||||
@@ -1,11 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
$:.unshift("/Library/RubyMotion/lib")
|
||||
require 'motion/project/template/ios-extension'
|
||||
|
||||
begin
|
||||
require 'bundler'
|
||||
Bundler.require
|
||||
rescue LoadError
|
||||
end
|
||||
|
||||
Motion::Project::App.setup do |app|
|
||||
# Use `rake config' to see complete project settings.
|
||||
app.extension do |ext|
|
||||
ext.name = '<%= extension_name %>'
|
||||
ext.type = "fileprovider-ui"
|
||||
ext.attributes = {
|
||||
app.name = '<%= name %>'
|
||||
app.info_plist['NSExtension'] = {
|
||||
'NSExtensionAttributes' => {
|
||||
"UIDocumentPickerModes" => [
|
||||
"UIDocumentPickerModeImport",
|
||||
"UIDocumentPickerModeOpen",
|
||||
@@ -15,6 +22,11 @@ Motion::Project::App.setup do |app|
|
||||
"UIDocumentPickerSupportedFileTypes" => [
|
||||
"public.content"
|
||||
]
|
||||
}
|
||||
end
|
||||
end
|
||||
},
|
||||
# 'NSExtensionPrincipalClass' => 'DocumentPickerViewController',
|
||||
'NSExtensionMainStoryboard' => 'MainInterface',
|
||||
'NSExtensionPointIdentifier' => 'com.apple.fileprovider-ui'
|
||||
}
|
||||
#
|
||||
app.entitlements['com.apple.security.application-groups'] = '<%= name %>'
|
||||
end
|
||||
@@ -1,4 +1,4 @@
|
||||
class DocumentPickerViewController < UIDocumentPickerExtensionViewController
|
||||
class DocumentPickerViewController < UIDocumentPickerExtensionViewController
|
||||
|
||||
def openDocument(sender)
|
||||
documentURL = self.documentStorageURL.URLByAppendingPathComponent("Untitled.txt")
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.sdf.Extension-Test</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6095.4" systemVersion="13D43" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="J6p-g8-CHO">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6100.2"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!-- View Controller-->
|
||||
<scene sceneID="Q8I-MS-tKG">
|
||||
<objects>
|
||||
<viewController id="J6p-g8-CHO" customClass="DocumentPickerViewController" customModuleProvider="" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="hST-wJ-eYy"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="UQD-kz-Mfv"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Vdh-Gp-eV6">
|
||||
<rect key="frame" x="0.0" y="0.0" width="350" height="400"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mym-YX-cEY">
|
||||
<rect key="frame" x="137" y="185" width="76" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" title="Untitled.txt">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="openDocument:" destination="J6p-g8-CHO" eventType="touchUpInside" id="HtB-86-uWI"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<size key="freeformSize" width="350" height="400"/>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="UoZ-ya-W3e" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-163" y="-156"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
@@ -314,7 +314,7 @@ EOS
|
||||
ib_resources.each do |src, dest|
|
||||
if !File.exist?(dest) or File.mtime(src) > File.mtime(dest)
|
||||
App.info 'Compile', src
|
||||
sh "/usr/bin/ibtool --compile \"#{dest}\" \"#{src}\""
|
||||
sh "/usr/bin/ibtool --compile \"#{File.expand_path(dest)}\" \"#{File.expand_path(src)}\""
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
$:.unshift("/Library/RubyMotion/lib")
|
||||
require 'motion/project/template/ios-extension'
|
||||
|
||||
begin
|
||||
require 'bundler'
|
||||
Bundler.require
|
||||
rescue LoadError
|
||||
end
|
||||
|
||||
Motion::Project::App.setup do |app|
|
||||
# Use `rake config' to see complete project settings.
|
||||
app.extension do |ext|
|
||||
ext.name = '<%= extension_name %>'
|
||||
ext.type = "fileprovider-nonui"
|
||||
# TODO: its not inside attributes!
|
||||
ext.attributes = {
|
||||
"NSExtensionFileProviderDocumentGroup" => "group.sdf.Extension-Test"
|
||||
}
|
||||
end
|
||||
app.name = '<%= name %>'
|
||||
app.info_plist['NSExtension'] = {
|
||||
'NSExtensionAttributes' => {
|
||||
"NSExtensionFileProviderDocumentGroup" => "<%= name %>"
|
||||
},
|
||||
'NSExtensionPrincipalClass' => 'FileProvider',
|
||||
'NSExtensionPointIdentifier' => 'com.apple.fileprovider-nonui'
|
||||
}
|
||||
app.entitlements['com.apple.security.application-groups'] = '<%= name %>'
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.sdf.Extension-Test</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
17
lib/motion/project/template/ios-photo-editing/files/.gitignore
vendored
Normal file
17
lib/motion/project/template/ios-photo-editing/files/.gitignore
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
.repl_history
|
||||
build
|
||||
tags
|
||||
app/pixate_code.rb
|
||||
resources/*.nib
|
||||
resources/*.momd
|
||||
resources/*.storyboardc
|
||||
.DS_Store
|
||||
nbproject
|
||||
.redcar
|
||||
#*#
|
||||
*~
|
||||
*.sw[po]
|
||||
.eprj
|
||||
.sass-cache
|
||||
.idea
|
||||
.dat*.*
|
||||
@@ -0,0 +1,4 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'rake'
|
||||
# Add your dependencies here:
|
||||
@@ -1,14 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
$:.unshift("/Library/RubyMotion/lib")
|
||||
require 'motion/project/template/ios-extension'
|
||||
|
||||
begin
|
||||
require 'bundler'
|
||||
Bundler.require
|
||||
rescue LoadError
|
||||
end
|
||||
|
||||
Motion::Project::App.setup do |app|
|
||||
# Use `rake config' to see complete project settings.
|
||||
app.extension do |ext|
|
||||
ext.name = '<%= extension_name %>'
|
||||
ext.type = "photo-editing"
|
||||
ext.attributes = {
|
||||
app.name = '<%= name %>'
|
||||
app.frameworks << "Photos"
|
||||
app.frameworks << "PhotosUI"
|
||||
app.info_plist['NSExtension'] = {
|
||||
'NSExtensionAttributes' => {
|
||||
"PHSupportedMediaTypes" => ["Image"]
|
||||
}
|
||||
ext.frameworks << "Photos"
|
||||
ext.frameworks << "PhotosUI"
|
||||
end
|
||||
end
|
||||
},
|
||||
'NSExtensionPrincipalClass' => 'PhotoEditingViewController',
|
||||
'NSExtensionPointIdentifier' => 'com.apple.photo-editing'
|
||||
}
|
||||
end
|
||||
@@ -4,7 +4,18 @@ class PhotoEditingViewController < UIViewController
|
||||
|
||||
def viewDidLoad
|
||||
super
|
||||
# Do any additional setup after loading the view.
|
||||
|
||||
self.view.backgroundColor = UIColor.whiteColor
|
||||
|
||||
label = UILabel.alloc.init
|
||||
label.text = "Hello World"
|
||||
label.textColor = UIColor.blackColor
|
||||
label.textAlignment = NSTextAlignmentCenter
|
||||
label.setTranslatesAutoresizingMaskIntoConstraints(false)
|
||||
self.view.addSubview(label)
|
||||
|
||||
self.view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("|-[label]-|", options:0, metrics:nil, views:{"label" => label}))
|
||||
self.view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|-[label]-|", options:0, metrics:nil, views:{"label" => label}))
|
||||
end
|
||||
|
||||
def didReceiveMemoryWarning
|
||||
|
||||
17
lib/motion/project/template/ios-share-extension/files/.gitignore
vendored
Normal file
17
lib/motion/project/template/ios-share-extension/files/.gitignore
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
.repl_history
|
||||
build
|
||||
tags
|
||||
app/pixate_code.rb
|
||||
resources/*.nib
|
||||
resources/*.momd
|
||||
resources/*.storyboardc
|
||||
.DS_Store
|
||||
nbproject
|
||||
.redcar
|
||||
#*#
|
||||
*~
|
||||
*.sw[po]
|
||||
.eprj
|
||||
.sass-cache
|
||||
.idea
|
||||
.dat*.*
|
||||
@@ -0,0 +1,4 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'rake'
|
||||
# Add your dependencies here:
|
||||
@@ -1,15 +1,31 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
$:.unshift("/Library/RubyMotion/lib")
|
||||
require 'motion/project/template/ios-extension'
|
||||
|
||||
begin
|
||||
require 'bundler'
|
||||
Bundler.require
|
||||
rescue LoadError
|
||||
end
|
||||
|
||||
Motion::Project::App.setup do |app|
|
||||
# Use `rake config' to see complete project settings.
|
||||
app.extension do |ext|
|
||||
ext.name = '<%= extension_name %>'
|
||||
ext.type = "share-services"
|
||||
ext.attributes = {
|
||||
"NSExtensionActivationRule" => "TRUEPREDICATE"
|
||||
"NSExtensionPointName" => "1.0"
|
||||
"NSExtensionPointVersion" => "1.0"
|
||||
}
|
||||
ext.frameworks << "MobileCoreServices"
|
||||
end
|
||||
app.name = '<%= name %>'
|
||||
app.frameworks << 'Social'
|
||||
app.info_plist['NSExtension'] = {
|
||||
'NSExtensionAttributes' => {
|
||||
'NSExtensionActivationRule' => {
|
||||
'NSExtensionActivationSupportsFileWithMaxCount' => 0,
|
||||
'NSExtensionActivationSupportsImageWithMaxCount' => 1,
|
||||
'NSExtensionActivationSupportsMovieWithMaxCount' => 0,
|
||||
'NSExtensionActivationSupportsText' => false,
|
||||
'NSExtensionActivationSupportsWebURLWithMaxCount' => 0
|
||||
},
|
||||
'NSExtensionPointName' => 'com.apple.share-services',
|
||||
'NSExtensionPointVersion' => '1.0'
|
||||
},
|
||||
'NSExtensionPrincipalClass' => 'ShareViewController',
|
||||
'NSExtensionPointIdentifier' => 'com.apple.share-services'
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
$:.unshift("/Library/RubyMotion/lib")
|
||||
require 'motion/project/template/ios-extension.rb'
|
||||
require 'motion/project/template/ios-extension'
|
||||
|
||||
begin
|
||||
require 'bundler'
|
||||
|
||||
Reference in New Issue
Block a user