cocoapods-app_group 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecb8ab0eefb32a24e611a88115ca6751a9eea7b8
4
- data.tar.gz: ec695d122de9455b090874acbb35ed6917c8fe64
3
+ metadata.gz: 7e99e90c49386c7fe284f1b46ed65ca1a44f6070
4
+ data.tar.gz: 45bf13cdbf986c00efb59a4d6ee7169807ed5c43
5
5
  SHA512:
6
- metadata.gz: 7dc1091431736d6e322847ff3339eccf8aea4dbcafd09aef75c729276c6a39c882298e03cb89867296c25e091d5069bcda55523322efc98648348e4f8d475410
7
- data.tar.gz: 07ec905803a31f4165bef12b2dd7a3d911df85721ea521737d95694800f6080c7c12d07ed1efc7c396de845ec31021865824eb2d28a4cee86857c47789c8014a
6
+ metadata.gz: 34377a8886c8406af195151d09f833f41f1aaeea685658f4a401f84c40f7018f267ffca7f9bf35847c35b8055b06a1461d086d8b6ba552ad04cee5b5efc472b8
7
+ data.tar.gz: bda248021965eeabdc3cadd45ddc74c995896979a76aa94a093dddd3b0995bf474a61d0cf65e8f45a30574f73345bebf2d7539f124e53b946682630bed2f5c3d
@@ -2,13 +2,13 @@ PODS:
2
2
  - AppGroup (1.0.0)
3
3
 
4
4
  DEPENDENCIES:
5
- - AppGroup (from `Pods/CocoaPodsAppGroup`)
5
+ - AppGroup (from `Pods/CocoaPodsAppGroup/AppGroup.podspec.json`)
6
6
 
7
7
  EXTERNAL SOURCES:
8
8
  AppGroup:
9
- :path: Pods/CocoaPodsAppGroup
9
+ :podspec: Pods/CocoaPodsAppGroup/AppGroup.podspec.json
10
10
 
11
11
  SPEC CHECKSUMS:
12
- AppGroup: 4dd06a5f93b4a1bd210a3c09e02356a55b68473e
12
+ AppGroup: e2b8247a43e9381f825b247ac86cf5c930bf4f70
13
13
 
