Skip to content
Permalink
Browse files

Add new struct files

  • Loading branch information
ivanvorobei committed Nov 3, 2019
1 parent 9c49d32 commit 97700d4bf95550a8adc305fc0c7dd88ed51b5818
@@ -5,4 +5,4 @@ patreon: ivanvorobei
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: # https://xcode-shop.com
custom: https://xcode-shop.com
@@ -0,0 +1,10 @@
import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
return true
}
}

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15509"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
@@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -0,0 +1,10 @@
import UIKit

class ViewController: UIViewController {

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
SPPermission.request(mode: .native, permissions: [.notification])
}
}

@@ -0,0 +1,43 @@
<?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>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
@@ -0,0 +1,79 @@
Pod::Spec.new do |s|

s.name = "SPPermission"
s.version = "5.0"
s.summary = "API to ask for permissions on Swift. Available diffrents dialogs."
s.homepage = "https://github.com/IvanVorobei/SPPermission"
s.source = { :git => "https://github.com/IvanVorobei/SPPermission.git", :tag => s.version }
s.license = { :type => "MIT", :file => "LICENSE" }

s.author = { "Ivan Vorobei" => "hello@ivanvorobei.by" }

s.platform = :ios
s.ios.framework = 'UIKit'
s.swift_version = ['4.2', '5.0']
s.ios.deployment_target = "10.0"
s.requires_arc = true

s.default_subspec = 'Core'

s.subspec 'Core' do |co|
co.source_files = "Source/SPPermission/**/*.swift"
end

s.subspec 'Camera' do |cm|
cm.dependency 'SPPermission/Core'
cm.pod_target_xcconfig = { "SWIFT_ACTIVE_COMPILATION_CONDITIONS" => "SPPERMISSION_CAMERA" }
end

s.subspec 'PhotoLibrary' do |pl|
pl.dependency 'SPPermission/Core'
pl.pod_target_xcconfig = { "SWIFT_ACTIVE_COMPILATION_CONDITIONS" => "SPPERMISSION_PHOTOLIBRARY" }
end

s.subspec 'Notification' do |no|
no.dependency 'SPPermission/Core'
no.pod_target_xcconfig = { "SWIFT_ACTIVE_COMPILATION_CONDITIONS" => "SPPERMISSION_NOTIFICATION" }
end

s.subspec 'Microphone' do |mi|
mi.dependency 'SPPermission/Core'
mi.pod_target_xcconfig = { "SWIFT_ACTIVE_COMPILATION_CONDITIONS" => "SPPERMISSION_MICROPHONE" }
end

s.subspec 'Calendar' do |ca|
ca.dependency 'SPPermission/Core'
ca.pod_target_xcconfig = { "SWIFT_ACTIVE_COMPILATION_CONDITIONS" => "SPPERMISSION_CALENDAR" }
end

s.subspec 'Contacts' do |cn|
cn.dependency 'SPPermission/Core'
cn.pod_target_xcconfig = { "SWIFT_ACTIVE_COMPILATION_CONDITIONS" => "SPPERMISSION_CONTACTS" }
end

s.subspec 'Reminders' do |re|
re.dependency 'SPPermission/Core'
re.pod_target_xcconfig = { "SWIFT_ACTIVE_COMPILATION_CONDITIONS" => "SPPERMISSION_REMINDERS" }
end

s.subspec 'SpeechRecognizer' do |sr|
sr.dependency 'SPPermission/Core'
sr.pod_target_xcconfig = { "SWIFT_ACTIVE_COMPILATION_CONDITIONS" => "SPPERMISSION_SPEECH" }
end

s.subspec 'Location' do |lo|
lo.dependency 'SPPermission/Core'
lo.pod_target_xcconfig = { "SWIFT_ACTIVE_COMPILATION_CONDITIONS" => "SPPERMISSION_LOCATION" }
end

s.subspec 'Motion' do |mo|
mo.dependency 'SPPermission/Core'
mo.pod_target_xcconfig = { "SWIFT_ACTIVE_COMPILATION_CONDITIONS" => "SPPERMISSION_MOTION" }
end

s.subspec 'MediaLibrary' do |ml|
ml.dependency 'SPPermission/Core'
ml.pod_target_xcconfig = { "SWIFT_ACTIVE_COMPILATION_CONDITIONS" => "SPPERMISSION_MEDIALIBRARY" }
end

end

0 comments on commit 97700d4

Please sign in to comment.
You can’t perform that action at this time.