cocoapods-app_group 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Example/.cocoapods_appgroup +1 -0
- data/Example/Example.xcodeproj/project.pbxproj +524 -0
- data/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- data/Example/Example.xcodeproj/project.xcworkspace/xcuserdata/mzp.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/Example/Example.xcodeproj/xcuserdata/mzp.xcuserdatad/xcschemes/Example.xcscheme +91 -0
- data/Example/Example.xcodeproj/xcuserdata/mzp.xcuserdatad/xcschemes/xcschememanagement.plist +32 -0
- data/Example/Example.xcworkspace/contents.xcworkspacedata +10 -0
- data/Example/Example/AppDelegate.swift +46 -0
- data/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json +38 -0
- data/Example/Example/Base.lproj/LaunchScreen.storyboard +27 -0
- data/Example/Example/Base.lproj/Main.storyboard +25 -0
- data/Example/Example/Info.plist +40 -0
- data/Example/Example/ViewController.swift +28 -0
- data/Example/Podfile +6 -0
- data/Example/Podfile.lock +14 -0
- data/Example/Pods/CocoaPodsAppGroup/AppGroup.h +7 -0
- data/Example/Pods/CocoaPodsAppGroup/AppGroup.m +23 -0
- data/Example/Pods/CocoaPodsAppGroup/AppGroup.podspec.json +24 -0
- data/Example/Pods/Headers/Private/AppGroup/AppGroup.h +7 -0
- data/Example/Pods/Local Podspecs/AppGroup.podspec.json +24 -0
- data/Example/Pods/Manifest.lock +14 -0
- data/Example/Pods/Pods.xcodeproj/project.pbxproj +505 -0
- data/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/AppGroup.xcscheme +62 -0
- data/Example/Pods/Target Support Files/AppGroup/AppGroup-Private.xcconfig +6 -0
- data/Example/Pods/Target Support Files/AppGroup/AppGroup-dummy.m +5 -0
- data/Example/Pods/Target Support Files/AppGroup/AppGroup-prefix.pch +4 -0
- data/Example/Pods/Target Support Files/AppGroup/AppGroup-umbrella.h +7 -0
- data/Example/Pods/Target Support Files/AppGroup/AppGroup.modulemap +6 -0
- data/Example/Pods/Target Support Files/AppGroup/AppGroup.xcconfig +1 -0
- data/Example/Pods/Target Support Files/AppGroup/Info.plist +26 -0
- data/Example/Pods/Target Support Files/Pods/Info.plist +26 -0
- data/Example/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown +7 -0
- data/Example/Pods/Target Support Files/Pods/Pods-acknowledgements.plist +37 -0
- data/Example/Pods/Target Support Files/Pods/Pods-dummy.m +5 -0
- data/Example/Pods/Target Support Files/Pods/Pods-frameworks.sh +59 -0
- data/Example/Pods/Target Support Files/Pods/Pods-resources.sh +95 -0
- data/Example/Pods/Target Support Files/Pods/Pods-umbrella.h +6 -0
- data/Example/Pods/Target Support Files/Pods/Pods.debug.xcconfig +7 -0
- data/Example/Pods/Target Support Files/Pods/Pods.modulemap +6 -0
- data/Example/Pods/Target Support Files/Pods/Pods.release.xcconfig +7 -0
- data/Example/ReadFromAppGroup/AppDelegate.swift +46 -0
- data/Example/ReadFromAppGroup/Assets.xcassets/AppIcon.appiconset/Contents.json +38 -0
- data/Example/ReadFromAppGroup/Base.lproj/LaunchScreen.storyboard +27 -0
- data/Example/ReadFromAppGroup/Base.lproj/Main.storyboard +25 -0
- data/Example/ReadFromAppGroup/Info.plist +40 -0
- data/Example/ReadFromAppGroup/ReadFromAppGroup.entitlements +10 -0
- data/Example/ReadFromAppGroup/ViewController.swift +26 -0
- data/Example/WriteToAppGroup.entitlements +10 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +90 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/cocoapods-app_group.gemspec +25 -0
- data/lib/cocoapods/app_group.rb +6 -0
- data/lib/cocoapods/app_group/hook.rb +18 -0
- data/lib/cocoapods/app_group/setup.rb +58 -0
- data/lib/cocoapods/app_group/store.rb +41 -0
- data/lib/cocoapods/app_group/template.rb +27 -0
- data/lib/cocoapods/app_group/version.rb +5 -0
- data/lib/cocoapods_plugin.rb +1 -0
- data/lib/pod/command/app_group.rb +31 -0
- data/templates/AppGroup.h +7 -0
- data/templates/AppGroup.m +23 -0
- data/templates/AppGroup.podspec.json +24 -0
- metadata +158 -0
Binary file
|
@@ -0,0 +1,91 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Scheme
|
3
|
+
LastUpgradeVersion = "0700"
|
4
|
+
version = "1.3">
|
5
|
+
<BuildAction
|
6
|
+
parallelizeBuildables = "YES"
|
7
|
+
buildImplicitDependencies = "YES">
|
8
|
+
<BuildActionEntries>
|
9
|
+
<BuildActionEntry
|
10
|
+
buildForTesting = "YES"
|
11
|
+
buildForRunning = "YES"
|
12
|
+
buildForProfiling = "YES"
|
13
|
+
buildForArchiving = "YES"
|
14
|
+
buildForAnalyzing = "YES">
|
15
|
+
<BuildableReference
|
16
|
+
BuildableIdentifier = "primary"
|
17
|
+
BlueprintIdentifier = "13B0ABFA1BB0070000891E04"
|
18
|
+
BuildableName = "WriteToAppGroup.app"
|
19
|
+
BlueprintName = "WriteToAppGroup"
|
20
|
+
ReferencedContainer = "container:Example.xcodeproj">
|
21
|
+
</BuildableReference>
|
22
|
+
</BuildActionEntry>
|
23
|
+
</BuildActionEntries>
|
24
|
+
</BuildAction>
|
25
|
+
<TestAction
|
26
|
+
buildConfiguration = "Debug"
|
27
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
28
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
30
|
+
<Testables>
|
31
|
+
</Testables>
|
32
|
+
<MacroExpansion>
|
33
|
+
<BuildableReference
|
34
|
+
BuildableIdentifier = "primary"
|
35
|
+
BlueprintIdentifier = "13B0ABFA1BB0070000891E04"
|
36
|
+
BuildableName = "WriteToAppGroup.app"
|
37
|
+
BlueprintName = "WriteToAppGroup"
|
38
|
+
ReferencedContainer = "container:Example.xcodeproj">
|
39
|
+
</BuildableReference>
|
40
|
+
</MacroExpansion>
|
41
|
+
<AdditionalOptions>
|
42
|
+
</AdditionalOptions>
|
43
|
+
</TestAction>
|
44
|
+
<LaunchAction
|
45
|
+
buildConfiguration = "Debug"
|
46
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
47
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
48
|
+
launchStyle = "0"
|
49
|
+
useCustomWorkingDirectory = "NO"
|
50
|
+
ignoresPersistentStateOnLaunch = "NO"
|
51
|
+
debugDocumentVersioning = "YES"
|
52
|
+
debugServiceExtension = "internal"
|
53
|
+
allowLocationSimulation = "YES">
|
54
|
+
<BuildableProductRunnable
|
55
|
+
runnableDebuggingMode = "0">
|
56
|
+
<BuildableReference
|
57
|
+
BuildableIdentifier = "primary"
|
58
|
+
BlueprintIdentifier = "13B0ABFA1BB0070000891E04"
|
59
|
+
BuildableName = "WriteToAppGroup.app"
|
60
|
+
BlueprintName = "WriteToAppGroup"
|
61
|
+
ReferencedContainer = "container:Example.xcodeproj">
|
62
|
+
</BuildableReference>
|
63
|
+
</BuildableProductRunnable>
|
64
|
+
<AdditionalOptions>
|
65
|
+
</AdditionalOptions>
|
66
|
+
</LaunchAction>
|
67
|
+
<ProfileAction
|
68
|
+
buildConfiguration = "Release"
|
69
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
70
|
+
savedToolIdentifier = ""
|
71
|
+
useCustomWorkingDirectory = "NO"
|
72
|
+
debugDocumentVersioning = "YES">
|
73
|
+
<BuildableProductRunnable
|
74
|
+
runnableDebuggingMode = "0">
|
75
|
+
<BuildableReference
|
76
|
+
BuildableIdentifier = "primary"
|
77
|
+
BlueprintIdentifier = "13B0ABFA1BB0070000891E04"
|
78
|
+
BuildableName = "WriteToAppGroup.app"
|
79
|
+
BlueprintName = "WriteToAppGroup"
|
80
|
+
ReferencedContainer = "container:Example.xcodeproj">
|
81
|
+
</BuildableReference>
|
82
|
+
</BuildableProductRunnable>
|
83
|
+
</ProfileAction>
|
84
|
+
<AnalyzeAction
|
85
|
+
buildConfiguration = "Debug">
|
86
|
+
</AnalyzeAction>
|
87
|
+
<ArchiveAction
|
88
|
+
buildConfiguration = "Release"
|
89
|
+
revealArchiveInOrganizer = "YES">
|
90
|
+
</ArchiveAction>
|
91
|
+
</Scheme>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>SchemeUserState</key>
|
6
|
+
<dict>
|
7
|
+
<key>Example.xcscheme</key>
|
8
|
+
<dict>
|
9
|
+
<key>orderHint</key>
|
10
|
+
<integer>0</integer>
|
11
|
+
</dict>
|
12
|
+
<key>ReadFromAppGroup.xcscheme</key>
|
13
|
+
<dict>
|
14
|
+
<key>orderHint</key>
|
15
|
+
<integer>3</integer>
|
16
|
+
</dict>
|
17
|
+
</dict>
|
18
|
+
<key>SuppressBuildableAutocreation</key>
|
19
|
+
<dict>
|
20
|
+
<key>139C575D1BB16AFC0059D855</key>
|
21
|
+
<dict>
|
22
|
+
<key>primary</key>
|
23
|
+
<true/>
|
24
|
+
</dict>
|
25
|
+
<key>13B0ABFA1BB0070000891E04</key>
|
26
|
+
<dict>
|
27
|
+
<key>primary</key>
|
28
|
+
<true/>
|
29
|
+
</dict>
|
30
|
+
</dict>
|
31
|
+
</dict>
|
32
|
+
</plist>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
//
|
2
|
+
// AppDelegate.swift
|
3
|
+
// Example
|
4
|
+
//
|
5
|
+
// Created by mzp on 9/21/15.
|
6
|
+
// Copyright © 2015 mzp. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
import UIKit
|
10
|
+
|
11
|
+
@UIApplicationMain
|
12
|
+
class AppDelegate: UIResponder, UIApplicationDelegate {
|
13
|
+
|
14
|
+
var window: UIWindow?
|
15
|
+
|
16
|
+
|
17
|
+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
|
18
|
+
// Override point for customization after application launch.
|
19
|
+
return true
|
20
|
+
}
|
21
|
+
|
22
|
+
func applicationWillResignActive(application: UIApplication) {
|
23
|
+
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
24
|
+
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
25
|
+
}
|
26
|
+
|
27
|
+
func applicationDidEnterBackground(application: UIApplication) {
|
28
|
+
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
29
|
+
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
30
|
+
}
|
31
|
+
|
32
|
+
func applicationWillEnterForeground(application: UIApplication) {
|
33
|
+
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
|
34
|
+
}
|
35
|
+
|
36
|
+
func applicationDidBecomeActive(application: UIApplication) {
|
37
|
+
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
38
|
+
}
|
39
|
+
|
40
|
+
func applicationWillTerminate(application: UIApplication) {
|
41
|
+
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
42
|
+
}
|
43
|
+
|
44
|
+
|
45
|
+
}
|
46
|
+
|
@@ -0,0 +1,38 @@
|
|
1
|
+
{
|
2
|
+
"images" : [
|
3
|
+
{
|
4
|
+
"idiom" : "iphone",
|
5
|
+
"size" : "29x29",
|
6
|
+
"scale" : "2x"
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"idiom" : "iphone",
|
10
|
+
"size" : "29x29",
|
11
|
+
"scale" : "3x"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"idiom" : "iphone",
|
15
|
+
"size" : "40x40",
|
16
|
+
"scale" : "2x"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"idiom" : "iphone",
|
20
|
+
"size" : "40x40",
|
21
|
+
"scale" : "3x"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"idiom" : "iphone",
|
25
|
+
"size" : "60x60",
|
26
|
+
"scale" : "2x"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"idiom" : "iphone",
|
30
|
+
"size" : "60x60",
|
31
|
+
"scale" : "3x"
|
32
|
+
}
|
33
|
+
],
|
34
|
+
"info" : {
|
35
|
+
"version" : 1,
|
36
|
+
"author" : "xcode"
|
37
|
+
}
|
38
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
|
3
|
+
<dependencies>
|
4
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
|
5
|
+
</dependencies>
|
6
|
+
<scenes>
|
7
|
+
<!--View Controller-->
|
8
|
+
<scene sceneID="EHf-IW-A2E">
|
9
|
+
<objects>
|
10
|
+
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
11
|
+
<layoutGuides>
|
12
|
+
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
|
13
|
+
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
|
14
|
+
</layoutGuides>
|
15
|
+
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
16
|
+
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
17
|
+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
18
|
+
<animations/>
|
19
|
+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
20
|
+
</view>
|
21
|
+
</viewController>
|
22
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
23
|
+
</objects>
|
24
|
+
<point key="canvasLocation" x="53" y="375"/>
|
25
|
+
</scene>
|
26
|
+
</scenes>
|
27
|
+
</document>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
3
|
+
<dependencies>
|
4
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
|
5
|
+
</dependencies>
|
6
|
+
<scenes>
|
7
|
+
<!--View Controller-->
|
8
|
+
<scene sceneID="tne-QT-ifu">
|
9
|
+
<objects>
|
10
|
+
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="WriteToAppGroup" customModuleProvider="target" sceneMemberID="viewController">
|
11
|
+
<layoutGuides>
|
12
|
+
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
13
|
+
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
14
|
+
</layoutGuides>
|
15
|
+
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
16
|
+
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
17
|
+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
18
|
+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
19
|
+
</view>
|
20
|
+
</viewController>
|
21
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
22
|
+
</objects>
|
23
|
+
</scene>
|
24
|
+
</scenes>
|
25
|
+
</document>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
6
|
+
<string>en</string>
|
7
|
+
<key>CFBundleExecutable</key>
|
8
|
+
<string>$(EXECUTABLE_NAME)</string>
|
9
|
+
<key>CFBundleIdentifier</key>
|
10
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
12
|
+
<string>6.0</string>
|
13
|
+
<key>CFBundleName</key>
|
14
|
+
<string>$(PRODUCT_NAME)</string>
|
15
|
+
<key>CFBundlePackageType</key>
|
16
|
+
<string>APPL</string>
|
17
|
+
<key>CFBundleShortVersionString</key>
|
18
|
+
<string>1.0</string>
|
19
|
+
<key>CFBundleSignature</key>
|
20
|
+
<string>????</string>
|
21
|
+
<key>CFBundleVersion</key>
|
22
|
+
<string>1</string>
|
23
|
+
<key>LSRequiresIPhoneOS</key>
|
24
|
+
<true/>
|
25
|
+
<key>UILaunchStoryboardName</key>
|
26
|
+
<string>LaunchScreen</string>
|
27
|
+
<key>UIMainStoryboardFile</key>
|
28
|
+
<string>Main</string>
|
29
|
+
<key>UIRequiredDeviceCapabilities</key>
|
30
|
+
<array>
|
31
|
+
<string>armv7</string>
|
32
|
+
</array>
|
33
|
+
<key>UISupportedInterfaceOrientations</key>
|
34
|
+
<array>
|
35
|
+
<string>UIInterfaceOrientationPortrait</string>
|
36
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
37
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
38
|
+
</array>
|
39
|
+
</dict>
|
40
|
+
</plist>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
//
|
2
|
+
// ViewController.swift
|
3
|
+
// Example
|
4
|
+
//
|
5
|
+
// Created by mzp on 9/21/15.
|
6
|
+
// Copyright © 2015 mzp. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
import UIKit
|
10
|
+
import AppGroup
|
11
|
+
|
12
|
+
class ViewController: UIViewController {
|
13
|
+
|
14
|
+
override func viewDidLoad() {
|
15
|
+
super.viewDidLoad()
|
16
|
+
NSLog("%@", AppGroup.appGroupID())
|
17
|
+
AppGroup.userDefaults().setInteger(42, forKey: "answer")
|
18
|
+
// Do any additional setup after loading the view, typically from a nib.
|
19
|
+
}
|
20
|
+
|
21
|
+
override func didReceiveMemoryWarning() {
|
22
|
+
super.didReceiveMemoryWarning()
|
23
|
+
// Dispose of any resources that can be recreated.
|
24
|
+
}
|
25
|
+
|
26
|
+
|
27
|
+
}
|
28
|
+
|
data/Example/Podfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
PODS:
|
2
|
+
- AppGroup (1.0.0)
|
3
|
+
|
4
|
+
DEPENDENCIES:
|
5
|
+
- AppGroup (from `/Users/mzp/git/cocoapods-app_group/Example/Pods/CocoaPodsAppGroup/`)
|
6
|
+
|
7
|
+
EXTERNAL SOURCES:
|
8
|
+
AppGroup:
|
9
|
+
:path: "/Users/mzp/git/cocoapods-app_group/Example/Pods/CocoaPodsAppGroup/"
|
10
|
+
|
11
|
+
SPEC CHECKSUMS:
|
12
|
+
AppGroup: 84d115b29a4fcedfe0984fa316bdbfb7c2ddc8f9
|
13
|
+
|
14
|
+
COCOAPODS: 0.38.2
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#import "AppGroup.h"
|
2
|
+
|
3
|
+
static NSString * const kAppIdentifier = @"jp.mzp.app_group.example";
|
4
|
+
|
5
|
+
@implementation AppGroup
|
6
|
+
|
7
|
+
+ (NSString *)appGroupID
|
8
|
+
{
|
9
|
+
return [NSString stringWithFormat:@"group.%@", kAppIdentifier];
|
10
|
+
}
|
11
|
+
|
12
|
+
+ (NSString *)pathForResource:(NSString *)subpath
|
13
|
+
{
|
14
|
+
NSString *containerPath = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:[self appGroupID]].path;
|
15
|
+
return [containerPath stringByAppendingPathComponent:subpath];
|
16
|
+
}
|
17
|
+
|
18
|
+
+ (NSUserDefaults*)userDefaults
|
19
|
+
{
|
20
|
+
return [[NSUserDefaults alloc] initWithSuiteName: [self appGroupID]];
|
21
|
+
}
|
22
|
+
|
23
|
+
@end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
{
|
2
|
+
"name": "AppGroup",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"summary": "Injected podspec used by CocoaPods-AppGroup plugin.",
|
5
|
+
"description": "This is intended to be used as an injected podspec template \n used by the [CocoaPods-ApGroup plugin](https://github.com/mzp/cocoapods-app_group).\n\n It should *not* be referenced outside of that context. \n",
|
6
|
+
"homepage": "https://github.com/mzp/cocoapods-app_group",
|
7
|
+
"license": {
|
8
|
+
"type": "MIT",
|
9
|
+
"text": "MIT LICENSE Found in the repo"
|
10
|
+
},
|
11
|
+
"authors": {
|
12
|
+
"mzp": "mzpppp@gmail.com"
|
13
|
+
},
|
14
|
+
"source": {
|
15
|
+
"git": "https://github.com/mzp/cocoapods-app_group.git",
|
16
|
+
"tag": "0.1.0"
|
17
|
+
},
|
18
|
+
"user_target_xcconfig": {
|
19
|
+
"APP_IDENTIFIER": "jp.mzp.app_group.example"
|
20
|
+
},
|
21
|
+
"source_files": "*.{h,m,swift}",
|
22
|
+
"frameworks": "Foundation",
|
23
|
+
"requires_arc": true
|
24
|
+
}
|