14
14
  COCOAPODS: 0.39.0
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 mzp
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,90 @@
1
+ # cocoapods-app_group
2
+
3
+ This plugin provide customizable app group.
4
+
5
+ Because app group is strong bound to AppleID, it is hard to distribute iOS project using app group. This plugin enable each user to customize app group name at setup phase. This make easy to distribute your iOS project.
6
+
7
+ ## Requirements
8
+
9
+ * CocoaPods 0.36
10
+
11
+ ## Installation
12
+
13
+ ```
14
+ gem install cocoapods-app_group
15
+ ```
16
+
17
+ ## Setup
18
+ ### 1. Setup Podfile
19
+ Put followings to `Podfile`:
20
+
21
+ ```ruby
22
+ plugin 'cocoapods-app_group'
23
+
24
+ # or specify targets
25
+ # plugin 'cocoapods-app_group', targets: ['Foo', 'Bar']
26
+ ```
27
+
28
+ Then running `pod install` will prompt for the keys not yet set and you can ensure everyone has the same setup.
29
+
30
+ ### 2. Save app group name
31
+ Save group name by running following command:
32
+
33
+ ```
34
+ pod app-group GROUP_NAME
35
+ ```
36
+
37
+ ### 3. Generate wrapper class
38
+ Generate wrapper class by running following command:
39
+
40
+ ```
41
+ pod install
42
+ ```
43
+
44
+ ### 4. Enable app group of each target
45
+ Open `*.xcworkspace` and enable app group of each target. Use `group.$(APP_IDENTIFIER)` as app group name.
46
+
47
+ ### 5. Write code
48
+ Write code using wrapper class:
49
+
50
+ ```objc
51
+ #import <Foundation/Foundation.h>
52
+
53
+ @interface AppGroup : NSObject
54
+ + (NSString *)appGroupID;
55
+ + (NSString *)pathForResource:(NSString *)subpath;
56
+ + (NSUserDefaults*)userDefaults;
57
+ @end
58
+ ```
59
+
60
+ ## Using at swift project
61
+ ### Using the bridge header
62
+
63
+ If you want to make your keys available to your whole project:
64
+
65
+ 1. Make sure you have a [bridging header](https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html) already setup.
66
+ 2. In the bridging header, import the generated key file:
67
+ ```objectivec
68
+ #import <AppGroup/AppGroup.h>
69
+ ```
70
+
71
+ ### Importing the framework
72
+
73
+ If you've added the `use_frameworks!` and only want your Keys to be available in
74
+ specific files, simply use Swift's `import` statement. The name of the generated
75
+ module is `AppGroup`.
76
+
77
+ ```swift
78
+ import AppGroup
79
+ ```
80
+
81
+ ## Thanks
82
+ This was built with a lot of help from [@banjun](https://github.com/banjun).
83
+
84
+ ## How to work
85
+ I explain how to work at [Japanese document](http://qiita.com/mzp/items/b5a9dda2d01e18655cbf).
86
+
87
+ ## License
88
+
89
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
90
+
@@ -0,0 +1,8 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ @interface AppGroup : NSObject
4
+ + (NSString *)appGroupID;
5
+ + (NSString *)pathForResource:(NSString *)subpath;
6
+ + (NSURL *)urlForResource:(NSString *)subpath;
7
+ + (NSUserDefaults*)userDefaults;
8
+ @end
@@ -0,0 +1,30 @@
1
+ #import "AppGroup.h"
2
+
3
+ #define STR(x) @#x
4
+ #define STR2(x) STR(x)
5
+ static NSString * const kAppIdentifier = STR2(APP_IDENTIFIER);
6
+
7
+ @implementation AppGroup
8
+
9
+ + (NSString *)appGroupID
10
+ {
11
+ return [NSString stringWithFormat:@"group.%@", kAppIdentifier];
12
+ }
13
+
14
+ + (NSString *)pathForResource:(NSString *)subpath
15
+ {
16
+ NSString *containerPath = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:[self appGroupID]].path;
17
+ return [containerPath stringByAppendingPathComponent:subpath];
18
+ }
19
+
20
+ + (NSURL *)urlForResource:(NSString *)subpath {
21
+ NSURL *container = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:[self appGroupID]];
22
+ return [container URLByAppendingPathComponent:subpath];
23
+ }
24
+
25
+ + (NSUserDefaults*)userDefaults
26
+ {
27
+ return [[NSUserDefaults alloc] initWithSuiteName: [self appGroupID]];
28
+ }
29
+
30
+ @end
@@ -1,6 +1,8 @@
1
1
  #import "AppGroup.h"
2
2
 
3
- static NSString * const kAppIdentifier = @"jp.mzp.app_group.example";
3
+ #define STR(x) @#x
4
+ #define STR2(x) STR(x)
5
+ static NSString * const kAppIdentifier = STR2(APP_IDENTIFIER);
4
6
 
5
7
  @implementation AppGroup
6
8
 
@@ -13,9 +13,9 @@
13
13
  },
14
14
  "source": {
15
15
  "git": "https://github.com/mzp/cocoapods-app_group.git",
16
- "tag": "0.3.0"
16
+ "tag": "v0.4.1"
17
17
  },
18
- "source_files": "*.{h,m,swift}",
18
+ "source_files": "templates/*.{h,m,swift}",
19
19
  "frameworks": "Foundation",
20
20
  "requires_arc": true
21
21
  }
@@ -13,9 +13,9 @@
13
13
  },
14
14
  "source": {
15
15
  "git": "https://github.com/mzp/cocoapods-app_group.git",
16
- "tag": "0.3.0"
16
+ "tag": "v0.4.1"
17
17
  },
