Commit c090ee4f authored by David黄金龙's avatar David黄金龙

接入鸿蒙的 appLink

parent 060ed425
...@@ -5,11 +5,14 @@ platform :ios, '13.0' ...@@ -5,11 +5,14 @@ platform :ios, '13.0'
target 'galaxy' do target 'galaxy' do
use_frameworks! use_frameworks!
#鸿蒙AGC 短链处理相关
pod 'AGConnectCore','1.9.0.302'
pod 'AGConnectAppLinking','1.9.0.302'
#日历 多时间选择 #日历 多时间选择
pod 'FSCalendar',"2.8.4" pod 'FSCalendar',"2.8.4"
#图片预览 #图片预览
pod 'JXPhotoBrowser',"3.1.4" pod 'JXPhotoBrowser','3.1.4'
pod 'SDWebImage','5.18.10' pod 'SDWebImage','5.18.10'
#与H5进行交互 #与H5进行交互
......
...@@ -4075,6 +4075,7 @@ ...@@ -4075,6 +4075,7 @@
A5573ECC2B317BFF00D98EC0 /* Resources */, A5573ECC2B317BFF00D98EC0 /* Resources */,
0CFB07298194FEC905CE2694 /* [CP] Embed Pods Frameworks */, 0CFB07298194FEC905CE2694 /* [CP] Embed Pods Frameworks */,
04808C092B4686C10056D53C /* Embed Frameworks */, 04808C092B4686C10056D53C /* Embed Frameworks */,
47BB31035D3DBEB9235AC809 /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
...@@ -4238,6 +4239,23 @@ ...@@ -4238,6 +4239,23 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks.sh\"\n"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
47BB31035D3DBEB9235AC809 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources.sh\"\n";
showEnvVarsInLog = 0;
};
7D00420CA535917A84A0A43E /* [CP] Check Pods Manifest.lock */ = { 7D00420CA535917A84A0A43E /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
......
...@@ -14,6 +14,10 @@ import GKNavigationBarSwift ...@@ -14,6 +14,10 @@ import GKNavigationBarSwift
import AVFoundation import AVFoundation
import SensorsAnalyticsSDK import SensorsAnalyticsSDK
import AGConnectCore
import AGConnectCredential
import AGConnectAppLinking
@main @main
class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate { class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
var window: UIWindow? var window: UIWindow?
...@@ -63,7 +67,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate { ...@@ -63,7 +67,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
YHOSSManager.share.getOSSID() YHOSSManager.share.getOSSID()
//1.设置主窗口
AGCInstance.startUp()
AGCAppLinking.instance().handle { (link, error) in
let deepLink = link?.deepLink
//TODO: 增加deeplink地址跳转
print(deepLink as Any)
}
//设置主窗口
setupRootVC() setupRootVC()
return true return true
} }
...@@ -76,6 +88,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate { ...@@ -76,6 +88,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
} }
func setupNavBar() { func setupNavBar() {
GKConfigure.setupDefault() GKConfigure.setupDefault()
} }
...@@ -88,12 +102,20 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate { ...@@ -88,12 +102,20 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
return WXApi.handleOpen(url, delegate: self) return WXApi.handleOpen(url, delegate: self)
} }
// private func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
//
// return isAppLinking
// }
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
return WXApi.handleOpenUniversalLink(userActivity, delegate: self) let isAppLinking = AGCAppLinking.instance().continueUserActivity(userActivity)
return isAppLinking == false ? WXApi.handleOpenUniversalLink(userActivity, delegate: self) : true
} }
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool { func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
return WXApi.handleOpenUniversalLink(userActivity, delegate: self) let isAppLinking = AGCAppLinking.instance().continueUserActivity(userActivity)
return isAppLinking == false ? WXApi.handleOpenUniversalLink(userActivity, delegate: self) : true
} }
func onResp(_ resp: BaseResp) { func onResp(_ resp: BaseResp) {
...@@ -126,6 +148,10 @@ extension AppDelegate { ...@@ -126,6 +148,10 @@ extension AppDelegate {
#else #else
Bugly.start(withAppId: YhConstant.Bugly.appidForRelease) Bugly.start(withAppId: YhConstant.Bugly.appidForRelease)
#endif #endif
//3、AGC 短链相关
AGCInstance.startUp()
} }
//2.通用全局UI设置相关 //2.通用全局UI设置相关
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>agc_applinking_not_read_pasteboard</key>
<false/>
<key>CFBundleDocumentTypes</key> <key>CFBundleDocumentTypes</key>
<array> <array>
<dict> <dict>
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
<key>code</key> <key>code</key>
<dict> <dict>
<key>code1</key> <key>code1</key>
<string>C3C2AF9AAD40B4815073667C6478767E</string> <string>4D35FD8F9FAFCDA4D1F5F9A35A000B65</string>
<key>code2</key> <key>code2</key>
<string>B37BD3F9DBF4B735EB5419FF8CC89CE9</string> <string>308C15AD99A2450E04CDA2E5EB6CFD06</string>
<key>code3</key> <key>code3</key>
<string>9AE1BDCCC54156BF0DDDB87887F3F952</string> <string>D94D246E0B2318D5DB4D97B842A4218D</string>
<key>code4</key> <key>code4</key>
<string>8E9923785BC586C1F573623CADA73ABA</string> <string>1DFCB5C6BAFD4E59C737454A0B132032</string>
</dict> </dict>
<key>agcgw</key> <key>agcgw</key>
<dict> <dict>
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<key>client_id</key> <key>client_id</key>
<string>1499332091546988928</string> <string>1499332091546988928</string>
<key>client_secret</key> <key>client_secret</key>
<string>[!00C51DD60BA28DDC51DFFD35540E1B5E9E6DD7602C5E406BB46FD22930A2F92187A380C54AB85C84290DC0C45F6FA35740CE3C4E4170E0D9CA26499078BDA0BEB77FF382F8296AE071BF4C6773DB28BFA4CAF7DF650506F2EECB0DC8F786C3B0A3]</string> <string>[!007A10AA74B49CA7F312022929C6799EF96462CB3BD7C4A3F682EA3D5617FBA70CDADE7DAAC5212C2AD85198F89E6A899F87620270040229A64F5EB4399DD90D71857C96637106D5BAC1EF66CF27120F343A74996AF68C73FBDA965EF7FBFADF0C]</string>
<key>project_id</key> <key>project_id</key>
<string>388421841222432706</string> <string>388421841222432706</string>
<key>app_id</key> <key>app_id</key>
...@@ -165,20 +165,20 @@ ...@@ -165,20 +165,20 @@
<key>client</key> <key>client</key>
<dict> <dict>
<key>client_secret</key> <key>client_secret</key>
<string>[!00BA6A249EAF19C5C0308549147FCEE7271C6BCBB03F6617CE3D4E089F134F45E56A9BFA2814BACE291270D40A72C7EEC79F2A936309D27831EB038C9DD6B037CCAEC1DBA185039F20EDD01A3E7644DFC084132D592330D6A69B714BD4FFF1FB84]</string> <string>[!00E8F5DF6083E559D617D15BC53D19A5F6A6D71ECFA908036B7266490804665BE3807B71CEF31290851C7C9013F64EEEF304EA068DC08B2D71D087AFD97649BE33F9DB2822DF8626CFE053F4D1605E191FF57E6DB096CBAB57ECC228D4E511BA04]</string>
<key>app_id</key> <key>app_id</key>
<string>172249065903430388</string> <string>172249065903430388</string>
</dict> </dict>
<key>code</key> <key>code</key>
<dict> <dict>
<key>code1</key> <key>code1</key>
<string>F0E2C9CAB01DBFB5CC22404A01EF6B931477C4D632B76E501D1C5BA5B802AC34</string> <string>7EA4CA97B078601F77CA7D8ECD7ACA2AE35C93247A80D200A2494395ADAE4926</string>
<key>code2</key> <key>code2</key>
<string>F7BBABFF2B8CD64B3542A83F2B7F40E0F44458E86FE39616ED634F8A108CC3E6</string> <string>7128083AEB5DAEAFFBE89E39E01CBF34A9CCD215A28C4F71385CB99E0CC795B4</string>
<key>code3</key> <key>code3</key>
<string>96FE4E8F86C76ECEA0CFD0788D5EE444A513ED4F07B746711760741BD1C3643C</string> <string>F4DC9C839978257007D35D61DFC8D43C43691ADBC4BF5F6044EF643BC61069E7</string>
<key>code4</key> <key>code4</key>
<string>2EBD28B8A0DD56BEFC22A8F5394782F4</string> <string>0FF461F932F8EAD104E27EF65AAC3F75</string>
</dict> </dict>
</dict> </dict>
</array> </array>
......
...@@ -12,6 +12,26 @@ ...@@ -12,6 +12,26 @@
<array> <array>
<string>webcredentials:www.galaxy-immi.com</string> <string>webcredentials:www.galaxy-immi.com</string>
<string>applinks:www.galaxy-immi.com</string> <string>applinks:www.galaxy-immi.com</string>
<string>applinks:davidhuang.drcn.agconnect.link</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
</array> </array>
</dict> </dict>
</plist> </plist>
...@@ -12,6 +12,26 @@ ...@@ -12,6 +12,26 @@
<array> <array>
<string>webcredentials:www.galaxy-immi.com</string> <string>webcredentials:www.galaxy-immi.com</string>
<string>applinks:www.galaxy-immi.com</string> <string>applinks:www.galaxy-immi.com</string>
<string>applinks:davidhuang.drcn.agconnect.link</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
</array> </array>
</dict> </dict>
</plist> </plist>
...@@ -12,6 +12,26 @@ ...@@ -12,6 +12,26 @@
<array> <array>
<string>webcredentials:www.galaxy-immi.com</string> <string>webcredentials:www.galaxy-immi.com</string>
<string>applinks:www.galaxy-immi.com</string> <string>applinks:www.galaxy-immi.com</string>
<string>applinks:davidhuang.drcn.agconnect.link</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
<string>webcredentials:example.com</string>
</array> </array>
</dict> </dict>
</plist> </plist>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment