Browse Source

完成超级客户端打开原生有应用(码上购)

liuql6 6 years ago
parent
commit
872c0fd0c1

+ 0 - 20
SuperMenu/SuperMenu.xcodeproj/project.pbxproj

@ -15,7 +15,6 @@
15 15
		0468917E21C9081600EE1411 /* WadeMobile.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0468917D21C9081600EE1411 /* WadeMobile.framework */; };
16 16
		0468917F21C9082C00EE1411 /* WadeMobile.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0468917D21C9081600EE1411 /* WadeMobile.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17 17
		0468918021C9082C00EE1411 /* IpuPush.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0468917B21C9080700EE1411 /* IpuPush.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18
		0A6DB49220736B1C0004056F /* SuperMenuSetting.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A6DB49120736B1C0004056F /* SuperMenuSetting.m */; };
19 18
		0A780E621EE8EACF004AE072 /* IpuQrCode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A780E611EE8EACF004AE072 /* IpuQrCode.framework */; };
20 19
		0A780E631EE8EAD4004AE072 /* IpuQrCode.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0A780E611EE8EACF004AE072 /* IpuQrCode.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
21 20
		0ADE48431FF6181A009961EF /* SubViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE48421FF6181A009961EF /* SubViewController.m */; };
@ -49,7 +48,6 @@
49 48
		EA45A5B11E0777C0001275C9 /* WadeMobileUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EA45A5A91E0777BF001275C9 /* WadeMobileUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
50 49
		EA45A5C11E1391EC001275C9 /* AppManagePlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = EA45A5C01E1391EC001275C9 /* AppManagePlugin.m */; };
51 50
		EA9AB3291E1DF3CB009CDEB6 /* IpuMapBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = EA9AB3281E1DF3CB009CDEB6 /* IpuMapBundle.bundle */; };
52
		EAEBF4691E9C25D3008DCFEB /* RemoteWebVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EAEBF4681E9C25D3008DCFEB /* RemoteWebVC.m */; };
53 51
/* End PBXBuildFile section */
54 52
55 53
/* Begin PBXCopyFilesBuildPhase section */
@ -82,8 +80,6 @@
82 80
		04635DDA2223E3150073DE0A /* IpuCount.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IpuCount.framework; path = ../IpuCommon/Frameworks/IpuCount.framework; sourceTree = "<group>"; };
83 81
		0468917B21C9080700EE1411 /* IpuPush.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IpuPush.framework; path = ../IpuCommon/Frameworks/IpuPush.framework; sourceTree = "<group>"; };
84 82
		0468917D21C9081600EE1411 /* WadeMobile.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WadeMobile.framework; path = ../IpuCommon/Frameworks/WadeMobile.framework; sourceTree = "<group>"; };
85
		0A6DB49020736B1C0004056F /* SuperMenuSetting.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SuperMenuSetting.h; sourceTree = "<group>"; };
86
		0A6DB49120736B1C0004056F /* SuperMenuSetting.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SuperMenuSetting.m; sourceTree = "<group>"; };
87 83
		0A780E611EE8EACF004AE072 /* IpuQrCode.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IpuQrCode.framework; path = ../IpuCommon/Frameworks/IpuQrCode.framework; sourceTree = "<group>"; };
88 84
		0ADE48411FF6181A009961EF /* SubViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SubViewController.h; sourceTree = "<group>"; };
89 85
		0ADE48421FF6181A009961EF /* SubViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SubViewController.m; sourceTree = "<group>"; };
@ -124,8 +120,6 @@
124 120
		EA45A5C01E1391EC001275C9 /* AppManagePlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppManagePlugin.m; sourceTree = "<group>"; };
125 121
		EA9AB3251E1DF3B1009CDEB6 /* IpuMap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IpuMap.framework; path = ../IpuCommon/Frameworks/IpuMap.framework; sourceTree = "<group>"; };
126 122
		EA9AB3281E1DF3CB009CDEB6 /* IpuMapBundle.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = IpuMapBundle.bundle; path = ../IpuCommon/Frameworks/IpuMapBundle.bundle; sourceTree = "<group>"; };
127
		EAEBF4671E9C25D3008DCFEB /* RemoteWebVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteWebVC.h; sourceTree = "<group>"; };
128
		EAEBF4681E9C25D3008DCFEB /* RemoteWebVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RemoteWebVC.m; sourceTree = "<group>"; };
129 123
/* End PBXFileReference section */
130 124
131 125
/* Begin PBXFrameworksBuildPhase section */
@ -221,7 +215,6 @@
221 215
			isa = PBXGroup;