18
- "source_files": "*.{h,m,swift}",
18
+ "source_files": "templates/*.{h,m,swift}",
19
19
  "frameworks": "Foundation",
20
20
  "requires_arc": true
21
21
  }
@@ -2,13 +2,13 @@ PODS:
2
2
  - AppGroup (1.0.0)
3
3
 
4
4
  DEPENDENCIES:
5
- - AppGroup (from `Pods/CocoaPodsAppGroup`)
5
+ - AppGroup (from `Pods/CocoaPodsAppGroup/AppGroup.podspec.json`)
6
6
 
7
7
  EXTERNAL SOURCES:
8
8
  AppGroup:
9
- :path: Pods/CocoaPodsAppGroup
9
+ :podspec: Pods/CocoaPodsAppGroup/AppGroup.podspec.json
10
10
 
11
11
  SPEC CHECKSUMS:
12
- AppGroup: 4dd06a5f93b4a1bd210a3c09e02356a55b68473e
12
+ AppGroup: e2b8247a43e9381f825b247ac86cf5c930bf4f70
13
13
 
14
14
  COCOAPODS: 0.39.0
@@ -7,13 +7,13 @@
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
- 3C61FC7B1056239DAEEDB60836CF750C /* AppGroup-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 385DA59AC8A40DE51B7DDF8C9A959376 /* AppGroup-dummy.m */; };
10
+ 3F152380F2161555CDA20F17F4D819A8 /* AppGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = E0C535D23A0C8623E3C97FA8372C6A17 /* AppGroup.h */; settings = {ATTRIBUTES = (Public, ); }; };
11
11
  522A0C6A4591B9D180C5958AE0DA3405 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */; };
12
- 7F82CC0D7C200DB73C1871BD8C6595C2 /* AppGroup-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = AC42FC2C6B22ACE66612E3347655C45F /* AppGroup-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
12
+ 63AC8BD629A9CB63B39C5309C6C80E79 /* AppGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = F15F6152218DD0909F02B310CB11378A /* AppGroup.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
13
13
  8909900473626FB796A4D6BCA4EC9BD3 /* Pods-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 894E5DA93A9F359521A89826BE6DA777 /* Pods-dummy.m */; };
14
14
  B105655FFD190ED5C40F511FDEC62C19 /* Pods-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BCC458FDD5F692BBB2BFC64BB5701FC /* Pods-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
15
- C0F50769506A3F933FA6F8A45A4E6849 /* AppGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = E68891C428AD6DFE46F0FE8410D8F837 /* AppGroup.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
16
- F26FDDF3E9324D54B51082201B80EE56 /* AppGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0C5EC0EB0A8B622EE960DD86DF02EB /* AppGroup.h */; settings = {ATTRIBUTES = (Public, ); }; };
15
+ B7CA17829991926BAECEE8EF31FCFAF5 /* AppGroup-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 5565BAB2762EF73E1FA7804B73EE70A9 /* AppGroup-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
16
+ E2BE7BDCE81FA897CB7702213EB08F03 /* AppGroup-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D90B201BD72A1AE48922C194BB1EEA2 /* AppGroup-dummy.m */; };
17
17
  F9AD5A66449BC1E35D7BC94C1143D7FE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */; };
18
18
  /* End PBXBuildFile section */
19
19
 
@@ -28,28 +28,28 @@
28
28
  /* End PBXContainerItemProxy section */
29
29
 
30
30
  /* Begin PBXFileReference section */
