Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
Signed-off-by: Ginhoor <ginhoor@gmail.com>
  • Loading branch information
ginhoor committed Mar 15, 2019
1 parent 6f624a1 commit c0f5c45
Show file tree
Hide file tree
Showing 154 changed files with 6,839 additions and 26 deletions.
23 changes: 18 additions & 5 deletions Example/GHApplicationMediator.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
00AFC75B223BAFDB005A33FC /* ModuleA.m in Sources */ = {isa = PBXBuildFile; fileRef = 00AFC758223BAFDB005A33FC /* ModuleA.m */; };
00AFC75C223BAFDB005A33FC /* ModuleB.m in Sources */ = {isa = PBXBuildFile; fileRef = 00AFC75A223BAFDB005A33FC /* ModuleB.m */; };
249490E36A22EFF6EE02D499 /* Pods_GHApplicationMediator_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49FFF15BEA504EB986F9651B /* Pods_GHApplicationMediator_Tests.framework */; };
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
Expand Down Expand Up @@ -37,6 +39,10 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
00AFC757223BAFDB005A33FC /* ModuleA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModuleA.h; sourceTree = "<group>"; };
00AFC758223BAFDB005A33FC /* ModuleA.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModuleA.m; sourceTree = "<group>"; };
00AFC759223BAFDB005A33FC /* ModuleB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModuleB.h; sourceTree = "<group>"; };
00AFC75A223BAFDB005A33FC /* ModuleB.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModuleB.m; sourceTree = "<group>"; };
49FFF15BEA504EB986F9651B /* Pods_GHApplicationMediator_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GHApplicationMediator_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6003F58A195388D20070C39A /* GHApplicationMediator_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GHApplicationMediator_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
Expand All @@ -57,13 +63,13 @@
6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; };
606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; };
658CC8621C3F40105E902594 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; name = README.md; path = ../README.md; sourceTree = "<group>"; };
658CC8621C3F40105E902594 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
84E1AAD694B46DDC949C87F7 /* Pods-GHApplicationMediator_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GHApplicationMediator_Tests.release.xcconfig"; path = "Target Support Files/Pods-GHApplicationMediator_Tests/Pods-GHApplicationMediator_Tests.release.xcconfig"; sourceTree = "<group>"; };
873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
ADB159AE2E7E357BFEA18CFF /* Pods-GHApplicationMediator_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GHApplicationMediator_Tests.debug.xcconfig"; path = "Target Support Files/Pods-GHApplicationMediator_Tests/Pods-GHApplicationMediator_Tests.debug.xcconfig"; sourceTree = "<group>"; };
B7508DBAC3BF0C9C628DBC23 /* GHApplicationMediator.podspec */ = {isa = PBXFileReference; includeInIndex = 1; name = GHApplicationMediator.podspec; path = ../GHApplicationMediator.podspec; sourceTree = "<group>"; };
BB98AED0222AC8266921278C /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
B7508DBAC3BF0C9C628DBC23 /* GHApplicationMediator.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = GHApplicationMediator.podspec; path = ../GHApplicationMediator.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
BB98AED0222AC8266921278C /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
E9A4D0B5C244259FBC9F68EF /* Pods-GHApplicationMediator_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GHApplicationMediator_Example.release.xcconfig"; path = "Target Support Files/Pods-GHApplicationMediator_Example/Pods-GHApplicationMediator_Example.release.xcconfig"; sourceTree = "<group>"; };
EACD378CCD29F8AAF99527A6 /* Pods_GHApplicationMediator_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GHApplicationMediator_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F668A17B7368A57592FC5922 /* Pods-GHApplicationMediator_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GHApplicationMediator_Example.debug.xcconfig"; path = "Target Support Files/Pods-GHApplicationMediator_Example/Pods-GHApplicationMediator_Example.debug.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -134,9 +140,13 @@
children = (
6003F59C195388D20070C39A /* GHAppDelegate.h */,
6003F59D195388D20070C39A /* GHAppDelegate.m */,
873B8AEA1B1F5CCA007FD442 /* Main.storyboard */,
6003F5A5195388D20070C39A /* GHViewController.h */,
6003F5A6195388D20070C39A /* GHViewController.m */,
00AFC757223BAFDB005A33FC /* ModuleA.h */,
00AFC758223BAFDB005A33FC /* ModuleA.m */,
00AFC759223BAFDB005A33FC /* ModuleB.h */,
00AFC75A223BAFDB005A33FC /* ModuleB.m */,
873B8AEA1B1F5CCA007FD442 /* Main.storyboard */,
71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */,
6003F5A8195388D20070C39A /* Images.xcassets */,
6003F594195388D20070C39A /* Supporting Files */,
Expand Down Expand Up @@ -193,7 +203,6 @@
ADB159AE2E7E357BFEA18CFF /* Pods-GHApplicationMediator_Tests.debug.xcconfig */,
84E1AAD694B46DDC949C87F7 /* Pods-GHApplicationMediator_Tests.release.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
Expand Down Expand Up @@ -394,8 +403,10 @@
buildActionMask = 2147483647;
files = (
6003F59E195388D20070C39A /* GHAppDelegate.m in Sources */,
00AFC75C223BAFDB005A33FC /* ModuleB.m in Sources */,
6003F5A7195388D20070C39A /* GHViewController.m in Sources */,
6003F59A195388D20070C39A /* main.m in Sources */,
00AFC75B223BAFDB005A33FC /* ModuleA.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -526,6 +537,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "GHApplicationMediator/GHApplicationMediator-Prefix.pch";
INFOPLIST_FILE = "GHApplicationMediator/GHApplicationMediator-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -541,6 +553,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "GHApplicationMediator/GHApplicationMediator-Prefix.pch";
INFOPLIST_FILE = "GHApplicationMediator/GHApplicationMediator-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
10 changes: 10 additions & 0 deletions Example/GHApplicationMediator.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
33 changes: 13 additions & 20 deletions Example/GHApplicationMediator/GHAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,33 @@
//

#import "GHAppDelegate.h"
#import "GHApplicationMediator.h"
#import "ModuleA.h"
#import "ModuleB.h"

@implementation GHAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+ (void)load
{
// Override point for customization after application launch.
return YES;
[GHApplicationMediator registerAppilgationModuleDelegate:[[ModuleA alloc] init]];

[GHApplicationMediator registerAppilgationModuleDelegate:[[ModuleB alloc] init]];
}

- (void)applicationWillResignActive:(UIApplication *)application
- (BOOL)respondsToSelector:(SEL)aSelector
{
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
return [[GHApplicationMediator sharedInstance] respondsToSelector:aSelector];
}

- (void)applicationDidEnterBackground:(UIApplication *)application
- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
{
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
return [[GHApplicationMediator sharedInstance] methodSignatureForSelector:aSelector];
}

- (void)applicationWillEnterForeground:(UIApplication *)application
- (void)forwardInvocation:(NSInvocation *)anInvocation
{
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
[[GHApplicationMediator sharedInstance] forwardInvocation:anInvocation];
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
// 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.
}

- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end
17 changes: 17 additions & 0 deletions Example/GHApplicationMediator/ModuleA.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// ModuleA.h
// ApplicationMediator
//
// Created by JunhuaShao on 2019/3/6.
// Copyright © 2019 JunhuaShao. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN

@interface ModuleA : NSObject <UIApplicationDelegate>

@end

NS_ASSUME_NONNULL_END
26 changes: 26 additions & 0 deletions Example/GHApplicationMediator/ModuleA.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// ModuleA.m
// ApplicationMediator
//
// Created by JunhuaShao on 2019/3/6.
// Copyright © 2019 JunhuaShao. All rights reserved.
//

#import "ModuleA.h"

@implementation ModuleA

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSLog(@"%@--->%s",self.class,__FUNCTION__);

return YES;
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
NSLog(@"%@--->%s",self.class,__FUNCTION__);
}


@end
17 changes: 17 additions & 0 deletions Example/GHApplicationMediator/ModuleB.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// ModuleB.h
// ApplicationMediator
//
// Created by JunhuaShao on 2019/3/6.
// Copyright © 2019 JunhuaShao. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN

@interface ModuleB : NSObject <UIApplicationDelegate>

@end

NS_ASSUME_NONNULL_END
25 changes: 25 additions & 0 deletions Example/GHApplicationMediator/ModuleB.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// ModuleB.m
// ApplicationMediator
//
// Created by JunhuaShao on 2019/3/6.
// Copyright © 2019 JunhuaShao. All rights reserved.
//

#import "ModuleB.h"

@implementation ModuleB

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSLog(@"%@--->%s",self.class,__FUNCTION__);

return YES;
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
NSLog(@"%@--->%s",self.class,__FUNCTION__);
}

@end
2 changes: 1 addition & 1 deletion Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use_frameworks!

platform :ios, '8.0'
platform :ios, '10.0'

target 'GHApplicationMediator_Example' do
pod 'GHApplicationMediator', :path => '../'
Expand Down
27 changes: 27 additions & 0 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
PODS:
- Expecta (1.0.6)
- GHApplicationMediator (0.1.0)
- Specta (1.0.7)

DEPENDENCIES:
- Expecta
- GHApplicationMediator (from `../`)
- Specta

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Expecta
- Specta

EXTERNAL SOURCES:
GHApplicationMediator:
:path: "../"

SPEC CHECKSUMS:
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
GHApplicationMediator: d71428f10f1212f7533c5d1bab7d54fe3f08b6c3
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66

PODFILE CHECKSUM: d0fc96c34780fbef0eed138097fb818dd1b3c7a9

COCOAPODS: 1.6.0
25 changes: 25 additions & 0 deletions Example/Pods/Expecta/Expecta/EXPBlockDefinedMatcher.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 60 additions & 0 deletions Example/Pods/Expecta/Expecta/EXPBlockDefinedMatcher.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions Example/Pods/Expecta/Expecta/EXPDefines.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c0f5c45

Please sign in to comment.