222 216
			children = (
223 217
				B28C9D9F21C383340006191A /* SuspendButton */,
224
				EAEBF4661E9C25D3008DCFEB /* plugin */,
225 218
				EA45A5BE1E1391EC001275C9 /* multiple */,
226 219
				EA45A5B31E0777DA001275C9 /* SuperMenu.entitlements */,
227 220
				EA45A5921E077735001275C9 /* AppDelegate.h */,
@ -258,17 +251,6 @@
258 251
			path = multiple;
259 252
			sourceTree = "<group>";
260 253
		};
261
		EAEBF4661E9C25D3008DCFEB /* plugin */ = {
262
			isa = PBXGroup;
263
			children = (
264
				EAEBF4671E9C25D3008DCFEB /* RemoteWebVC.h */,
265
				EAEBF4681E9C25D3008DCFEB /* RemoteWebVC.m */,
266
				0A6DB49020736B1C0004056F /* SuperMenuSetting.h */,
267
				0A6DB49120736B1C0004056F /* SuperMenuSetting.m */,
268
			);
269
			path = plugin;
270
			sourceTree = "<group>";
271
		};
272 254
/* End PBXGroup section */
273 255
274 256
/* Begin PBXNativeTarget section */
@ -361,7 +343,6 @@
361 343
			buildActionMask = 2147483647;
362 344
			files = (
363 345
				EA45A5971E077735001275C9 /* ViewController.m in Sources */,
364
				EAEBF4691E9C25D3008DCFEB /* RemoteWebVC.m in Sources */,
365 346
				EA45A5C11E1391EC001275C9 /* AppManagePlugin.m in Sources */,
366 347
				B28C9DAF21C383340006191A /* IPUSuspendButton.m in Sources */,
367 348
				EA3F49BE1E890B4B003C86BD /* AppMenuSettingPlugin.m in Sources */,
@ -373,7 +354,6 @@
373 354
				B2EE3FD021EC8997004EE6A9 /* IPUSuspendButtonPlugin.m in Sources */,
374 355
				EA45A5911E077735001275C9 /* main.m in Sources */,
375 356
				B2B079B021E8722C00F1C911 /* IPUSuspendEventItem.m in Sources */,
376
				0A6DB49220736B1C0004056F /* SuperMenuSetting.m in Sources */,
377 357
			);
378 358
			runOnlyForDeploymentPostprocessing = 0;
379 359
		};

BIN
SuperMenu/SuperMenu.xcworkspace/xcuserdata/benny.xcuserdatad/UserInterfaceState.xcuserstate


+ 32 - 0
SuperMenu/SuperMenu/AppDelegate.m

@ -12,6 +12,8 @@
12 12
#import <IpuCount/IpuCountReport.h>
13 13
#import <IpuCount/IpuCountConstant.h>
14 14
15
#import <WadeMobile/WDJsonHelper.h>
16
15 17
#import "IPUSuspendConfig.h"
16 18
17 19
@interface AppDelegate ()
@ -106,4 +108,34 @@
106 108
    //    [plugin showNotification:arr];
107 109
}
108 110
111
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
112
    NSString *urlString = [url.absoluteString stringByRemovingPercentEncoding];
113
    if ([urlString rangeOfString:@"backSourceApp"].location == NSNotFound) {
114
        // 不是从子应用跳回
115
        return [super application:app openURL:url options:options];
116
    }
117
    
118
    // 从子应用跳回
119
    NSArray *array = [urlString componentsSeparatedByString:@"?"];
120
    @try {
121
        NSString *paramsString = array[1];
122
        NSDictionary *dict = [WDJsonHelper toDictionary:[paramsString substringFromIndex:7]];
123
        
124
        NSString *message = [NSString stringWithFormat:@"Name:%@\n Phone:%@", dict[@"USERNAME"], dict[@"PHONENO"]];
125
        
126
        IpuAlertView *alertView = [[IpuAlertView alloc] initWithTitle:@"从子应用返回"
127
                                                              message:message
128
                                                                block:^(IpuAlertView *alertView, BOOL isCancel, NSInteger buttonIndex) {
129
                                                                    
130
                                                                }
131
                                                    cancelButtonTitle:@"确定"
132
                                                    otherButtonTitles:nil];
133
        [alertView show];
134
    } @catch (NSException *exception) {
135
        
136
    } @finally {
137
        return YES;
138
    }
139
}
140
109 141
@end

+ 10 - 0
SuperMenu/SuperMenu/Info.plist

@ -42,6 +42,16 @@
42 42
				<string>wxb0ed3b533b5f7222</string>
43 43
			</array>
44 44
		</dict>
45
		<dict>
46
			<key>CFBundleTypeRole</key>
47
			<string>Editor</string>
48
			<key>CFBundleURLName</key>
49
			<string>ipusuperapp</string>
50
			<key>CFBundleURLSchemes</key>
51
			<array>
52
				<string>com-ai-prd-ipu-superapp</string>
53
			</array>
54
		</dict>
45 55
	</array>
46 56
	<key>CFBundleVersion</key>
47 57
	<string>1</string>