31
- 0F0C5EC0EB0A8B622EE960DD86DF02EB /* AppGroup.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = AppGroup.h; sourceTree = "<group>"; };
32
- 1F941D28ACDE63BA8972E6B9E1C50213 /* AppGroup.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = AppGroup.modulemap; sourceTree = "<group>"; };
31
+ 166340392AD42AB31ADBF2EA98E0FB23 /* AppGroup.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = AppGroup.modulemap; sourceTree = "<group>"; };
33
32
  2BCC458FDD5F692BBB2BFC64BB5701FC /* Pods-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-umbrella.h"; sourceTree = "<group>"; };
34
- 2E7796AC6951300E68117DC4840EE936 /* AppGroup.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = AppGroup.xcconfig; sourceTree = "<group>"; };
35
- 385DA59AC8A40DE51B7DDF8C9A959376 /* AppGroup-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "AppGroup-dummy.m"; sourceTree = "<group>"; };
36
- 389928EC18566F75BD152B5AE4DC0A9A /* AppGroup-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AppGroup-prefix.pch"; sourceTree = "<group>"; };
37
33
  3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
34
+ 4B04BA9213D8B9DEF5AFBC867C733C77 /* AppGroup.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = AppGroup.xcconfig; sourceTree = "<group>"; };
35
+ 4D90B201BD72A1AE48922C194BB1EEA2 /* AppGroup-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "AppGroup-dummy.m"; sourceTree = "<group>"; };
36
+ 5565BAB2762EF73E1FA7804B73EE70A9 /* AppGroup-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AppGroup-umbrella.h"; sourceTree = "<group>"; };
38
37
  79A9DEDC89FE8336BF5FEDAAF75BF7FC /* Pods.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Pods.modulemap; sourceTree = "<group>"; };
39
38
  87B213035BAC5F75386F62D3C75D2342 /* Pods-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-acknowledgements.plist"; sourceTree = "<group>"; };
40
39
  894E5DA93A9F359521A89826BE6DA777 /* Pods-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-dummy.m"; sourceTree = "<group>"; };
41
40
  8B1898B81CCD5511B07395424941A3BE /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; };
42
41
  977577C045EDA9D9D1F46E2598D19FC7 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.debug.xcconfig; sourceTree = "<group>"; };
43
- AC42FC2C6B22ACE66612E3347655C45F /* AppGroup-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AppGroup-umbrella.h"; sourceTree = "<group>"; };
44
- AF78466B6F825EA670BE0A782CDA6A19 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
42
+ AF1AC7A7B7F61388C12ACD626F748BE5 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
45
43
  BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
44
+ C7402B2E16741D3C0BB29AA8D5D4732F /* AppGroup-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AppGroup-prefix.pch"; sourceTree = "<group>"; };
46
45
  CBC0F7C552B739C909B650A0F42F7F38 /* Pods-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-resources.sh"; sourceTree = "<group>"; };
47
46
  D0405803033A2A777B8E4DFA0C1800ED /* Pods-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-acknowledgements.markdown"; sourceTree = "<group>"; };
48
47
  DA312349A49333542E6F4B36B329960E /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.release.xcconfig; sourceTree = "<group>"; };
49
- E68891C428AD6DFE46F0FE8410D8F837 /* AppGroup.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = AppGroup.m; sourceTree = "<group>"; };
48
+ E0C535D23A0C8623E3C97FA8372C6A17 /* AppGroup.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AppGroup.h; path = templates/AppGroup.h; sourceTree = "<group>"; };
50
49
  E7A6ADAFF1D44F709BF7E801FECB7DBA /* AppGroup.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AppGroup.framework; sourceTree = BUILT_PRODUCTS_DIR; };
51
50
  E7F21354943D9F42A70697D5A5EF72E9 /* Pods-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-frameworks.sh"; sourceTree = "<group>"; };
52
51
  E8446514FBAD26C0E18F24A5715AEF67 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
52
+ F15F6152218DD0909F02B310CB11378A /* AppGroup.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AppGroup.m; path = templates/AppGroup.m; sourceTree = "<group>"; };
53
53
  /* End PBXFileReference section */
54
54
 
55
55
  /* Begin PBXFrameworksBuildPhase section */
@@ -72,37 +72,14 @@
72
72
  /* End PBXFrameworksBuildPhase section */
73
73
 
