├── .gitignore ├── .travis.yml ├── Ant.podspec ├── Ant ├── .gitkeep └── Classes │ ├── .gitkeep │ ├── Private │ ├── ATModuleManager.h │ ├── ATModuleManager.mm │ ├── ATServiceManager.h │ ├── ATServiceManager.m │ ├── ant-sectdata.h │ ├── ant-sectdata.mm │ ├── cache.h │ └── cache.mm │ └── Public │ ├── ATContext.h │ ├── ATContext.m │ ├── ATExport.h │ ├── ATModuleProtocol.h │ ├── ATServiceProtocol.h │ ├── Ant.h │ └── Ant.m ├── Example ├── Ant.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Ant-Example.xcscheme ├── Ant.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Ant │ ├── ATAppDelegate.h │ ├── ATAppDelegate.m │ ├── ATViewController.h │ ├── ATViewController.m │ ├── Ant-Info.plist │ ├── Ant-Prefix.pch │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m ├── Module1 │ ├── Info.plist │ ├── Module1.h │ ├── Module1App.h │ ├── Module1App.m │ ├── TestServiceImpl.h │ └── TestServiceImpl.m ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ └── Ant.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ └── Target Support Files │ │ ├── Ant │ │ ├── Ant-dummy.m │ │ ├── Ant-prefix.pch │ │ ├── Ant-umbrella.h │ │ ├── Ant.modulemap │ │ ├── Ant.xcconfig │ │ └── Info.plist │ │ ├── Pods-Ant_Example │ │ ├── Info.plist │ │ ├── Pods-Ant_Example-acknowledgements.markdown │ │ ├── Pods-Ant_Example-acknowledgements.plist │ │ ├── Pods-Ant_Example-dummy.m │ │ ├── Pods-Ant_Example-frameworks.sh │ │ ├── Pods-Ant_Example-resources.sh │ │ ├── Pods-Ant_Example-umbrella.h │ │ ├── Pods-Ant_Example.debug.xcconfig │ │ ├── Pods-Ant_Example.modulemap │ │ └── Pods-Ant_Example.release.xcconfig │ │ ├── Pods-Ant_Tests │ │ ├── Info.plist │ │ ├── Pods-Ant_Tests-acknowledgements.markdown │ │ ├── Pods-Ant_Tests-acknowledgements.plist │ │ ├── Pods-Ant_Tests-dummy.m │ │ ├── Pods-Ant_Tests-frameworks.sh │ │ ├── Pods-Ant_Tests-resources.sh │ │ ├── Pods-Ant_Tests-umbrella.h │ │ ├── Pods-Ant_Tests.debug.xcconfig │ │ ├── Pods-Ant_Tests.modulemap │ │ └── Pods-Ant_Tests.release.xcconfig │ │ └── Pods-Module1 │ │ ├── Info.plist │ │ ├── Pods-Module1-acknowledgements.markdown │ │ ├── Pods-Module1-acknowledgements.plist │ │ ├── Pods-Module1-dummy.m │ │ ├── Pods-Module1-resources.sh │ │ ├── Pods-Module1-umbrella.h │ │ ├── Pods-Module1.debug.xcconfig │ │ ├── Pods-Module1.modulemap │ │ └── Pods-Module1.release.xcconfig ├── PublicServices │ ├── Info.plist │ └── PublicServices.h └── Tests │ ├── Tests-Info.plist │ ├── Tests-Prefix.pch │ ├── Tests.m │ └── en.lproj │ └── InfoPlist.strings ├── LICENSE ├── README.md ├── _Pods.xcodeproj └── medias ├── infoplist.png ├── logo.png └── protocol-class.jpg /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 26 | # Carthage/Checkouts 27 | 28 | Carthage/Build 29 | 30 | # We recommend against adding the Pods directory to your .gitignore. However 31 | # you should judge for yourself, the pros and cons are mentioned at: 32 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 33 | # 34 | # Note: if you ignore the Pods directory, make sure to uncomment 35 | # `pod install` in .travis.yml 36 | # 37 | # Pods/ 38 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * https://www.objc.io/issues/6-build-tools/travis-ci/ 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | language: objective-c 6 | # cache: cocoapods 7 | # podfile: Example/Podfile 8 | # before_install: 9 | # - gem install cocoapods # Since Travis is not always on latest version 10 | # - pod install --project-directory=Example 11 | script: 12 | #- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/Ant.xcworkspace -scheme Ant-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 13 | - pod lib lint --allow-warnings 14 | -------------------------------------------------------------------------------- /Ant.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint Ant.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'Ant' 11 | s.version = '0.1.0' 12 | s.summary = 'Ant is a modular programming tool for iOS developer.' 13 | 14 | s.description = <<-DESC 15 | Ant is a modular programming tool for iOS developer. 16 | Developer can use Ant to make iOS programming easier when deal with module. 17 | DESC 18 | 19 | s.homepage = 'https://github.com/hujewelz/Ant' 20 | s.license = { :type => 'MIT', :file => 'LICENSE' } 21 | s.author = { 'huluobo' => 'hujewelz@163.com' } 22 | s.source = { :git => 'https://github.com/hujewelz/Ant.git', :tag => s.version.to_s } 23 | 24 | s.ios.deployment_target = '8.0' 25 | 26 | s.source_files = 'Ant/Classes/**/*' 27 | s.public_header_files = 'Ant/Classes/Public/**/*.h' 28 | end 29 | -------------------------------------------------------------------------------- /Ant/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hujewelz/Ant/a16fc445961b5d08cc2a453bb4b35a4df13cd74c/Ant/.gitkeep -------------------------------------------------------------------------------- /Ant/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hujewelz/Ant/a16fc445961b5d08cc2a453bb4b35a4df13cd74c/Ant/Classes/.gitkeep -------------------------------------------------------------------------------- /Ant/Classes/Private/ATModuleManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // ATModuleManager.h 3 | // ModuleManager 4 | // 5 | // Created by huluobo on 2019/1/30. 6 | // Copyright © 2019 jewelz. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import 27 | 28 | @interface ATModuleManager : NSObject 29 | 30 | + (nonnull instancetype)shareInstance; 31 | 32 | /// Register a module with Module class. 33 | + (void)registerModule:(nullable Class)moduleClass; 34 | 35 | /// Register a module with Module name. 36 | + (void)registerModuleWithName:(nonnull NSString *)moduleName; 37 | 38 | + (void)registerModulesFromPlistFile:(nullable NSString *)plist; 39 | 40 | + (void)registerModuleWithNameLazily:(nonnull NSString *)moduleName; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Ant/Classes/Private/ATModuleManager.mm: -------------------------------------------------------------------------------- 1 | // 2 | // ATModuleManager.m 3 | // ModuleManager 4 | // 5 | // Created by huluobo on 2019/1/30. 6 | // Copyright © 2019 jewelz. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import "ATModuleManager.h" 27 | #import "ATModuleProtocol.h" 28 | #import 29 | #import "cache.h" 30 | 31 | static NSMutableSet> *modules; 32 | static NSMutableSet *moduleNames; 33 | 34 | static NSString * const kAntModuleKey = @"Modules"; 35 | 36 | NS_INLINE void setupModulesIfNeeded() 37 | { 38 | if (!modules) modules = [NSMutableSet set]; 39 | if (!moduleNames) moduleNames = [NSMutableSet set]; 40 | } 41 | 42 | NS_INLINE id moduleInstanceWithModule(Class moduleClass) { 43 | if (![[moduleClass class] respondsToSelector:@selector(singleton)]) { 44 | return [[[moduleClass class] alloc] init]; 45 | } 46 | if (![[moduleClass class] respondsToSelector:@selector(shareInstance)]) { 47 | return [[[moduleClass class] alloc] init]; 48 | } 49 | return [[moduleClass class] shareInstance]; 50 | } 51 | 52 | static void cacheModulesIfNeeded(void); 53 | 54 | @interface ATModuleManager() 55 | 56 | @end 57 | 58 | @implementation ATModuleManager 59 | 60 | #pragma mark - internal 61 | 62 | + (instancetype)shareInstance { 63 | static ATModuleManager *instance = nil; 64 | static dispatch_once_t onceToken; 65 | dispatch_once(&onceToken, ^{ 66 | instance = [[ATModuleManager alloc] init]; 67 | }); 68 | return instance; 69 | } 70 | 71 | + (void)registerModule:(Class)moduleClass { 72 | [self addNewModule:moduleClass]; 73 | } 74 | 75 | + (void)registerModuleWithName:(NSString *)moduleName { 76 | NSParameterAssert(moduleName); 77 | Class cls = NSClassFromString(moduleName); 78 | [self registerModule:cls]; 79 | } 80 | 81 | + (void)registerModuleWithNameLazily:(NSString *)moduleName { 82 | NSParameterAssert(moduleName); 83 | Class cls = NSClassFromString(moduleName); 84 | [self addNewModuleLazily:cls]; 85 | } 86 | 87 | + (void)registerModulesFromPlistFile:(NSString *)plist { 88 | 89 | if (!plist) { 90 | plist = [[NSBundle mainBundle] pathForResource:@"Info" ofType:@"plist"]; 91 | } 92 | if (![[NSFileManager defaultManager] fileExistsAtPath:plist]) { 93 | return; 94 | } 95 | 96 | NSDictionary *moduleDict = [NSDictionary dictionaryWithContentsOfFile:plist]; 97 | 98 | NSArray *modules = [moduleDict objectForKey:kAntModuleKey]; 99 | NSAssert(modules, @"The module should contain 'Modules' key."); 100 | 101 | for (NSString *m in modules) { 102 | [self registerModuleWithName:m]; 103 | } 104 | } 105 | 106 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector { 107 | NSString *sel = NSStringFromSelector(aSelector); 108 | if ([sel rangeOfString:@"application"].location != NSNotFound) { 109 | return [ATModuleManager instanceMethodSignatureForSelector:aSelector]; 110 | } 111 | return [super methodSignatureForSelector:aSelector]; 112 | } 113 | 114 | 115 | - (void)forwardInvocation:(NSInvocation *)anInvocation { 116 | NSString *sel = NSStringFromSelector(anInvocation.selector); 117 | if ([sel rangeOfString:@"application"].location == NSNotFound) return; 118 | cacheModulesIfNeeded(); 119 | 120 | [modules enumerateObjectsUsingBlock:^(id _Nonnull obj, BOOL * _Nonnull stop) { 121 | if ([obj respondsToSelector:anInvocation.selector]) { 122 | [anInvocation invokeWithTarget:obj]; 123 | } 124 | }]; 125 | } 126 | 127 | #pragma mark - Private 128 | 129 | static void cacheModulesIfNeeded() { 130 | if ([moduleNames count] == 0) { 131 | return; 132 | } 133 | if (modules.count == moduleNames.count) { 134 | return; 135 | } 136 | // Need to cache 137 | for (NSString *mName in moduleNames) { 138 | Class cls = NSClassFromString(mName); 139 | if (!cls) continue; 140 | id obj = moduleInstanceWithModule(cls); 141 | if ([modules containsObject:obj]) { 142 | continue; 143 | } 144 | [modules addObject:obj]; 145 | } 146 | } 147 | 148 | + (BOOL)addNewModuleLazily:(Class)moduleClass { 149 | if (!moduleClass) { 150 | return NO; 151 | } 152 | if (![moduleClass conformsToProtocol: @protocol(ATModuleProtocol)]) { 153 | return NO; 154 | } 155 | setupModulesIfNeeded(); 156 | 157 | NSString *mn = NSStringFromClass(moduleClass); 158 | if ([moduleNames containsObject:mn]) { // 防止重复注册 159 | return NO; 160 | } 161 | [moduleNames addObject:mn]; 162 | return YES; 163 | } 164 | 165 | + (void)addNewModule:(Class)moduleClass { 166 | if (![self addNewModuleLazily:moduleClass]) { return; } 167 | id obj = moduleInstanceWithModule(moduleClass); 168 | [modules addObject:obj]; 169 | } 170 | 171 | 172 | @end 173 | -------------------------------------------------------------------------------- /Ant/Classes/Private/ATServiceManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // ATServiceManager.h 3 | // ModuleManager 4 | // 5 | // Created by huluobo on 2019/1/30. 6 | // Copyright © 2019 jewelz. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import 27 | 28 | @interface ATServiceManager : NSObject 29 | 30 | + (void)registerService:(nullable Class)service forProtocol:(nullable Protocol *)protocol; 31 | 32 | + (void)registerServiceName:(nonnull NSString*)service forServiceType:(nonnull NSString *)serviceType; 33 | 34 | + (nullable id)serviceImplFromProtocol:(nonnull Protocol *)protocol; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Ant/Classes/Private/ATServiceManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // ATServiceManager.m 3 | // ModuleManager 4 | // 5 | // Created by huluobo on 2019/1/30. 6 | // Copyright © 2019 jewelz. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import "ATServiceManager.h" 27 | #include 28 | 29 | static NSMutableDictionary *classMap; 30 | 31 | static pthread_mutex_t lock; 32 | 33 | #define TIME_BEGIN \ 34 | CFAbsoluteTime begin = CFAbsoluteTimeGetCurrent(); 35 | 36 | #define TIME_END \ 37 | CFAbsoluteTime end = CFAbsoluteTimeGetCurrent();\ 38 | printf("duration: %f\n", end - begin); 39 | 40 | 41 | NS_INLINE void setupMapsIfNeeded() 42 | { 43 | if (!classMap) classMap = [NSMutableDictionary dictionary]; 44 | } 45 | 46 | NS_INLINE NSString *serviceForProtocol(Protocol *p) { 47 | __block NSString *cls = nil; 48 | NSString *prto = NSStringFromProtocol(p); 49 | pthread_mutex_lock(&lock); 50 | cls = classMap[prto]; 51 | pthread_mutex_unlock(&lock); 52 | return cls; 53 | } 54 | 55 | @implementation ATServiceManager 56 | 57 | + (void)initialize { 58 | pthread_mutex_init(&lock, NULL); 59 | } 60 | 61 | + (id)serviceImplFromProtocol:(Protocol *)protocol { 62 | NSParameterAssert(protocol); 63 | setupMapsIfNeeded(); 64 | NSString *prto = NSStringFromProtocol(protocol); 65 | NSString *ser = serviceForProtocol(protocol);//classMap[prto]; 66 | NSString *msg1 = [NSString stringWithFormat:@"Please register your class for protocol '%@' first.", prto]; 67 | NSAssert(ser, msg1); 68 | 69 | Class cls = NSClassFromString(ser); 70 | NSString *msg2 = [NSString stringWithFormat:@"The Class '%@' does not exist.", ser]; 71 | NSAssert(cls, msg2); 72 | 73 | NSString *msg3 = [NSString stringWithFormat:@"The Class '%@' does not conform to expected protocol '%@'", ser, prto]; 74 | NSAssert([cls conformsToProtocol:protocol], msg3); 75 | return [[cls alloc] init]; 76 | } 77 | 78 | + (void)registerServiceName:(NSString *)service forServiceType:(NSString *)serviceType { 79 | Class cls = NSClassFromString(service); 80 | Protocol *prot = NSProtocolFromString(serviceType); 81 | [self registerService:cls forProtocol:prot]; 82 | } 83 | 84 | + (void)registerService:(Class)service forProtocol:(Protocol *)protocol { 85 | if (!service) { 86 | return; 87 | } 88 | if (!protocol) { 89 | return; 90 | } 91 | setupMapsIfNeeded(); 92 | /*if (![service conformsToProtocol:protocol]) { 93 | return; 94 | }*/ 95 | NSString *ser = NSStringFromClass(service); 96 | NSString *prto = NSStringFromProtocol(protocol); 97 | 98 | pthread_mutex_lock(&lock); 99 | classMap[prto] = ser; 100 | pthread_mutex_unlock(&lock); 101 | } 102 | 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /Ant/Classes/Private/ant-sectdata.h: -------------------------------------------------------------------------------- 1 | // 2 | // ant-sectdata.h 3 | // ModuleManager 4 | // 5 | // Created by huluobo on 2019/1/30. 6 | // Copyright © 2019 jewelz. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import 27 | #import 28 | 29 | typedef struct serviceinfo_t serviceinfo_t; 30 | 31 | typedef char * module_t; 32 | 33 | extern module_t *_getRegisteredModules(const struct mach_header *mhp, size_t *outCount); 34 | 35 | 36 | 37 | extern serviceinfo_t *_getRegisteredServiceInfoList(const struct mach_header *mhp, size_t *outCount); 38 | 39 | 40 | -------------------------------------------------------------------------------- /Ant/Classes/Private/ant-sectdata.mm: -------------------------------------------------------------------------------- 1 | // 2 | // ant-sectdata.m 3 | // ModuleManager 4 | // 5 | // Created by huluobo on 2019/1/30. 6 | // Copyright © 2019 jewelz. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import "ant-sectdata.h" 27 | #import 28 | #import 29 | #import "ATModuleManager.h" 30 | #import "ATServiceManager.h" 31 | #import "ATExport.h" 32 | 33 | static void dyld_add_image_callback(const struct mach_header *mhp, intptr_t vmaddr_slide); 34 | 35 | static __attribute__((constructor)) 36 | void ant_init() { 37 | _dyld_register_func_for_add_image(dyld_add_image_callback); 38 | } 39 | 40 | template 41 | T* getDataSection(const struct mach_header *mhp, const char *sectname, size_t *outCount) 42 | { 43 | 44 | #ifndef __LP64__ 45 | uint32_t byteCount = 0; 46 | T* data = (T*)getsectdatafromheader(mhp, "__DATA", sectname, &byteCount); 47 | if (outCount) *outCount = byteCount / sizeof(T); 48 | #else 49 | unsigned long byteCount = 0; 50 | T* data = (T*)getsectiondata((struct mach_header_64 *)mhp, "__DATA", sectname, &byteCount); 51 | if (outCount) *outCount = byteCount / sizeof(T); 52 | #endif 53 | return data; 54 | } 55 | 56 | #define GETSECT(name, type, sectname) \ 57 | type *name(const struct mach_header *mhp, size_t *outCount) { \ 58 | return getDataSection(mhp, sectname, outCount); \ 59 | } 60 | 61 | // function name content type section name 62 | GETSECT(_getRegisteredModules, module_t, "__ant_modules"); 63 | GETSECT(_getRegisteredServiceInfoList, serviceinfo_t, "__ant_services") 64 | 65 | #define ANT_STRING_FROM_CString(cstring) [NSString stringWithUTF8String: (cstring)] 66 | 67 | static void add_module(const struct mach_header *mhp, intptr_t vmaddr_slide) { 68 | size_t count = 0; 69 | module_t *ms = _getRegisteredModules(mhp, &count); 70 | for (size_t i=0; i 26 | 27 | typedef uint32_t mask_t; 28 | 29 | struct bucket_t { 30 | const void *target; 31 | IMP imp; 32 | }; 33 | 34 | typedef struct bucket_t *bucket; 35 | 36 | struct cache_t { 37 | bucket *_buckets; 38 | mask_t _capacity; 39 | mask_t _occupied; 40 | 41 | const char *_name; 42 | void **_args; 43 | int _numOfArgs; 44 | 45 | public: 46 | cache_t(const char *name, void *args[], int numberOfArgs); 47 | 48 | bucket *buckets() { return _buckets; }; 49 | mask_t capacity() { return _capacity; } 50 | mask_t occupied() { return _occupied; } 51 | 52 | const char *name() { return _name; } 53 | 54 | bucket *bucketsWithCount(uint32_t *count) 55 | { 56 | *count = _occupied; 57 | return _buckets; 58 | } 59 | 60 | void initialize(); 61 | void addCache(const void *target, const IMP imp); 62 | void expand(); 63 | void reallocate(mask_t oldCapacity, mask_t newCapacity); 64 | static size_t bytesForCapacity(mask_t capacity); 65 | }; 66 | 67 | struct ImpMap { 68 | CFMutableDictionaryRef dictRef; 69 | public: 70 | ImpMap() { 71 | dictRef = CFDictionaryCreateMutable(kCFAllocatorDefault, 10, NULL, NULL); 72 | } 73 | 74 | void addCache(const char *key, cache_t *cache) { 75 | if (CFDictionaryGetValue(dictRef, key)) { return; } 76 | // NSLog(@"cache key: %s", key); 77 | CFDictionarySetValue(dictRef, key, cache); 78 | } 79 | 80 | bool cacheExist(const char *key) { 81 | if (CFDictionaryGetValue(dictRef, key)) return true; 82 | return false; 83 | } 84 | 85 | cache_t *cache(const char *key) { 86 | const void *value = CFDictionaryGetValue(dictRef, key); 87 | if (value == NULL) { return NULL; } 88 | return (cache_t *)value; 89 | } 90 | }; 91 | 92 | cache_t *ant_cacheCreate(const char *name, void *args[], int numberOfArgs); 93 | 94 | //static struct ImpMap map; 95 | -------------------------------------------------------------------------------- /Ant/Classes/Private/cache.mm: -------------------------------------------------------------------------------- 1 | // 2 | // cache.m 3 | // Ant 4 | // 5 | // Created by huluobo on 2019/2/18. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "cache.h" 26 | #import 27 | 28 | #define INIT_CACHE_SIZE 10 29 | 30 | bucket *allocateBuckets(mask_t capacity); 31 | 32 | cache_t::cache_t(const char *name, void *args[], int numberOfArgs) 33 | :_name(name), _args(args), _numOfArgs(numberOfArgs) 34 | { 35 | initialize(); 36 | } 37 | 38 | void cache_t::initialize() 39 | { 40 | bzero(this, sizeof(*this)); 41 | _buckets = NULL; 42 | } 43 | 44 | void cache_t::addCache(const void *target, IMP imp) 45 | { 46 | // 拓容 47 | if (_occupied >= _capacity) { 48 | expand(); 49 | } 50 | struct bucket_t *b = (struct bucket_t *)calloc(sizeof(bucket_t), 1); 51 | b->target = target; 52 | b->imp = imp; 53 | _buckets[_occupied++] = b; 54 | } 55 | 56 | void cache_t::expand() { 57 | mask_t oldCapacity = capacity(); 58 | mask_t newCapacity = oldCapacity ? oldCapacity*2 : INIT_CACHE_SIZE; 59 | reallocate(oldCapacity, newCapacity); 60 | } 61 | 62 | void cache_t::reallocate(mask_t oldCapacity, mask_t newCapacity) 63 | { 64 | bucket *oldBuckets = buckets(); 65 | bucket *newBuckets = allocateBuckets(newCapacity); 66 | if (oldBuckets) { 67 | memcpy(newBuckets, oldBuckets, oldCapacity); 68 | } 69 | _buckets = newBuckets; 70 | _capacity = newCapacity; 71 | } 72 | 73 | cache_t *ant_cacheCreate(const char *name, void *args[], int numberOfArgs) { 74 | cache_t *cache = (cache_t *)malloc(sizeof(cache_t)); 75 | cache->initialize(); 76 | cache->_name = name; 77 | cache->_numOfArgs = numberOfArgs; 78 | cache->_args = args; 79 | return cache; 80 | } 81 | 82 | size_t cache_t::bytesForCapacity(mask_t capacity) 83 | { 84 | return sizeof(bucket) * (capacity /*+ 1*/); 85 | } 86 | 87 | bucket *allocateBuckets(mask_t capacity) 88 | { 89 | bucket *newBuckets = (bucket *)calloc(cache_t::bytesForCapacity(capacity), 1); 90 | return newBuckets; 91 | } 92 | -------------------------------------------------------------------------------- /Ant/Classes/Public/ATContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // ATContext.h 3 | // ModuleManager 4 | // 5 | // Created by huluobo on 2019/1/30. 6 | // Copyright © 2019 jewelz. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ATContext : NSObject 12 | 13 | + (nonnull instancetype)shareInstance; 14 | 15 | - (instancetype)init NS_UNAVAILABLE; 16 | 17 | @property (nonatomic, copy, nonnull) NSString *plistName; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Ant/Classes/Public/ATContext.m: -------------------------------------------------------------------------------- 1 | // 2 | // ATContext.m 3 | // ModuleManager 4 | // 5 | // Created by huluobo on 2019/1/30. 6 | // Copyright © 2019 jewelz. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import "ATContext.h" 27 | 28 | @implementation ATContext 29 | 30 | + (nonnull instancetype)shareInstance { 31 | static ATContext *ctx = nil; 32 | static dispatch_once_t onceToken; 33 | dispatch_once(&onceToken, ^{ 34 | ctx = [[self class] new]; 35 | ctx.plistName = @"Info"; 36 | }); 37 | return ctx; 38 | } 39 | 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Ant/Classes/Public/ATExport.h: -------------------------------------------------------------------------------- 1 | // 2 | // ATExport.h 3 | // ModuleManager 4 | // 5 | // Created by huluobo on 2019/1/30. 6 | // Copyright © 2019 jewelz. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #ifndef ATExport_h 27 | #define ATExport_h 28 | 29 | struct serviceinfo_t { 30 | const char *cls; 31 | const char *prt; 32 | }; 33 | 34 | #define ANT_MODULE_EXPORT(name) char * k##name##mod SECTION_DATA(__ant_modules) = ""#name""; 35 | 36 | #define ANT_REGISTER_SERVICE(impl, protocol) struct serviceinfo_t k##impl##_##protocol SECTION_DATA(__ant_services) = {#impl, #protocol}; 37 | 38 | #define SECTION_DATA(sectname) __attribute((used, section("__DATA, "#sectname" "))) 39 | 40 | 41 | #endif /* ATExport_h */ 42 | 43 | -------------------------------------------------------------------------------- /Ant/Classes/Public/ATModuleProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // ATModuleProtocol.h 3 | // ATModuleManager 4 | // 5 | // Created by huluobo on 2019/1/29. 6 | // Copyright © 2019 jewelz. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import 27 | #import "ATExport.h" 28 | 29 | @protocol ATModuleProtocol 30 | 31 | @optional 32 | + (BOOL)singleton; 33 | 34 | + (id)shareInstance; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Ant/Classes/Public/ATServiceProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // ATServiceProtocol.h 3 | // ModuleManager 4 | // 5 | // Created by huluobo on 2019/1/29. 6 | // Copyright © 2019 jewelz. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import 27 | #import "ATExport.h" 28 | 29 | @protocol ATServiceProtocol 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Ant/Classes/Public/Ant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Ant.h 3 | // ModuleManager 4 | // 5 | // Created by huluobo on 2019/1/29. 6 | // Copyright © 2019 jewelz. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import 27 | #import "ATExport.h" 28 | #import "ATModuleProtocol.h" 29 | #import "ATServiceProtocol.h" 30 | 31 | @interface Ant : NSObject 32 | 33 | + (nonnull instancetype)shareInstance; 34 | 35 | - (instancetype)init NS_UNAVAILABLE; 36 | 37 | /// Register a module with Module class. 38 | + (void)registerModule:(nonnull Class)moduleClass; 39 | 40 | /// Register a module with Module name. 41 | + (void)registerModuleWithName:(nonnull NSString *)moduleName; 42 | 43 | /// Register all modules with plist file. 44 | /// @param plist the full path of the plist file. 45 | + (void)registerModulesFromPlistFile:(nullable NSString *)plist; 46 | 47 | + (void)registerService:(nonnull Class)service forProtocol:(nonnull Protocol *)protocol; 48 | 49 | + (id)serviceImplFromProtocol:(nonnull Protocol *)protocol; 50 | 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Ant/Classes/Public/Ant.m: -------------------------------------------------------------------------------- 1 | // 2 | // Ant.m 3 | // ModuleManager 4 | // 5 | // Created by huluobo on 2019/1/29. 6 | // Copyright © 2019 jewelz. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import "Ant.h" 27 | #import "ATModuleManager.h" 28 | #import "ATServiceManager.h" 29 | 30 | @implementation Ant 31 | 32 | + (instancetype)shareInstance { 33 | static Ant *ant = nil; 34 | static dispatch_once_t onceToken; 35 | dispatch_once(&onceToken, ^{ 36 | ant = [Ant new]; 37 | }); 38 | return ant; 39 | } 40 | 41 | - (id)forwardingTargetForSelector:(SEL)aSelector { 42 | NSString *sel = NSStringFromSelector(aSelector); 43 | if ([sel rangeOfString:@"application"].location != NSNotFound) { 44 | return [ATModuleManager shareInstance]; 45 | } 46 | return [super forwardingTargetForSelector:aSelector]; 47 | } 48 | 49 | + (void)registerModule:(Class)moduleClass { 50 | [ATModuleManager registerModule:moduleClass]; 51 | } 52 | 53 | + (void)registerModuleWithName:(NSString *)moduleName { 54 | [ATModuleManager registerModuleWithName:moduleName]; 55 | } 56 | 57 | + (void)registerModulesFromPlistFile:(NSString *)plist { 58 | [ATModuleManager registerModulesFromPlistFile:plist]; 59 | } 60 | 61 | + (id)serviceImplFromProtocol:(Protocol *)protocol { 62 | return [ATServiceManager serviceImplFromProtocol:protocol]; 63 | } 64 | 65 | + (void)registerService:(Class)service forProtocol:(Protocol *)protocol { 66 | [ATServiceManager registerService:service forProtocol:protocol]; 67 | } 68 | 69 | 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /Example/Ant.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1D92D41911B8D22FECED2572 /* Pods_Module1.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D2D460369883DB27D9CF4B3 /* Pods_Module1.framework */; }; 11 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 12 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 13 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 14 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; 15 | 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; 16 | 6003F59E195388D20070C39A /* ATAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* ATAppDelegate.m */; }; 17 | 6003F5A7195388D20070C39A /* ATViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* ATViewController.m */; }; 18 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; 19 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; 20 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 21 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 22 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; 23 | 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; 24 | 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; }; 25 | 76CE0142CCD55712640000D7 /* Pods_Ant_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEAF3E44450A538B5C39E1C7 /* Pods_Ant_Example.framework */; }; 26 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; 27 | B09282841519355BD8ADE07A /* Pods_Ant_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB621AF54180AF9CD078087E /* Pods_Ant_Tests.framework */; }; 28 | C23FBF342213C2CF00A998D3 /* Module1.h in Headers */ = {isa = PBXBuildFile; fileRef = C23FBF322213C2CF00A998D3 /* Module1.h */; settings = {ATTRIBUTES = (Public, ); }; }; 29 | C23FBF372213C2CF00A998D3 /* Module1.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C23FBF302213C2CF00A998D3 /* Module1.framework */; }; 30 | C23FBF382213C2CF00A998D3 /* Module1.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C23FBF302213C2CF00A998D3 /* Module1.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 31 | C23FBF3F2213C2F700A998D3 /* Module1App.h in Headers */ = {isa = PBXBuildFile; fileRef = C23FBF3D2213C2F700A998D3 /* Module1App.h */; }; 32 | C23FBF402213C2F700A998D3 /* Module1App.m in Sources */ = {isa = PBXBuildFile; fileRef = C23FBF3E2213C2F700A998D3 /* Module1App.m */; }; 33 | C23FBF592213FE6800A998D3 /* TestServiceImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = C23FBF572213FE6800A998D3 /* TestServiceImpl.h */; }; 34 | C23FBF5A2213FE6800A998D3 /* TestServiceImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = C23FBF582213FE6800A998D3 /* TestServiceImpl.m */; }; 35 | C23FBF64221402B900A998D3 /* PublicServices.h in Headers */ = {isa = PBXBuildFile; fileRef = C23FBF62221402B900A998D3 /* PublicServices.h */; settings = {ATTRIBUTES = (Public, ); }; }; 36 | C23FBF67221402B900A998D3 /* PublicServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C23FBF60221402B900A998D3 /* PublicServices.framework */; }; 37 | C23FBF68221402B900A998D3 /* PublicServices.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C23FBF60221402B900A998D3 /* PublicServices.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 38 | C23FBF6C221402C300A998D3 /* PublicServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C23FBF60221402B900A998D3 /* PublicServices.framework */; }; 39 | /* End PBXBuildFile section */ 40 | 41 | /* Begin PBXContainerItemProxy section */ 42 | 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { 43 | isa = PBXContainerItemProxy; 44 | containerPortal = 6003F582195388D10070C39A /* Project object */; 45 | proxyType = 1; 46 | remoteGlobalIDString = 6003F589195388D20070C39A; 47 | remoteInfo = Ant; 48 | }; 49 | C23FBF352213C2CF00A998D3 /* PBXContainerItemProxy */ = { 50 | isa = PBXContainerItemProxy; 51 | containerPortal = 6003F582195388D10070C39A /* Project object */; 52 | proxyType = 1; 53 | remoteGlobalIDString = C23FBF2F2213C2CF00A998D3; 54 | remoteInfo = Module1; 55 | }; 56 | C23FBF65221402B900A998D3 /* PBXContainerItemProxy */ = { 57 | isa = PBXContainerItemProxy; 58 | containerPortal = 6003F582195388D10070C39A /* Project object */; 59 | proxyType = 1; 60 | remoteGlobalIDString = C23FBF5F221402B900A998D3; 61 | remoteInfo = PublicServices; 62 | }; 63 | /* End PBXContainerItemProxy section */ 64 | 65 | /* Begin PBXCopyFilesBuildPhase section */ 66 | C23FBF3C2213C2CF00A998D3 /* Embed Frameworks */ = { 67 | isa = PBXCopyFilesBuildPhase; 68 | buildActionMask = 2147483647; 69 | dstPath = ""; 70 | dstSubfolderSpec = 10; 71 | files = ( 72 | C23FBF68221402B900A998D3 /* PublicServices.framework in Embed Frameworks */, 73 | C23FBF382213C2CF00A998D3 /* Module1.framework in Embed Frameworks */, 74 | ); 75 | name = "Embed Frameworks"; 76 | runOnlyForDeploymentPostprocessing = 0; 77 | }; 78 | /* End PBXCopyFilesBuildPhase section */ 79 | 80 | /* Begin PBXFileReference section */ 81 | 1207B10BE60E607D8FFFC8C3 /* Ant.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Ant.podspec; path = ../Ant.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 82 | 18BC3311AFD35B43E8A9B557 /* Pods-Ant_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Ant_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Ant_Tests/Pods-Ant_Tests.release.xcconfig"; sourceTree = ""; }; 83 | 2E5D06BFE71659C8945FB7D5 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 84 | 3B3DCCF8B46B794B13B8609C /* Pods-Module1.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Module1.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Module1/Pods-Module1.debug.xcconfig"; sourceTree = ""; }; 85 | 6003F58A195388D20070C39A /* Ant_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Ant_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 86 | 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 87 | 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 88 | 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 89 | 6003F595195388D20070C39A /* Ant-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Ant-Info.plist"; sourceTree = ""; }; 90 | 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 91 | 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 92 | 6003F59B195388D20070C39A /* Ant-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Ant-Prefix.pch"; sourceTree = ""; }; 93 | 6003F59C195388D20070C39A /* ATAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ATAppDelegate.h; sourceTree = ""; }; 94 | 6003F59D195388D20070C39A /* ATAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ATAppDelegate.m; sourceTree = ""; }; 95 | 6003F5A5195388D20070C39A /* ATViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ATViewController.h; sourceTree = ""; }; 96 | 6003F5A6195388D20070C39A /* ATViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ATViewController.m; sourceTree = ""; }; 97 | 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 98 | 6003F5AE195388D20070C39A /* Ant_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Ant_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 99 | 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 100 | 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; 101 | 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 102 | 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; }; 103 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; 104 | 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 105 | 7D2D460369883DB27D9CF4B3 /* Pods_Module1.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Module1.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 106 | 85DDBAFF3B161A0AE8CA938A /* Pods-Ant_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Ant_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Ant_Example/Pods-Ant_Example.release.xcconfig"; sourceTree = ""; }; 107 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 108 | A00134DB3FF83EB76B25E40D /* Pods-Module1.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Module1.release.xcconfig"; path = "Pods/Target Support Files/Pods-Module1/Pods-Module1.release.xcconfig"; sourceTree = ""; }; 109 | A2977195B08D6AFE26CEF048 /* Pods-Ant_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Ant_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Ant_Tests/Pods-Ant_Tests.debug.xcconfig"; sourceTree = ""; }; 110 | AB621AF54180AF9CD078087E /* Pods_Ant_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Ant_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 111 | AE9377A89FD2AAF59FF0FC4B /* Pods-Ant_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Ant_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Ant_Example/Pods-Ant_Example.debug.xcconfig"; sourceTree = ""; }; 112 | C23FBF302213C2CF00A998D3 /* Module1.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Module1.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 113 | C23FBF322213C2CF00A998D3 /* Module1.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Module1.h; sourceTree = ""; }; 114 | C23FBF332213C2CF00A998D3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 115 | C23FBF3D2213C2F700A998D3 /* Module1App.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Module1App.h; sourceTree = ""; }; 116 | C23FBF3E2213C2F700A998D3 /* Module1App.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Module1App.m; sourceTree = ""; }; 117 | C23FBF572213FE6800A998D3 /* TestServiceImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestServiceImpl.h; sourceTree = ""; }; 118 | C23FBF582213FE6800A998D3 /* TestServiceImpl.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestServiceImpl.m; sourceTree = ""; }; 119 | C23FBF60221402B900A998D3 /* PublicServices.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PublicServices.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 120 | C23FBF62221402B900A998D3 /* PublicServices.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PublicServices.h; sourceTree = ""; }; 121 | C23FBF63221402B900A998D3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 122 | CEAF3E44450A538B5C39E1C7 /* Pods_Ant_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Ant_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 123 | FAD2020316BE7F0983E4BB94 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 124 | /* End PBXFileReference section */ 125 | 126 | /* Begin PBXFrameworksBuildPhase section */ 127 | 6003F587195388D20070C39A /* Frameworks */ = { 128 | isa = PBXFrameworksBuildPhase; 129 | buildActionMask = 2147483647; 130 | files = ( 131 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 132 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 133 | C23FBF372213C2CF00A998D3 /* Module1.framework in Frameworks */, 134 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, 135 | 76CE0142CCD55712640000D7 /* Pods_Ant_Example.framework in Frameworks */, 136 | C23FBF67221402B900A998D3 /* PublicServices.framework in Frameworks */, 137 | ); 138 | runOnlyForDeploymentPostprocessing = 0; 139 | }; 140 | 6003F5AB195388D20070C39A /* Frameworks */ = { 141 | isa = PBXFrameworksBuildPhase; 142 | buildActionMask = 2147483647; 143 | files = ( 144 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, 145 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 146 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, 147 | B09282841519355BD8ADE07A /* Pods_Ant_Tests.framework in Frameworks */, 148 | ); 149 | runOnlyForDeploymentPostprocessing = 0; 150 | }; 151 | C23FBF2C2213C2CF00A998D3 /* Frameworks */ = { 152 | isa = PBXFrameworksBuildPhase; 153 | buildActionMask = 2147483647; 154 | files = ( 155 | C23FBF6C221402C300A998D3 /* PublicServices.framework in Frameworks */, 156 | 1D92D41911B8D22FECED2572 /* Pods_Module1.framework in Frameworks */, 157 | ); 158 | runOnlyForDeploymentPostprocessing = 0; 159 | }; 160 | C23FBF5C221402B900A998D3 /* Frameworks */ = { 161 | isa = PBXFrameworksBuildPhase; 162 | buildActionMask = 2147483647; 163 | files = ( 164 | ); 165 | runOnlyForDeploymentPostprocessing = 0; 166 | }; 167 | /* End PBXFrameworksBuildPhase section */ 168 | 169 | /* Begin PBXGroup section */ 170 | 6003F581195388D10070C39A = { 171 | isa = PBXGroup; 172 | children = ( 173 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, 174 | 6003F593195388D20070C39A /* Example for Ant */, 175 | 6003F5B5195388D20070C39A /* Tests */, 176 | C23FBF312213C2CF00A998D3 /* Module1 */, 177 | C23FBF61221402B900A998D3 /* PublicServices */, 178 | 6003F58C195388D20070C39A /* Frameworks */, 179 | 6003F58B195388D20070C39A /* Products */, 180 | 84A2F7A68998F960FDD2A6EE /* Pods */, 181 | ); 182 | sourceTree = ""; 183 | }; 184 | 6003F58B195388D20070C39A /* Products */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | 6003F58A195388D20070C39A /* Ant_Example.app */, 188 | 6003F5AE195388D20070C39A /* Ant_Tests.xctest */, 189 | C23FBF302213C2CF00A998D3 /* Module1.framework */, 190 | C23FBF60221402B900A998D3 /* PublicServices.framework */, 191 | ); 192 | name = Products; 193 | sourceTree = ""; 194 | }; 195 | 6003F58C195388D20070C39A /* Frameworks */ = { 196 | isa = PBXGroup; 197 | children = ( 198 | 6003F58D195388D20070C39A /* Foundation.framework */, 199 | 6003F58F195388D20070C39A /* CoreGraphics.framework */, 200 | 6003F591195388D20070C39A /* UIKit.framework */, 201 | 6003F5AF195388D20070C39A /* XCTest.framework */, 202 | CEAF3E44450A538B5C39E1C7 /* Pods_Ant_Example.framework */, 203 | AB621AF54180AF9CD078087E /* Pods_Ant_Tests.framework */, 204 | 7D2D460369883DB27D9CF4B3 /* Pods_Module1.framework */, 205 | ); 206 | name = Frameworks; 207 | sourceTree = ""; 208 | }; 209 | 6003F593195388D20070C39A /* Example for Ant */ = { 210 | isa = PBXGroup; 211 | children = ( 212 | 6003F59C195388D20070C39A /* ATAppDelegate.h */, 213 | 6003F59D195388D20070C39A /* ATAppDelegate.m */, 214 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, 215 | 6003F5A5195388D20070C39A /* ATViewController.h */, 216 | 6003F5A6195388D20070C39A /* ATViewController.m */, 217 | 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */, 218 | 6003F5A8195388D20070C39A /* Images.xcassets */, 219 | 6003F594195388D20070C39A /* Supporting Files */, 220 | ); 221 | name = "Example for Ant"; 222 | path = Ant; 223 | sourceTree = ""; 224 | }; 225 | 6003F594195388D20070C39A /* Supporting Files */ = { 226 | isa = PBXGroup; 227 | children = ( 228 | 6003F595195388D20070C39A /* Ant-Info.plist */, 229 | 6003F596195388D20070C39A /* InfoPlist.strings */, 230 | 6003F599195388D20070C39A /* main.m */, 231 | 6003F59B195388D20070C39A /* Ant-Prefix.pch */, 232 | ); 233 | name = "Supporting Files"; 234 | sourceTree = ""; 235 | }; 236 | 6003F5B5195388D20070C39A /* Tests */ = { 237 | isa = PBXGroup; 238 | children = ( 239 | 6003F5BB195388D20070C39A /* Tests.m */, 240 | 6003F5B6195388D20070C39A /* Supporting Files */, 241 | ); 242 | path = Tests; 243 | sourceTree = ""; 244 | }; 245 | 6003F5B6195388D20070C39A /* Supporting Files */ = { 246 | isa = PBXGroup; 247 | children = ( 248 | 6003F5B7195388D20070C39A /* Tests-Info.plist */, 249 | 6003F5B8195388D20070C39A /* InfoPlist.strings */, 250 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, 251 | ); 252 | name = "Supporting Files"; 253 | sourceTree = ""; 254 | }; 255 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { 256 | isa = PBXGroup; 257 | children = ( 258 | 1207B10BE60E607D8FFFC8C3 /* Ant.podspec */, 259 | 2E5D06BFE71659C8945FB7D5 /* README.md */, 260 | FAD2020316BE7F0983E4BB94 /* LICENSE */, 261 | ); 262 | name = "Podspec Metadata"; 263 | sourceTree = ""; 264 | }; 265 | 84A2F7A68998F960FDD2A6EE /* Pods */ = { 266 | isa = PBXGroup; 267 | children = ( 268 | AE9377A89FD2AAF59FF0FC4B /* Pods-Ant_Example.debug.xcconfig */, 269 | 85DDBAFF3B161A0AE8CA938A /* Pods-Ant_Example.release.xcconfig */, 270 | A2977195B08D6AFE26CEF048 /* Pods-Ant_Tests.debug.xcconfig */, 271 | 18BC3311AFD35B43E8A9B557 /* Pods-Ant_Tests.release.xcconfig */, 272 | 3B3DCCF8B46B794B13B8609C /* Pods-Module1.debug.xcconfig */, 273 | A00134DB3FF83EB76B25E40D /* Pods-Module1.release.xcconfig */, 274 | ); 275 | name = Pods; 276 | sourceTree = ""; 277 | }; 278 | C23FBF312213C2CF00A998D3 /* Module1 */ = { 279 | isa = PBXGroup; 280 | children = ( 281 | C23FBF322213C2CF00A998D3 /* Module1.h */, 282 | C23FBF332213C2CF00A998D3 /* Info.plist */, 283 | C23FBF3D2213C2F700A998D3 /* Module1App.h */, 284 | C23FBF3E2213C2F700A998D3 /* Module1App.m */, 285 | C23FBF572213FE6800A998D3 /* TestServiceImpl.h */, 286 | C23FBF582213FE6800A998D3 /* TestServiceImpl.m */, 287 | ); 288 | path = Module1; 289 | sourceTree = ""; 290 | }; 291 | C23FBF61221402B900A998D3 /* PublicServices */ = { 292 | isa = PBXGroup; 293 | children = ( 294 | C23FBF62221402B900A998D3 /* PublicServices.h */, 295 | C23FBF63221402B900A998D3 /* Info.plist */, 296 | ); 297 | path = PublicServices; 298 | sourceTree = ""; 299 | }; 300 | /* End PBXGroup section */ 301 | 302 | /* Begin PBXHeadersBuildPhase section */ 303 | C23FBF2D2213C2CF00A998D3 /* Headers */ = { 304 | isa = PBXHeadersBuildPhase; 305 | buildActionMask = 2147483647; 306 | files = ( 307 | C23FBF3F2213C2F700A998D3 /* Module1App.h in Headers */, 308 | C23FBF592213FE6800A998D3 /* TestServiceImpl.h in Headers */, 309 | C23FBF342213C2CF00A998D3 /* Module1.h in Headers */, 310 | ); 311 | runOnlyForDeploymentPostprocessing = 0; 312 | }; 313 | C23FBF5D221402B900A998D3 /* Headers */ = { 314 | isa = PBXHeadersBuildPhase; 315 | buildActionMask = 2147483647; 316 | files = ( 317 | C23FBF64221402B900A998D3 /* PublicServices.h in Headers */, 318 | ); 319 | runOnlyForDeploymentPostprocessing = 0; 320 | }; 321 | /* End PBXHeadersBuildPhase section */ 322 | 323 | /* Begin PBXNativeTarget section */ 324 | 6003F589195388D20070C39A /* Ant_Example */ = { 325 | isa = PBXNativeTarget; 326 | buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "Ant_Example" */; 327 | buildPhases = ( 328 | 542B919760214B3E21E08F4C /* [CP] Check Pods Manifest.lock */, 329 | 6003F586195388D20070C39A /* Sources */, 330 | 6003F587195388D20070C39A /* Frameworks */, 331 | 6003F588195388D20070C39A /* Resources */, 332 | D95587631359FE27C92BC01E /* [CP] Embed Pods Frameworks */, 333 | C23FBF3C2213C2CF00A998D3 /* Embed Frameworks */, 334 | ); 335 | buildRules = ( 336 | ); 337 | dependencies = ( 338 | C23FBF362213C2CF00A998D3 /* PBXTargetDependency */, 339 | C23FBF66221402B900A998D3 /* PBXTargetDependency */, 340 | ); 341 | name = Ant_Example; 342 | productName = Ant; 343 | productReference = 6003F58A195388D20070C39A /* Ant_Example.app */; 344 | productType = "com.apple.product-type.application"; 345 | }; 346 | 6003F5AD195388D20070C39A /* Ant_Tests */ = { 347 | isa = PBXNativeTarget; 348 | buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "Ant_Tests" */; 349 | buildPhases = ( 350 | 23068D00C6E2EE7DCB0764B3 /* [CP] Check Pods Manifest.lock */, 351 | 6003F5AA195388D20070C39A /* Sources */, 352 | 6003F5AB195388D20070C39A /* Frameworks */, 353 | 6003F5AC195388D20070C39A /* Resources */, 354 | ); 355 | buildRules = ( 356 | ); 357 | dependencies = ( 358 | 6003F5B4195388D20070C39A /* PBXTargetDependency */, 359 | ); 360 | name = Ant_Tests; 361 | productName = AntTests; 362 | productReference = 6003F5AE195388D20070C39A /* Ant_Tests.xctest */; 363 | productType = "com.apple.product-type.bundle.unit-test"; 364 | }; 365 | C23FBF2F2213C2CF00A998D3 /* Module1 */ = { 366 | isa = PBXNativeTarget; 367 | buildConfigurationList = C23FBF392213C2CF00A998D3 /* Build configuration list for PBXNativeTarget "Module1" */; 368 | buildPhases = ( 369 | FE86793B11B2174214050E64 /* [CP] Check Pods Manifest.lock */, 370 | C23FBF2B2213C2CF00A998D3 /* Sources */, 371 | C23FBF2C2213C2CF00A998D3 /* Frameworks */, 372 | C23FBF2D2213C2CF00A998D3 /* Headers */, 373 | C23FBF2E2213C2CF00A998D3 /* Resources */, 374 | ); 375 | buildRules = ( 376 | ); 377 | dependencies = ( 378 | ); 379 | name = Module1; 380 | productName = Module1; 381 | productReference = C23FBF302213C2CF00A998D3 /* Module1.framework */; 382 | productType = "com.apple.product-type.framework"; 383 | }; 384 | C23FBF5F221402B900A998D3 /* PublicServices */ = { 385 | isa = PBXNativeTarget; 386 | buildConfigurationList = C23FBF69221402B900A998D3 /* Build configuration list for PBXNativeTarget "PublicServices" */; 387 | buildPhases = ( 388 | C23FBF5B221402B900A998D3 /* Sources */, 389 | C23FBF5C221402B900A998D3 /* Frameworks */, 390 | C23FBF5D221402B900A998D3 /* Headers */, 391 | C23FBF5E221402B900A998D3 /* Resources */, 392 | ); 393 | buildRules = ( 394 | ); 395 | dependencies = ( 396 | ); 397 | name = PublicServices; 398 | productName = PublicServices; 399 | productReference = C23FBF60221402B900A998D3 /* PublicServices.framework */; 400 | productType = "com.apple.product-type.framework"; 401 | }; 402 | /* End PBXNativeTarget section */ 403 | 404 | /* Begin PBXProject section */ 405 | 6003F582195388D10070C39A /* Project object */ = { 406 | isa = PBXProject; 407 | attributes = { 408 | CLASSPREFIX = AT; 409 | LastUpgradeCheck = 0720; 410 | ORGANIZATIONNAME = huluobo; 411 | TargetAttributes = { 412 | 6003F589195388D20070C39A = { 413 | DevelopmentTeam = UA8U3Z7XU4; 414 | }; 415 | 6003F5AD195388D20070C39A = { 416 | TestTargetID = 6003F589195388D20070C39A; 417 | }; 418 | C23FBF2F2213C2CF00A998D3 = { 419 | CreatedOnToolsVersion = 9.4; 420 | DevelopmentTeam = UA8U3Z7XU4; 421 | ProvisioningStyle = Automatic; 422 | }; 423 | C23FBF5F221402B900A998D3 = { 424 | CreatedOnToolsVersion = 9.4; 425 | DevelopmentTeam = UA8U3Z7XU4; 426 | ProvisioningStyle = Automatic; 427 | }; 428 | }; 429 | }; 430 | buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "Ant" */; 431 | compatibilityVersion = "Xcode 3.2"; 432 | developmentRegion = English; 433 | hasScannedForEncodings = 0; 434 | knownRegions = ( 435 | en, 436 | Base, 437 | ); 438 | mainGroup = 6003F581195388D10070C39A; 439 | productRefGroup = 6003F58B195388D20070C39A /* Products */; 440 | projectDirPath = ""; 441 | projectRoot = ""; 442 | targets = ( 443 | 6003F589195388D20070C39A /* Ant_Example */, 444 | 6003F5AD195388D20070C39A /* Ant_Tests */, 445 | C23FBF2F2213C2CF00A998D3 /* Module1 */, 446 | C23FBF5F221402B900A998D3 /* PublicServices */, 447 | ); 448 | }; 449 | /* End PBXProject section */ 450 | 451 | /* Begin PBXResourcesBuildPhase section */ 452 | 6003F588195388D20070C39A /* Resources */ = { 453 | isa = PBXResourcesBuildPhase; 454 | buildActionMask = 2147483647; 455 | files = ( 456 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */, 457 | 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */, 458 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */, 459 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, 460 | ); 461 | runOnlyForDeploymentPostprocessing = 0; 462 | }; 463 | 6003F5AC195388D20070C39A /* Resources */ = { 464 | isa = PBXResourcesBuildPhase; 465 | buildActionMask = 2147483647; 466 | files = ( 467 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, 468 | ); 469 | runOnlyForDeploymentPostprocessing = 0; 470 | }; 471 | C23FBF2E2213C2CF00A998D3 /* Resources */ = { 472 | isa = PBXResourcesBuildPhase; 473 | buildActionMask = 2147483647; 474 | files = ( 475 | ); 476 | runOnlyForDeploymentPostprocessing = 0; 477 | }; 478 | C23FBF5E221402B900A998D3 /* Resources */ = { 479 | isa = PBXResourcesBuildPhase; 480 | buildActionMask = 2147483647; 481 | files = ( 482 | ); 483 | runOnlyForDeploymentPostprocessing = 0; 484 | }; 485 | /* End PBXResourcesBuildPhase section */ 486 | 487 | /* Begin PBXShellScriptBuildPhase section */ 488 | 23068D00C6E2EE7DCB0764B3 /* [CP] Check Pods Manifest.lock */ = { 489 | isa = PBXShellScriptBuildPhase; 490 | buildActionMask = 2147483647; 491 | files = ( 492 | ); 493 | inputPaths = ( 494 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 495 | "${PODS_ROOT}/Manifest.lock", 496 | ); 497 | name = "[CP] Check Pods Manifest.lock"; 498 | outputPaths = ( 499 | "$(DERIVED_FILE_DIR)/Pods-Ant_Tests-checkManifestLockResult.txt", 500 | ); 501 | runOnlyForDeploymentPostprocessing = 0; 502 | shellPath = /bin/sh; 503 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 504 | showEnvVarsInLog = 0; 505 | }; 506 | 542B919760214B3E21E08F4C /* [CP] Check Pods Manifest.lock */ = { 507 | isa = PBXShellScriptBuildPhase; 508 | buildActionMask = 2147483647; 509 | files = ( 510 | ); 511 | inputPaths = ( 512 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 513 | "${PODS_ROOT}/Manifest.lock", 514 | ); 515 | name = "[CP] Check Pods Manifest.lock"; 516 | outputPaths = ( 517 | "$(DERIVED_FILE_DIR)/Pods-Ant_Example-checkManifestLockResult.txt", 518 | ); 519 | runOnlyForDeploymentPostprocessing = 0; 520 | shellPath = /bin/sh; 521 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 522 | showEnvVarsInLog = 0; 523 | }; 524 | D95587631359FE27C92BC01E /* [CP] Embed Pods Frameworks */ = { 525 | isa = PBXShellScriptBuildPhase; 526 | buildActionMask = 2147483647; 527 | files = ( 528 | ); 529 | inputPaths = ( 530 | "${SRCROOT}/Pods/Target Support Files/Pods-Ant_Example/Pods-Ant_Example-frameworks.sh", 531 | "${BUILT_PRODUCTS_DIR}/Ant/Ant.framework", 532 | ); 533 | name = "[CP] Embed Pods Frameworks"; 534 | outputPaths = ( 535 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Ant.framework", 536 | ); 537 | runOnlyForDeploymentPostprocessing = 0; 538 | shellPath = /bin/sh; 539 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Ant_Example/Pods-Ant_Example-frameworks.sh\"\n"; 540 | showEnvVarsInLog = 0; 541 | }; 542 | FE86793B11B2174214050E64 /* [CP] Check Pods Manifest.lock */ = { 543 | isa = PBXShellScriptBuildPhase; 544 | buildActionMask = 2147483647; 545 | files = ( 546 | ); 547 | inputPaths = ( 548 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 549 | "${PODS_ROOT}/Manifest.lock", 550 | ); 551 | name = "[CP] Check Pods Manifest.lock"; 552 | outputPaths = ( 553 | "$(DERIVED_FILE_DIR)/Pods-Module1-checkManifestLockResult.txt", 554 | ); 555 | runOnlyForDeploymentPostprocessing = 0; 556 | shellPath = /bin/sh; 557 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 558 | showEnvVarsInLog = 0; 559 | }; 560 | /* End PBXShellScriptBuildPhase section */ 561 | 562 | /* Begin PBXSourcesBuildPhase section */ 563 | 6003F586195388D20070C39A /* Sources */ = { 564 | isa = PBXSourcesBuildPhase; 565 | buildActionMask = 2147483647; 566 | files = ( 567 | 6003F59E195388D20070C39A /* ATAppDelegate.m in Sources */, 568 | 6003F5A7195388D20070C39A /* ATViewController.m in Sources */, 569 | 6003F59A195388D20070C39A /* main.m in Sources */, 570 | ); 571 | runOnlyForDeploymentPostprocessing = 0; 572 | }; 573 | 6003F5AA195388D20070C39A /* Sources */ = { 574 | isa = PBXSourcesBuildPhase; 575 | buildActionMask = 2147483647; 576 | files = ( 577 | 6003F5BC195388D20070C39A /* Tests.m in Sources */, 578 | ); 579 | runOnlyForDeploymentPostprocessing = 0; 580 | }; 581 | C23FBF2B2213C2CF00A998D3 /* Sources */ = { 582 | isa = PBXSourcesBuildPhase; 583 | buildActionMask = 2147483647; 584 | files = ( 585 | C23FBF402213C2F700A998D3 /* Module1App.m in Sources */, 586 | C23FBF5A2213FE6800A998D3 /* TestServiceImpl.m in Sources */, 587 | ); 588 | runOnlyForDeploymentPostprocessing = 0; 589 | }; 590 | C23FBF5B221402B900A998D3 /* Sources */ = { 591 | isa = PBXSourcesBuildPhase; 592 | buildActionMask = 2147483647; 593 | files = ( 594 | ); 595 | runOnlyForDeploymentPostprocessing = 0; 596 | }; 597 | /* End PBXSourcesBuildPhase section */ 598 | 599 | /* Begin PBXTargetDependency section */ 600 | 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { 601 | isa = PBXTargetDependency; 602 | target = 6003F589195388D20070C39A /* Ant_Example */; 603 | targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; 604 | }; 605 | C23FBF362213C2CF00A998D3 /* PBXTargetDependency */ = { 606 | isa = PBXTargetDependency; 607 | target = C23FBF2F2213C2CF00A998D3 /* Module1 */; 608 | targetProxy = C23FBF352213C2CF00A998D3 /* PBXContainerItemProxy */; 609 | }; 610 | C23FBF66221402B900A998D3 /* PBXTargetDependency */ = { 611 | isa = PBXTargetDependency; 612 | target = C23FBF5F221402B900A998D3 /* PublicServices */; 613 | targetProxy = C23FBF65221402B900A998D3 /* PBXContainerItemProxy */; 614 | }; 615 | /* End PBXTargetDependency section */ 616 | 617 | /* Begin PBXVariantGroup section */ 618 | 6003F596195388D20070C39A /* InfoPlist.strings */ = { 619 | isa = PBXVariantGroup; 620 | children = ( 621 | 6003F597195388D20070C39A /* en */, 622 | ); 623 | name = InfoPlist.strings; 624 | sourceTree = ""; 625 | }; 626 | 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { 627 | isa = PBXVariantGroup; 628 | children = ( 629 | 6003F5B9195388D20070C39A /* en */, 630 | ); 631 | name = InfoPlist.strings; 632 | sourceTree = ""; 633 | }; 634 | 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */ = { 635 | isa = PBXVariantGroup; 636 | children = ( 637 | 71719F9E1E33DC2100824A3D /* Base */, 638 | ); 639 | name = LaunchScreen.storyboard; 640 | sourceTree = ""; 641 | }; 642 | /* End PBXVariantGroup section */ 643 | 644 | /* Begin XCBuildConfiguration section */ 645 | 6003F5BD195388D20070C39A /* Debug */ = { 646 | isa = XCBuildConfiguration; 647 | buildSettings = { 648 | ALWAYS_SEARCH_USER_PATHS = NO; 649 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 650 | CLANG_CXX_LIBRARY = "libc++"; 651 | CLANG_ENABLE_MODULES = YES; 652 | CLANG_ENABLE_OBJC_ARC = YES; 653 | CLANG_WARN_BOOL_CONVERSION = YES; 654 | CLANG_WARN_CONSTANT_CONVERSION = YES; 655 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 656 | CLANG_WARN_EMPTY_BODY = YES; 657 | CLANG_WARN_ENUM_CONVERSION = YES; 658 | CLANG_WARN_INT_CONVERSION = YES; 659 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 660 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 661 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 662 | COPY_PHASE_STRIP = NO; 663 | ENABLE_TESTABILITY = YES; 664 | GCC_C_LANGUAGE_STANDARD = gnu99; 665 | GCC_DYNAMIC_NO_PIC = NO; 666 | GCC_OPTIMIZATION_LEVEL = 0; 667 | GCC_PREPROCESSOR_DEFINITIONS = ( 668 | "DEBUG=1", 669 | "$(inherited)", 670 | ); 671 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 672 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 673 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 674 | GCC_WARN_UNDECLARED_SELECTOR = YES; 675 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 676 | GCC_WARN_UNUSED_FUNCTION = YES; 677 | GCC_WARN_UNUSED_VARIABLE = YES; 678 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 679 | ONLY_ACTIVE_ARCH = YES; 680 | SDKROOT = iphoneos; 681 | TARGETED_DEVICE_FAMILY = "1,2"; 682 | }; 683 | name = Debug; 684 | }; 685 | 6003F5BE195388D20070C39A /* Release */ = { 686 | isa = XCBuildConfiguration; 687 | buildSettings = { 688 | ALWAYS_SEARCH_USER_PATHS = NO; 689 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 690 | CLANG_CXX_LIBRARY = "libc++"; 691 | CLANG_ENABLE_MODULES = YES; 692 | CLANG_ENABLE_OBJC_ARC = YES; 693 | CLANG_WARN_BOOL_CONVERSION = YES; 694 | CLANG_WARN_CONSTANT_CONVERSION = YES; 695 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 696 | CLANG_WARN_EMPTY_BODY = YES; 697 | CLANG_WARN_ENUM_CONVERSION = YES; 698 | CLANG_WARN_INT_CONVERSION = YES; 699 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 700 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 701 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 702 | COPY_PHASE_STRIP = YES; 703 | ENABLE_NS_ASSERTIONS = NO; 704 | GCC_C_LANGUAGE_STANDARD = gnu99; 705 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 706 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 707 | GCC_WARN_UNDECLARED_SELECTOR = YES; 708 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 709 | GCC_WARN_UNUSED_FUNCTION = YES; 710 | GCC_WARN_UNUSED_VARIABLE = YES; 711 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 712 | SDKROOT = iphoneos; 713 | TARGETED_DEVICE_FAMILY = "1,2"; 714 | VALIDATE_PRODUCT = YES; 715 | }; 716 | name = Release; 717 | }; 718 | 6003F5C0195388D20070C39A /* Debug */ = { 719 | isa = XCBuildConfiguration; 720 | baseConfigurationReference = AE9377A89FD2AAF59FF0FC4B /* Pods-Ant_Example.debug.xcconfig */; 721 | buildSettings = { 722 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 723 | CODE_SIGN_IDENTITY = "iPhone Developer"; 724 | DEVELOPMENT_TEAM = UA8U3Z7XU4; 725 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 726 | GCC_PREFIX_HEADER = "Ant/Ant-Prefix.pch"; 727 | INFOPLIST_FILE = "Ant/Ant-Info.plist"; 728 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 729 | MODULE_NAME = ExampleApp; 730 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 731 | PRODUCT_NAME = "$(TARGET_NAME)"; 732 | WRAPPER_EXTENSION = app; 733 | }; 734 | name = Debug; 735 | }; 736 | 6003F5C1195388D20070C39A /* Release */ = { 737 | isa = XCBuildConfiguration; 738 | baseConfigurationReference = 85DDBAFF3B161A0AE8CA938A /* Pods-Ant_Example.release.xcconfig */; 739 | buildSettings = { 740 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 741 | CODE_SIGN_IDENTITY = "iPhone Developer"; 742 | DEVELOPMENT_TEAM = UA8U3Z7XU4; 743 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 744 | GCC_PREFIX_HEADER = "Ant/Ant-Prefix.pch"; 745 | INFOPLIST_FILE = "Ant/Ant-Info.plist"; 746 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 747 | MODULE_NAME = ExampleApp; 748 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 749 | PRODUCT_NAME = "$(TARGET_NAME)"; 750 | WRAPPER_EXTENSION = app; 751 | }; 752 | name = Release; 753 | }; 754 | 6003F5C3195388D20070C39A /* Debug */ = { 755 | isa = XCBuildConfiguration; 756 | baseConfigurationReference = A2977195B08D6AFE26CEF048 /* Pods-Ant_Tests.debug.xcconfig */; 757 | buildSettings = { 758 | BUNDLE_LOADER = "$(TEST_HOST)"; 759 | FRAMEWORK_SEARCH_PATHS = ( 760 | "$(SDKROOT)/Developer/Library/Frameworks", 761 | "$(inherited)", 762 | "$(DEVELOPER_FRAMEWORKS_DIR)", 763 | ); 764 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 765 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 766 | GCC_PREPROCESSOR_DEFINITIONS = ( 767 | "DEBUG=1", 768 | "$(inherited)", 769 | ); 770 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 771 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 772 | PRODUCT_NAME = "$(TARGET_NAME)"; 773 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Ant_Example.app/Ant_Example"; 774 | WRAPPER_EXTENSION = xctest; 775 | }; 776 | name = Debug; 777 | }; 778 | 6003F5C4195388D20070C39A /* Release */ = { 779 | isa = XCBuildConfiguration; 780 | baseConfigurationReference = 18BC3311AFD35B43E8A9B557 /* Pods-Ant_Tests.release.xcconfig */; 781 | buildSettings = { 782 | BUNDLE_LOADER = "$(TEST_HOST)"; 783 | FRAMEWORK_SEARCH_PATHS = ( 784 | "$(SDKROOT)/Developer/Library/Frameworks", 785 | "$(inherited)", 786 | "$(DEVELOPER_FRAMEWORKS_DIR)", 787 | ); 788 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 789 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 790 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 791 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 792 | PRODUCT_NAME = "$(TARGET_NAME)"; 793 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Ant_Example.app/Ant_Example"; 794 | WRAPPER_EXTENSION = xctest; 795 | }; 796 | name = Release; 797 | }; 798 | C23FBF3A2213C2CF00A998D3 /* Debug */ = { 799 | isa = XCBuildConfiguration; 800 | baseConfigurationReference = 3B3DCCF8B46B794B13B8609C /* Pods-Module1.debug.xcconfig */; 801 | buildSettings = { 802 | CLANG_ANALYZER_NONNULL = YES; 803 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 804 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 805 | CLANG_ENABLE_OBJC_WEAK = YES; 806 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 807 | CLANG_WARN_COMMA = YES; 808 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 809 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 810 | CLANG_WARN_INFINITE_RECURSION = YES; 811 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 812 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 813 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 814 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 815 | CLANG_WARN_STRICT_PROTOTYPES = YES; 816 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 817 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 818 | CLANG_WARN_UNREACHABLE_CODE = YES; 819 | CODE_SIGN_IDENTITY = "iPhone Developer"; 820 | CODE_SIGN_STYLE = Automatic; 821 | CURRENT_PROJECT_VERSION = 1; 822 | DEBUG_INFORMATION_FORMAT = dwarf; 823 | DEFINES_MODULE = YES; 824 | DEVELOPMENT_TEAM = UA8U3Z7XU4; 825 | DYLIB_COMPATIBILITY_VERSION = 1; 826 | DYLIB_CURRENT_VERSION = 1; 827 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 828 | ENABLE_STRICT_OBJC_MSGSEND = YES; 829 | GCC_C_LANGUAGE_STANDARD = gnu11; 830 | GCC_NO_COMMON_BLOCKS = YES; 831 | INFOPLIST_FILE = Module1/Info.plist; 832 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 833 | IPHONEOS_DEPLOYMENT_TARGET = 11.4; 834 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 835 | MTL_ENABLE_DEBUG_INFO = YES; 836 | PRODUCT_BUNDLE_IDENTIFIER = me.jewelz.Module1; 837 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 838 | SKIP_INSTALL = YES; 839 | TARGETED_DEVICE_FAMILY = "1,2"; 840 | VERSIONING_SYSTEM = "apple-generic"; 841 | VERSION_INFO_PREFIX = ""; 842 | }; 843 | name = Debug; 844 | }; 845 | C23FBF3B2213C2CF00A998D3 /* Release */ = { 846 | isa = XCBuildConfiguration; 847 | baseConfigurationReference = A00134DB3FF83EB76B25E40D /* Pods-Module1.release.xcconfig */; 848 | buildSettings = { 849 | CLANG_ANALYZER_NONNULL = YES; 850 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 851 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 852 | CLANG_ENABLE_OBJC_WEAK = YES; 853 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 854 | CLANG_WARN_COMMA = YES; 855 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 856 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 857 | CLANG_WARN_INFINITE_RECURSION = YES; 858 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 859 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 860 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 861 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 862 | CLANG_WARN_STRICT_PROTOTYPES = YES; 863 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 864 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 865 | CLANG_WARN_UNREACHABLE_CODE = YES; 866 | CODE_SIGN_IDENTITY = "iPhone Developer"; 867 | CODE_SIGN_STYLE = Automatic; 868 | COPY_PHASE_STRIP = NO; 869 | CURRENT_PROJECT_VERSION = 1; 870 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 871 | DEFINES_MODULE = YES; 872 | DEVELOPMENT_TEAM = UA8U3Z7XU4; 873 | DYLIB_COMPATIBILITY_VERSION = 1; 874 | DYLIB_CURRENT_VERSION = 1; 875 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 876 | ENABLE_STRICT_OBJC_MSGSEND = YES; 877 | GCC_C_LANGUAGE_STANDARD = gnu11; 878 | GCC_NO_COMMON_BLOCKS = YES; 879 | INFOPLIST_FILE = Module1/Info.plist; 880 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 881 | IPHONEOS_DEPLOYMENT_TARGET = 11.4; 882 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 883 | MTL_ENABLE_DEBUG_INFO = NO; 884 | PRODUCT_BUNDLE_IDENTIFIER = me.jewelz.Module1; 885 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 886 | SKIP_INSTALL = YES; 887 | TARGETED_DEVICE_FAMILY = "1,2"; 888 | VERSIONING_SYSTEM = "apple-generic"; 889 | VERSION_INFO_PREFIX = ""; 890 | }; 891 | name = Release; 892 | }; 893 | C23FBF6A221402B900A998D3 /* Debug */ = { 894 | isa = XCBuildConfiguration; 895 | buildSettings = { 896 | CLANG_ANALYZER_NONNULL = YES; 897 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 898 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 899 | CLANG_ENABLE_OBJC_WEAK = YES; 900 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 901 | CLANG_WARN_COMMA = YES; 902 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 903 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 904 | CLANG_WARN_INFINITE_RECURSION = YES; 905 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 906 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 907 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 908 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 909 | CLANG_WARN_STRICT_PROTOTYPES = YES; 910 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 911 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 912 | CLANG_WARN_UNREACHABLE_CODE = YES; 913 | CODE_SIGN_IDENTITY = "iPhone Developer"; 914 | CODE_SIGN_STYLE = Automatic; 915 | CURRENT_PROJECT_VERSION = 1; 916 | DEBUG_INFORMATION_FORMAT = dwarf; 917 | DEFINES_MODULE = YES; 918 | DEVELOPMENT_TEAM = UA8U3Z7XU4; 919 | DYLIB_COMPATIBILITY_VERSION = 1; 920 | DYLIB_CURRENT_VERSION = 1; 921 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 922 | ENABLE_STRICT_OBJC_MSGSEND = YES; 923 | GCC_C_LANGUAGE_STANDARD = gnu11; 924 | GCC_NO_COMMON_BLOCKS = YES; 925 | INFOPLIST_FILE = PublicServices/Info.plist; 926 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 927 | IPHONEOS_DEPLOYMENT_TARGET = 11.4; 928 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 929 | MTL_ENABLE_DEBUG_INFO = YES; 930 | PRODUCT_BUNDLE_IDENTIFIER = me.jewelz.PublicServices; 931 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 932 | SKIP_INSTALL = YES; 933 | TARGETED_DEVICE_FAMILY = "1,2"; 934 | VERSIONING_SYSTEM = "apple-generic"; 935 | VERSION_INFO_PREFIX = ""; 936 | }; 937 | name = Debug; 938 | }; 939 | C23FBF6B221402B900A998D3 /* Release */ = { 940 | isa = XCBuildConfiguration; 941 | buildSettings = { 942 | CLANG_ANALYZER_NONNULL = YES; 943 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 944 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 945 | CLANG_ENABLE_OBJC_WEAK = YES; 946 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 947 | CLANG_WARN_COMMA = YES; 948 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 949 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 950 | CLANG_WARN_INFINITE_RECURSION = YES; 951 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 952 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 953 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 954 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 955 | CLANG_WARN_STRICT_PROTOTYPES = YES; 956 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 957 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 958 | CLANG_WARN_UNREACHABLE_CODE = YES; 959 | CODE_SIGN_IDENTITY = "iPhone Developer"; 960 | CODE_SIGN_STYLE = Automatic; 961 | COPY_PHASE_STRIP = NO; 962 | CURRENT_PROJECT_VERSION = 1; 963 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 964 | DEFINES_MODULE = YES; 965 | DEVELOPMENT_TEAM = UA8U3Z7XU4; 966 | DYLIB_COMPATIBILITY_VERSION = 1; 967 | DYLIB_CURRENT_VERSION = 1; 968 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 969 | ENABLE_STRICT_OBJC_MSGSEND = YES; 970 | GCC_C_LANGUAGE_STANDARD = gnu11; 971 | GCC_NO_COMMON_BLOCKS = YES; 972 | INFOPLIST_FILE = PublicServices/Info.plist; 973 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 974 | IPHONEOS_DEPLOYMENT_TARGET = 11.4; 975 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 976 | MTL_ENABLE_DEBUG_INFO = NO; 977 | PRODUCT_BUNDLE_IDENTIFIER = me.jewelz.PublicServices; 978 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 979 | SKIP_INSTALL = YES; 980 | TARGETED_DEVICE_FAMILY = "1,2"; 981 | VERSIONING_SYSTEM = "apple-generic"; 982 | VERSION_INFO_PREFIX = ""; 983 | }; 984 | name = Release; 985 | }; 986 | /* End XCBuildConfiguration section */ 987 | 988 | /* Begin XCConfigurationList section */ 989 | 6003F585195388D10070C39A /* Build configuration list for PBXProject "Ant" */ = { 990 | isa = XCConfigurationList; 991 | buildConfigurations = ( 992 | 6003F5BD195388D20070C39A /* Debug */, 993 | 6003F5BE195388D20070C39A /* Release */, 994 | ); 995 | defaultConfigurationIsVisible = 0; 996 | defaultConfigurationName = Release; 997 | }; 998 | 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "Ant_Example" */ = { 999 | isa = XCConfigurationList; 1000 | buildConfigurations = ( 1001 | 6003F5C0195388D20070C39A /* Debug */, 1002 | 6003F5C1195388D20070C39A /* Release */, 1003 | ); 1004 | defaultConfigurationIsVisible = 0; 1005 | defaultConfigurationName = Release; 1006 | }; 1007 | 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "Ant_Tests" */ = { 1008 | isa = XCConfigurationList; 1009 | buildConfigurations = ( 1010 | 6003F5C3195388D20070C39A /* Debug */, 1011 | 6003F5C4195388D20070C39A /* Release */, 1012 | ); 1013 | defaultConfigurationIsVisible = 0; 1014 | defaultConfigurationName = Release; 1015 | }; 1016 | C23FBF392213C2CF00A998D3 /* Build configuration list for PBXNativeTarget "Module1" */ = { 1017 | isa = XCConfigurationList; 1018 | buildConfigurations = ( 1019 | C23FBF3A2213C2CF00A998D3 /* Debug */, 1020 | C23FBF3B2213C2CF00A998D3 /* Release */, 1021 | ); 1022 | defaultConfigurationIsVisible = 0; 1023 | defaultConfigurationName = Release; 1024 | }; 1025 | C23FBF69221402B900A998D3 /* Build configuration list for PBXNativeTarget "PublicServices" */ = { 1026 | isa = XCConfigurationList; 1027 | buildConfigurations = ( 1028 | C23FBF6A221402B900A998D3 /* Debug */, 1029 | C23FBF6B221402B900A998D3 /* Release */, 1030 | ); 1031 | defaultConfigurationIsVisible = 0; 1032 | defaultConfigurationName = Release; 1033 | }; 1034 | /* End XCConfigurationList section */ 1035 | }; 1036 | rootObject = 6003F582195388D10070C39A /* Project object */; 1037 | } 1038 | -------------------------------------------------------------------------------- /Example/Ant.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Ant.xcodeproj/xcshareddata/xcschemes/Ant-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Example/Ant.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/Ant.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Ant/ATAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ATAppDelegate.h 3 | // Ant 4 | // 5 | // Created by huluobo on 02/13/2019. 6 | // Copyright (c) 2019 huluobo. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface ATAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/Ant/ATAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // ATAppDelegate.m 3 | // Ant 4 | // 5 | // Created by huluobo on 02/13/2019. 6 | // Copyright (c) 2019 huluobo. All rights reserved. 7 | // 8 | 9 | #import "ATAppDelegate.h" 10 | #import 11 | 12 | @implementation ATAppDelegate 13 | 14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 15 | { 16 | [[Ant shareInstance] application:application didFinishLaunchingWithOptions:launchOptions]; 17 | return YES; 18 | } 19 | 20 | - (void)applicationWillResignActive:(UIApplication *)application 21 | { 22 | [[Ant shareInstance] applicationWillResignActive:application]; 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | [[Ant shareInstance] applicationDidEnterBackground:application]; 28 | } 29 | 30 | - (void)applicationWillEnterForeground:(UIApplication *)application 31 | { 32 | [[Ant shareInstance] applicationWillEnterForeground:application]; 33 | } 34 | 35 | - (void)applicationDidBecomeActive:(UIApplication *)application 36 | { 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 | - (void)applicationWillTerminate:(UIApplication *)application 41 | { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Example/Ant/ATViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ATViewController.h 3 | // Ant 4 | // 5 | // Created by huluobo on 02/13/2019. 6 | // Copyright (c) 2019 huluobo. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface ATViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/Ant/ATViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ATViewController.m 3 | // Ant 4 | // 5 | // Created by huluobo on 02/13/2019. 6 | // Copyright (c) 2019 huluobo. All rights reserved. 7 | // 8 | 9 | #import "ATViewController.h" 10 | #import 11 | #import "PublicServices.h" 12 | 13 | @interface ATViewController () { 14 | dispatch_queue_t _ioQueue; 15 | } 16 | 17 | @end 18 | 19 | @implementation ATViewController 20 | 21 | 22 | 23 | - (void)viewDidLoad 24 | { 25 | [super viewDidLoad]; 26 | 27 | // Do any additional setup after loading the view, typically from a nib. 28 | } 29 | 30 | - (void)didReceiveMemoryWarning 31 | { 32 | [super didReceiveMemoryWarning]; 33 | // Dispose of any resources that can be recreated. 34 | } 35 | 36 | - (IBAction)buttonClicked:(id)sender { 37 | id obj = [Ant serviceImplFromProtocol:@protocol(TestService)]; 38 | [obj service1]; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Example/Ant/Ant-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | Modules 49 | 50 | ModuleA 51 | ModuleB 52 | ModuleC 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /Example/Ant/Ant-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | @import UIKit; 15 | @import Foundation; 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/Ant/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Example/Ant/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/Ant/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Example/Ant/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/Ant/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Ant 4 | // 5 | // Created by huluobo on 02/13/2019. 6 | // Copyright (c) 2019 huluobo. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | #import "ATAppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) 13 | { 14 | @autoreleasepool { 15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([ATAppDelegate class])); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Example/Module1/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Module1/Module1.h: -------------------------------------------------------------------------------- 1 | // 2 | // Module1.h 3 | // Module1 4 | // 5 | // Created by huluobo on 2019/2/13. 6 | // Copyright © 2019 huluobo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Module1. 12 | FOUNDATION_EXPORT double Module1VersionNumber; 13 | 14 | //! Project version string for Module1. 15 | FOUNDATION_EXPORT const unsigned char Module1VersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Example/Module1/Module1App.h: -------------------------------------------------------------------------------- 1 | // 2 | // Module1App.h 3 | // Module1 4 | // 5 | // Created by huluobo on 2019/2/13. 6 | // Copyright © 2019 huluobo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface Module1App : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/Module1/Module1App.m: -------------------------------------------------------------------------------- 1 | // 2 | // Module1App.m 3 | // Module1 4 | // 5 | // Created by huluobo on 2019/2/13. 6 | // Copyright © 2019 huluobo. All rights reserved. 7 | // 8 | 9 | #import "Module1App.h" 10 | #import 11 | 12 | ANT_MODULE_EXPORT(Module1App) 13 | 14 | @interface Module1App() { 15 | NSInteger state; 16 | } 17 | 18 | @end 19 | 20 | @implementation Module1App 21 | 22 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 23 | state = 0; 24 | NSLog(@"Module A state: %zd", state); 25 | return YES; 26 | } 27 | 28 | - (void)applicationWillEnterForeground:(UIApplication *)application { 29 | state += 1; 30 | NSLog(@"Module A state: %zd", state); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Example/Module1/TestServiceImpl.h: -------------------------------------------------------------------------------- 1 | // 2 | // TestServiceImpl.h 3 | // Module1 4 | // 5 | // Created by huluobo on 2019/2/13. 6 | // Copyright © 2019 huluobo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TestServiceImpl : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/Module1/TestServiceImpl.m: -------------------------------------------------------------------------------- 1 | // 2 | // SomeProtocolImpl.m 3 | // Module1 4 | // 5 | // Created by huluobo on 2019/2/13. 6 | // Copyright © 2019 huluobo. All rights reserved. 7 | // 8 | 9 | #import "TestServiceImpl.h" 10 | #import 11 | #import 12 | 13 | ANT_REGISTER_SERVICE(TestServiceImpl, TestService) 14 | ANT_REGISTER_SERVICE(TestServiceImpl2, TestService2) 15 | ANT_REGISTER_SERVICE(TestServiceImpl3, TestService3) 16 | @interface TestServiceImpl() @end 17 | 18 | @implementation TestServiceImpl 19 | 20 | - (void)service1 { 21 | NSLog(@"Service test from Impl"); 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | platform :ios, '8.0' 4 | 5 | target 'Ant_Example' do 6 | pod 'Ant', :path => '../' 7 | 8 | target 'Module1' do 9 | inherit! :search_paths 10 | end 11 | 12 | target 'Ant_Tests' do 13 | inherit! :search_paths 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Ant (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - Ant (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | Ant: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | Ant: a4a648cbd8ef408ba9956b4004f4d63dbdaf47ac 13 | 14 | PODFILE CHECKSUM: b968357f4c0a1675ca9021459415af8f663430d7 15 | 16 | COCOAPODS: 1.5.3 17 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/Ant.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Ant", 3 | "version": "0.1.0", 4 | "summary": "A short description of Ant.", 5 | "description": "TODO: Add long description of the pod here.", 6 | "homepage": "https://github.com/hujewelz/Ant", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "huluobo": "hujewelz@163.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/hujewelz/Ant.git", 16 | "tag": "0.1.0" 17 | }, 18 | "platforms": { 19 | "ios": "8.0" 20 | }, 21 | "source_files": "Ant/Classes/**/*", 22 | "public_header_files": "Ant/Classes/Public/**/*.h" 23 | } 24 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Ant (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - Ant (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | Ant: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | Ant: a4a648cbd8ef408ba9956b4004f4d63dbdaf47ac 13 | 14 | PODFILE CHECKSUM: b968357f4c0a1675ca9021459415af8f663430d7 15 | 16 | COCOAPODS: 1.5.3 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Ant/Ant-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Ant : NSObject 3 | @end 4 | @implementation PodsDummy_Ant 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Ant/Ant-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Ant/Ant-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "Ant.h" 14 | #import "ATContext.h" 15 | #import "ATExport.h" 16 | #import "ATModuleProtocol.h" 17 | #import "ATServiceProtocol.h" 18 | 19 | FOUNDATION_EXPORT double AntVersionNumber; 20 | FOUNDATION_EXPORT const unsigned char AntVersionString[]; 21 | 22 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Ant/Ant.modulemap: -------------------------------------------------------------------------------- 1 | framework module Ant { 2 | umbrella header "Ant-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Ant/Ant.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Ant 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | PODS_BUILD_DIR = ${BUILD_DIR} 4 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_ROOT = ${SRCROOT} 6 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 7 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 8 | SKIP_INSTALL = YES 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Ant/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Example/Pods-Ant_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## Ant 5 | 6 | Copyright (c) 2019 huluobo 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Example/Pods-Ant_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2019 huluobo <hujewelz@163.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | Ant 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - https://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Example/Pods-Ant_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Ant_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Ant_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Example/Pods-Ant_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | 145 | if [[ "$CONFIGURATION" == "Debug" ]]; then 146 | install_framework "${BUILT_PRODUCTS_DIR}/Ant/Ant.framework" 147 | fi 148 | if [[ "$CONFIGURATION" == "Release" ]]; then 149 | install_framework "${BUILT_PRODUCTS_DIR}/Ant/Ant.framework" 150 | fi 151 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 152 | wait 153 | fi 154 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Example/Pods-Ant_Example-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Example/Pods-Ant_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_Ant_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_Ant_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Example/Pods-Ant_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Ant" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Ant/Ant.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "Ant" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Example/Pods-Ant_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Ant_Example { 2 | umbrella header "Pods-Ant_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Example/Pods-Ant_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Ant" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Ant/Ant.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "Ant" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Tests/Pods-Ant_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Tests/Pods-Ant_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Tests/Pods-Ant_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Ant_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Ant_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Tests/Pods-Ant_Tests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 145 | wait 146 | fi 147 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Tests/Pods-Ant_Tests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Tests/Pods-Ant_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_Ant_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_Ant_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Tests/Pods-Ant_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Ant" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Ant/Ant.framework/Headers" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Tests/Pods-Ant_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Ant_Tests { 2 | umbrella header "Pods-Ant_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Ant_Tests/Pods-Ant_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Ant" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Ant/Ant.framework/Headers" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Module1/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Module1/Pods-Module1-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Module1/Pods-Module1-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Module1/Pods-Module1-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Module1 : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Module1 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Module1/Pods-Module1-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Module1/Pods-Module1-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_Module1VersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_Module1VersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Module1/Pods-Module1.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Ant" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Ant/Ant.framework/Headers" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Module1/Pods-Module1.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Module1 { 2 | umbrella header "Pods-Module1-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Module1/Pods-Module1.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Ant" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Ant/Ant.framework/Headers" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/PublicServices/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/PublicServices/PublicServices.h: -------------------------------------------------------------------------------- 1 | // 2 | // PublicServices.h 3 | // PublicServices 4 | // 5 | // Created by huluobo on 2019/2/13. 6 | // Copyright © 2019 huluobo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for PublicServices. 12 | FOUNDATION_EXPORT double PublicServicesVersionNumber; 13 | 14 | //! Project version string for PublicServices. 15 | FOUNDATION_EXPORT const unsigned char PublicServicesVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | @protocol TestService 20 | 21 | - (void)service1; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // The contents of this file are implicitly included at the beginning of every test case source file. 2 | 3 | #ifdef __OBJC__ 4 | 5 | 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /Example/Tests/Tests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AntTests.m 3 | // AntTests 4 | // 5 | // Created by huluobo on 02/13/2019. 6 | // Copyright (c) 2019 huluobo. All rights reserved. 7 | // 8 | 9 | @import XCTest; 10 | 11 | @interface Tests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation Tests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /Example/Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 huluobo 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](medias/logo.png) 2 | 3 | [![CI Status](https://img.shields.io/travis/hujewelz/Ant.svg?style=flat)](https://travis-ci.org/hujewelz/Ant) 4 | [![Version](https://img.shields.io/cocoapods/v/Ant.svg?style=flat)](https://cocoapods.org/pods/Ant) 5 | [![License](https://img.shields.io/cocoapods/l/Ant.svg?style=flat)](https://cocoapods.org/pods/Ant) 6 | [![Platform](https://img.shields.io/cocoapods/p/Ant.svg?style=flat)](https://cocoapods.org/pods/Ant) 7 | 8 | ## 概述 9 | Ant 是用于 iOS 应用组件化实现方案。使用了协议注册的方式来实现组件解耦。 10 | 作者在 [本文](http://jewelz.me/cjs77iaoc001z8is6421dnuyc/) 中对组件化解耦方案做了简单的分析。 11 | 12 | ### 组件生命周期管理 13 | 14 | Ant 为组件提供了完整的生命周期方法,用于与宿主项目进行必要的通信。目前只包含 UIApplicationDelegate 中的所有方法。 15 | 16 | ```objc 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | [[Ant shareInstance] application:application didFinishLaunchingWithOptions:launchOptions]; 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application 24 | { 25 | [[Ant shareInstance] applicationWillResignActive:application]; 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application 29 | { 30 | [[Ant shareInstance] applicationDidEnterBackground:application]; 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application 34 | { 35 | [[Ant shareInstance] applicationWillEnterForeground:application]; 36 | } 37 | ``` 38 | 所有注册的组件(模块)会在 AppDelegate 相应的生命周期方法调用时自动调用。 39 | 40 | #### 模块注册 41 | 42 | 模块注册有动态注册和静态注册两种。 43 | 44 | ##### 静态注册 45 | 46 | 可以使用以下接口来静态注册模块: 47 | 48 | ```objc 49 | /// Register a module with Module class. 50 | + (void)registerModule:(nonnull Class)moduleClass; 51 | 52 | /// Register a module with Module name. 53 | + (void)registerModuleWithName:(nonnull NSString *)moduleName; 54 | 55 | /// Register all modules with plist file. 56 | /// @param plist the full path of the plist file. 57 | + (void)registerModulesFromPlistFile:(nullable NSString *)plist; 58 | ``` 59 | 60 | 你可以在 Info.plist 中添加 Modules: 61 | 62 | ![Info.plist](https://github.com/hujewelz/Ant/blob/master/medias/infoplist.png) 63 | 64 | 可以在调用 `registerModulesFromPlistFile` 并传入 `nil` ,Ant 会默认加载 Info.plist 中的 Modules: 65 | ```objc 66 | [Ant registerModulesFromPlistFile: nil]; 67 | ``` 68 | 69 | ##### 动态注册 70 | 71 | 可以在任何位置使用 `ANT_MODULE_EXPORT(name)` 宏定义来注册模块。 72 | 73 | ```objc 74 | ANT_MODULE_EXPORT(Module1App) 75 | 76 | @interface Module1App() { 77 | NSInteger state; 78 | } 79 | 80 | @end 81 | ``` 82 | 83 | ### 组件通信 84 | 85 | Ant 使用协议注册的方式(Protocol-Class)来实现组件通信。 86 | Protocol-Class 方案就是通过 protocol 定义服务接口,服务提供方通过实现该接口来提供接口定义的服务。具体实现就是把 protocol 和 class 做一个映射,同时在内存中保存一张映射表,使用的时候,就通过 protocol 找到对应的 class 来获取需要的服务。 87 | 88 | **示例图:** 89 | 90 | ![protocol-class使用示例图](https://github.com/hujewelz/Ant/blob/master/medias/protocol-class.jpg) 91 | 92 | **示例代码:** 93 | 94 | ```objc 95 | // TestService.h (定义服务) 96 | @protocol TestService 97 | /// 测试 98 | - (void)service1; 99 | 100 | @end 101 | 102 | // 组件 A (服务提供方) 103 | ANT_REGISTER_SERVICE(TestServiceImpl, TestService) 104 | @interface TestServiceImpl() @end 105 | 106 | @implementation TestServiceImpl 107 | 108 | - (void)service1 { 109 | NSLog(@"Service test from Impl"); 110 | } 111 | 112 | @end 113 | 114 | // 组件 B (服务使用方) 115 | id obj = [Ant serviceImplFromProtocol:@protocol(TestService)]; 116 | [obj service1]; 117 | ``` 118 | 服务的注册和组件的注册一样,有动态注册和静态注册两种。 119 | 动态注册使用 `ANT_REGISTER_SERVICE(impl, protocol)` 宏定义来注册实现类和遵守的协议。 120 | 121 | ```objc 122 | ANT_REGISTER_SERVICE(TestServiceImpl, TestService) 123 | @interface TestServiceImpl() @end 124 | ``` 125 | 也可以使用 `registerService:forProtocol:` 方法来手动注册。 126 | 127 | ## 安装 128 | 129 | Ant 可以使用 [CocoaPods](https://cocoapods.org) 进行安装。 130 | 131 | ```ruby 132 | pod 'Ant' 133 | ``` 134 | 135 | ## 作者 136 | 137 | [huluobo](http://jewelz.me), hujewelz@163.com 138 | 139 | ## License 140 | 141 | Ant is available under the MIT license. See the LICENSE file for more info. 142 | 143 | 144 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /medias/infoplist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hujewelz/Ant/a16fc445961b5d08cc2a453bb4b35a4df13cd74c/medias/infoplist.png -------------------------------------------------------------------------------- /medias/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hujewelz/Ant/a16fc445961b5d08cc2a453bb4b35a4df13cd74c/medias/logo.png -------------------------------------------------------------------------------- /medias/protocol-class.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hujewelz/Ant/a16fc445961b5d08cc2a453bb4b35a4df13cd74c/medias/protocol-class.jpg --------------------------------------------------------------------------------