74
74
  /* Begin PBXGroup section */
75
- 060AB407C1781076871E180D6F397F5B /* Development Pods */ = {
75
+ 1ECFD09CEE1A9C9E018A45285EE71356 /* AppGroup */ = {
76
76
  isa = PBXGroup;
77
77
  children = (
78
- 525AA6B0A65AE5ED5B4CE20349A900BB /* AppGroup */,
78
+ E0C535D23A0C8623E3C97FA8372C6A17 /* AppGroup.h */,
79
+ F15F6152218DD0909F02B310CB11378A /* AppGroup.m */,
80
+ E12FF801B62CCDE54A11E244FB661FF2 /* Support Files */,
79
81
  );
80
- name = "Development Pods";
81
- sourceTree = "<group>";
82
- };
83
- 3A121199601FF3F234CBD5DA2A96F20C /* Support Files */ = {
84
- isa = PBXGroup;
85
- children = (
86
- 1F941D28ACDE63BA8972E6B9E1C50213 /* AppGroup.modulemap */,
87
- 2E7796AC6951300E68117DC4840EE936 /* AppGroup.xcconfig */,
88
- 385DA59AC8A40DE51B7DDF8C9A959376 /* AppGroup-dummy.m */,
89
- 389928EC18566F75BD152B5AE4DC0A9A /* AppGroup-prefix.pch */,
90
- AC42FC2C6B22ACE66612E3347655C45F /* AppGroup-umbrella.h */,
91
- AF78466B6F825EA670BE0A782CDA6A19 /* Info.plist */,
92
- );
93
- name = "Support Files";
94
- path = "../Target Support Files/AppGroup";
95
- sourceTree = "<group>";
96
- };
97
- 525AA6B0A65AE5ED5B4CE20349A900BB /* AppGroup */ = {
98
- isa = PBXGroup;
99
- children = (
100
- 0F0C5EC0EB0A8B622EE960DD86DF02EB /* AppGroup.h */,
101
- E68891C428AD6DFE46F0FE8410D8F837 /* AppGroup.m */,
102
- 3A121199601FF3F234CBD5DA2A96F20C /* Support Files */,
103
- );
104
- name = AppGroup;
105
- path = CocoaPodsAppGroup;
82
+ path = AppGroup;
106
83
  sourceTree = "<group>";
107
84
  };
108
85
  75D98FF52E597A11900E131B6C4E1ADA /* Pods */ = {
@@ -127,13 +104,21 @@
127
104
  isa = PBXGroup;
128
105
  children = (
129
106
  BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */,
130
- 060AB407C1781076871E180D6F397F5B /* Development Pods */,
131
107
  BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */,
108
+ A6F9D6F7B6512FA46964D9214F722660 /* Pods */,
132
109
  DC929004F4E05867820AA9A5F5AC395A /* Products */,
133
110
  B7B80995527643776607AFFA75B91E24 /* Targets Support Files */,
134
111
  );
135
112
  sourceTree = "<group>";
136
113
  };
114
+ A6F9D6F7B6512FA46964D9214F722660 /* Pods */ = {
115
+ isa = PBXGroup;
116
+ children = (
117
+ 1ECFD09CEE1A9C9E018A45285EE71356 /* AppGroup */,
118
+ );
119
+ name = Pods;
120
+ sourceTree = "<group>";
121
+ };
137
122
  B7B80995527643776607AFFA75B91E24 /* Targets Support Files */ = {
138
123
  isa = PBXGroup;
139
124
  children = (
@@ -167,6 +152,20 @@
167
152
  name = Products;
168
153
  sourceTree = "<group>";
169
154
  };
155
+ E12FF801B62CCDE54A11E244FB661FF2 /* Support Files */ = {
156
+ isa = PBXGroup;
157
+ children = (
158
+ 166340392AD42AB31ADBF2EA98E0FB23 /* AppGroup.modulemap */,
159
+ 4B04BA9213D8B9DEF5AFBC867C733C77 /* AppGroup.xcconfig */,
160
+ 4D90B201BD72A1AE48922C194BB1EEA2 /* AppGroup-dummy.m */,
161
+ C7402B2E16741D3C0BB29AA8D5D4732F /* AppGroup-prefix.pch */,
162
+ 5565BAB2762EF73E1FA7804B73EE70A9 /* AppGroup-umbrella.h */,
163
+ AF1AC7A7B7F61388C12ACD626F748BE5 /* Info.plist */,
164
+ );
165
+ name = "Support Files";
166
+ path = "../Target Support Files/AppGroup";
167
+ sourceTree = "<group>";
168
+ };
170
169
  /* End PBXGroup section */
171
170
 
172
171
  /* Begin PBXHeadersBuildPhase section */
@@ -178,12 +177,12 @@
178
177
  );
179
178
  runOnlyForDeploymentPostprocessing = 0;
180
179
  };
181
- 60C96AE8066D3003117F9693DEBCFA0F /* Headers */ = {
180
+ F1E36A5485D6823EDEA9D72EA606B3D3 /* Headers */ = {
182
181
  isa = PBXHeadersBuildPhase;
183
182
  buildActionMask = 2147483647;
184
183
  files = (
185
- 7F82CC0D7C200DB73C1871BD8C6595C2 /* AppGroup-umbrella.h in Headers */,
186
- F26FDDF3E9324D54B51082201B80EE56 /* AppGroup.h in Headers */,
184
+ B7CA17829991926BAECEE8EF31FCFAF5 /* AppGroup-umbrella.h in Headers */,
185
+ 3F152380F2161555CDA20F17F4D819A8 /* AppGroup.h in Headers */,
187
186
  );
188
187
  runOnlyForDeploymentPostprocessing = 0;
189
188
  };
@@ -212,9 +211,9 @@
212
211
  isa = PBXNativeTarget;
213
212
  buildConfigurationList = 76B25CCD363ABC6A55531F9743CE2D68 /* Build configuration list for PBXNativeTarget "AppGroup" */;
214
213
  buildPhases = (
215
- EE4E6794F4C8BF4D200EEF96BD52E775 /* Sources */,
214
+ C3B07AB91E2757341C93ADCE66BE1E97 /* Sources */,
216
215
  F62CEA57AF5EFABA84F52BE4A3242FEE /* Frameworks */,
217
- 60C96AE8066D3003117F9693DEBCFA0F /* Headers */,
216
+ F1E36A5485D6823EDEA9D72EA606B3D3 /* Headers */,
218
217
  );
219
218
  buildRules = (
220
219
  );
@@ -261,12 +260,12 @@
261
260
  );
262
261
  runOnlyForDeploymentPostprocessing = 0;
263
262
  };
264
- EE4E6794F4C8BF4D200EEF96BD52E775 /* Sources */ = {
263
+ C3B07AB91E2757341C93ADCE66BE1E97 /* Sources */ = {
265
264
  isa = PBXSourcesBuildPhase;
266
265
  buildActionMask = 2147483647;
267
266
  files = (
268
- 3C61FC7B1056239DAEEDB60836CF750C /* AppGroup-dummy.m in Sources */,
269
- C0F50769506A3F933FA6F8A45A4E6849 /* AppGroup.m in Sources */,
267
+ E2BE7BDCE81FA897CB7702213EB08F03 /* AppGroup-dummy.m in Sources */,
268
+ 63AC8BD629A9CB63B39C5309C6C80E79 /* AppGroup.m in Sources */,
270
269
  );
271
270
  runOnlyForDeploymentPostprocessing = 0;
272
271
  };
@@ -314,7 +313,7 @@
314
313
  };
315
314
  713F8B0BB1E204A0E50C3B5F840E965E /* Release */ = {
316
315
  isa = XCBuildConfiguration;
317
- baseConfigurationReference = 2E7796AC6951300E68117DC4840EE936 /* AppGroup.xcconfig */;
316
+ baseConfigurationReference = 4B04BA9213D8B9DEF5AFBC867C733C77 /* AppGroup.xcconfig */;
318
317
  buildSettings = {
319
318
  "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
320
319
  CURRENT_PROJECT_VERSION = 1;
@@ -380,7 +379,7 @@
380
379
  };
381
380
  D93529267EF77C85958283F7243104C2 /* Debug */ = {
382
381
  isa = XCBuildConfiguration;
383
- baseConfigurationReference = 2E7796AC6951300E68117DC4840EE936 /* AppGroup.xcconfig */;
382
+ baseConfigurationReference = 4B04BA9213D8B9DEF5AFBC867C733C77 /* AppGroup.xcconfig */;
384
383
  buildSettings = {
385
384
  "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
386
385
  CURRENT_PROJECT_VERSION = 1;
@@ -1,4 +1,5 @@
1
- GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
1
+ APP_IDENTIFIER = jp.mzp.app_group.example
2
+ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 APP_IDENTIFIER=${APP_IDENTIFIER}
2
3
  HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AppGroup" "${PODS_ROOT}/Headers/Public"
3
4
  OTHER_LDFLAGS = -framework "Foundation"
4
5
  PODS_ROOT = ${SRCROOT}
@@ -23,14 +23,14 @@ module CocoaPods
23
23
  end
24
24
 
25
25
  if pod_target
26
- pod_target.store_pod 'AppGroup', path: pod_path.relative_path_from(Pathname.pwd).to_path
26
+ pod_target.store_pod 'AppGroup', podspec: podspec_path.relative_path_from(Pathname.pwd).to_path
27
27
  else
28
28
  Pod::UI.puts "Could not find a target named '#{target}' in your Podfile. Stopping keys".red
29
29
  end
30
30
  end
31
31
  else
32
32
  # otherwise let it go in global
33
- podfile.pod 'AppGroup', path: pod_path.relative_path_from(Pathname.pwd).to_path
33
+ podfile.pod 'AppGroup', podspec: podspec_path.relative_path_from(Pathname.pwd).to_path
34
34
  end
35
35
  end
36
36
 
@@ -42,6 +42,10 @@ module CocoaPods
42
42
  root.+('Pods/CocoaPodsAppGroup/')
43
43
  end
44
44
 
45
+ def podspec_path
46
+ pod_path.join("AppGroup.podspec.json")
47
+ end
48
+
45
49
  def template(name)
46
50
  Pathname(__dir__) + '../../../templates' + name
47
51
  end
@@ -9,6 +9,11 @@ module CocoaPods
9
9
  pod_targets.each do |target|
10
10
  if target.name == 'AppGroup'
11
11
  target.spec_consumers.first.spec.attributes_hash['user_target_xcconfig'] = {"APP_IDENTIFIER"=> store.read(:app_group)}
12
+
13
+ target.root_spec.attributes_hash['pod_target_xcconfig'] = {
14
+ "APP_IDENTIFIER" => store.read(:app_group),
15
+ "GCC_PREPROCESSOR_DEFINITIONS" => 'APP_IDENTIFIER=${APP_IDENTIFIER}',
16
+ }
12
17
  end
13
18
  end
14
19
  end
@@ -1,5 +1,5 @@
1
1
  module Cocoapods
2
2
  module AppGroup
3
- VERSION = "0.4.0"
3
+ VERSION = "0.4.1"
4
4
  end
5
5
  end
@@ -1,6 +1,8 @@
1
1
  #import "AppGroup.h"
2
2
 
3
- static NSString * const kAppIdentifier = @"<%= store.read :app_group %>";
3
+ #define STR(x) @#x
4
+ #define STR2(x) STR(x)
5
+ static NSString * const kAppIdentifier = STR2(APP_IDENTIFIER);
4
6
 
5
7
  @implementation AppGroup
6
8
 
@@ -13,9 +13,9 @@
13
13
  },
14
14
  "source": {
15
15
  "git": "https://github.com/mzp/cocoapods-app_group.git",
16
- "tag": "<%= Cocoapods::AppGroup::VERSION %>"
16
+ "tag": "v<%= Cocoapods::AppGroup::VERSION %>"
17
17
  },
18
- "source_files": "*.{h,m,swift}",
18
+ "source_files": "templates/*.{h,m,swift}",
19
19
  "frameworks": "Foundation",
20
20
  "requires_arc": true
21
21
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-app_group
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - mzp
@@ -80,6 +80,10 @@ files:
80
80
  - Example/Example/ViewController.swift
81
81
  - Example/Podfile
82
82
  - Example/Podfile.lock
83
+ - Example/Pods/AppGroup/LICENSE.txt
84
+ - Example/Pods/AppGroup/README.md
85
+ - Example/Pods/AppGroup/templates/AppGroup.h
86
+ - Example/Pods/AppGroup/templates/AppGroup.m
83
87
  - Example/Pods/CocoaPodsAppGroup/AppGroup.h
84
88
  - Example/Pods/CocoaPodsAppGroup/AppGroup.m
85
89
  - Example/Pods/CocoaPodsAppGroup/AppGroup.podspec.json
@@ -87,7 +91,6 @@ files:
87
91
  - Example/Pods/Local Podspecs/AppGroup.podspec.json
88
92
  - Example/Pods/Manifest.lock
89
93
  - Example/Pods/Pods.xcodeproj/project.pbxproj
90
- - Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/AppGroup.xcscheme
91
94
  - Example/Pods/Target Support Files/AppGroup/AppGroup-dummy.m
92
95
  - Example/Pods/Target Support Files/AppGroup/AppGroup-prefix.pch
93
96
  - Example/Pods/Target Support Files/AppGroup/AppGroup-umbrella.h
@@ -1,60 +0,0 @@
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
- buildForAnalyzing = "YES"
11
- buildForTesting = "YES"
12
- buildForRunning = "YES"
13
- buildForProfiling = "YES"
14
- buildForArchiving = "YES">
15
- <BuildableReference
16
- BuildableIdentifier = 'primary'
17
- BlueprintIdentifier = '0C24EAE4009944EBE7C9F25D'
18
- BlueprintName = 'AppGroup'
19
- ReferencedContainer = 'container:Pods.xcodeproj'
20
- BuildableName = 'AppGroup.framework'>
21
- </BuildableReference>
22
- </BuildActionEntry>
23
- </BuildActionEntries>
24
- </BuildAction>
25
- <TestAction
26
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
27
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28
- shouldUseLaunchSchemeArgsEnv = "YES"
29
- buildConfiguration = "Debug">
30
- <AdditionalOptions>
31
- </AdditionalOptions>
32
- </TestAction>
33
- <LaunchAction
34
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
35
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
36
- launchStyle = "0"
37
- useCustomWorkingDirectory = "NO"
38
- ignoresPersistentStateOnLaunch = "NO"
39
- debugDocumentVersioning = "YES"
40
- debugServiceExtension = "internal"
41
- buildConfiguration = "Debug"
42
- allowLocationSimulation = "YES">
43
- <AdditionalOptions>
44
- </AdditionalOptions>
45
- </LaunchAction>
46
- <ProfileAction
47
- savedToolIdentifier = ""
48
- useCustomWorkingDirectory = "NO"
49
- debugDocumentVersioning = "YES"
50
- buildConfiguration = "Release"
51
- shouldUseLaunchSchemeArgsEnv = "YES">
52
- </ProfileAction>
53
- <AnalyzeAction
54
- buildConfiguration = "Debug">
55
- </AnalyzeAction>
56
- <ArchiveAction
57
- buildConfiguration = "Release"
58
- revealArchiveInOrganizer = "YES">
59
- </ArchiveAction>
60
- </Scheme>