linke me
This commit is contained in:
1
Podfile
1
Podfile
@@ -62,6 +62,7 @@ target 'xplan-ios' do
|
||||
pod 'TZImagePickerController'
|
||||
pod 'Bugly'
|
||||
pod 'QY_NIM_iOS_SDK', '~> 6.6.1'
|
||||
pod 'LinkedME_LinkPage'
|
||||
#上传音乐
|
||||
pod 'CocoaAsyncSocket',:modular_headers => true
|
||||
#调试
|
||||
|
@@ -24,6 +24,7 @@ PODS:
|
||||
- IQKeyboardManager (6.5.9)
|
||||
- JXCategoryView (1.5.9)
|
||||
- JXPagingView/Pager (2.1.2)
|
||||
- LinkedME_LinkPage (1.5.5.4)
|
||||
- LookinServer (1.0.4)
|
||||
- MarqueeLabel-ObjC (3.3.0)
|
||||
- Masonry (1.1.0)
|
||||
@@ -102,6 +103,7 @@ DEPENDENCIES:
|
||||
- IQKeyboardManager (~> 6.5.5)
|
||||
- JXCategoryView
|
||||
- JXPagingView/Pager
|
||||
- LinkedME_LinkPage
|
||||
- LookinServer
|
||||
- MarqueeLabel-ObjC
|
||||
- Masonry
|
||||
@@ -145,6 +147,7 @@ SPEC REPOS:
|
||||
- IQKeyboardManager
|
||||
- JXCategoryView
|
||||
- JXPagingView
|
||||
- LinkedME_LinkPage
|
||||
- LookinServer
|
||||
- MarqueeLabel-ObjC
|
||||
- Masonry
|
||||
@@ -189,6 +192,7 @@ SPEC CHECKSUMS:
|
||||
IQKeyboardManager: 241cc94ccabc9deb8f8bd7d12f00d73288d13ecc
|
||||
JXCategoryView: 2ef9ecfd3735158d009ce02d1f29811aa822da65
|
||||
JXPagingView: 90924b364a2ff7e94db534fad1fa50925ff69ee4
|
||||
LinkedME_LinkPage: 0b443cec28582eb2d7e1c09987072e33e44083ec
|
||||
LookinServer: 743c1681771d0a8dcc38825325a080c3186404a5
|
||||
MarqueeLabel-ObjC: 696eaa82e4fcc7fb53e4fdf37ac138f03bf022d6
|
||||
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
|
||||
@@ -221,6 +225,6 @@ SPEC CHECKSUMS:
|
||||
YYText: 5c461d709e24d55a182d1441c41dc639a18a4849
|
||||
YYWebImage: 5f7f36aee2ae293f016d418c7d6ba05c4863e928
|
||||
|
||||
PODFILE CHECKSUM: 2c66800afe7df88b4fccf091b004746a0d60ba8d
|
||||
PODFILE CHECKSUM: 80e5d8c189fc55c6d05dc07c7cd910f6559c0b38
|
||||
|
||||
COCOAPODS: 1.11.3
|
||||
|
@@ -1101,6 +1101,11 @@
|
||||
E8B9843628ABA8B40022D026 /* XPMonentPublishSuccessView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B9843528ABA8B40022D026 /* XPMonentPublishSuccessView.m */; };
|
||||
E8BD0F8828A9E9E400DE050D /* RoomSailingPrizeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8BD0F8728A9E9E400DE050D /* RoomSailingPrizeModel.m */; };
|
||||
E8BD0F8B28A9EB0A00DE050D /* RoomSailingPrizeListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8BD0F8A28A9EB0A00DE050D /* RoomSailingPrizeListModel.m */; };
|
||||
E8C0DF5529C44F3E009C3E76 /* LinkMeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C0DF5429C44F3E009C3E76 /* LinkMeModel.m */; };
|
||||
E8C0DF5729C45170009C3E76 /* CoreSpotlight.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E8C0DF5629C45170009C3E76 /* CoreSpotlight.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
E8C0DF5929C4517D009C3E76 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E8C0DF5829C4517D009C3E76 /* SystemConfiguration.framework */; };
|
||||
E8C0DF5B29C45185009C3E76 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E8C0DF5A29C45185009C3E76 /* Security.framework */; };
|
||||
E8C0DF5D29C4518D009C3E76 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E8C0DF5C29C4518D009C3E76 /* WebKit.framework */; };
|
||||
E8C1670928067DAA00ECB15C /* XPMineGuildSuperAdminSetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C1670828067DAA00ECB15C /* XPMineGuildSuperAdminSetViewController.m */; };
|
||||
E8C1670C28067DED00ECB15C /* XPMineGuildChooseManagerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C1670B28067DED00ECB15C /* XPMineGuildChooseManagerViewController.m */; };
|
||||
E8C1671228067F6C00ECB15C /* XPGuildChooseManagerRoomTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C1671128067F6C00ECB15C /* XPGuildChooseManagerRoomTableViewCell.m */; };
|
||||
@@ -3329,6 +3334,12 @@
|
||||
E8BD0F8728A9E9E400DE050D /* RoomSailingPrizeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomSailingPrizeModel.m; sourceTree = "<group>"; };
|
||||
E8BD0F8928A9EB0A00DE050D /* RoomSailingPrizeListModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomSailingPrizeListModel.h; sourceTree = "<group>"; };
|
||||
E8BD0F8A28A9EB0A00DE050D /* RoomSailingPrizeListModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomSailingPrizeListModel.m; sourceTree = "<group>"; };
|
||||
E8C0DF5329C44F3E009C3E76 /* LinkMeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LinkMeModel.h; sourceTree = "<group>"; };
|
||||
E8C0DF5429C44F3E009C3E76 /* LinkMeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LinkMeModel.m; sourceTree = "<group>"; };
|
||||
E8C0DF5629C45170009C3E76 /* CoreSpotlight.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreSpotlight.framework; path = System/Library/Frameworks/CoreSpotlight.framework; sourceTree = SDKROOT; };
|
||||
E8C0DF5829C4517D009C3E76 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||
E8C0DF5A29C45185009C3E76 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||
E8C0DF5C29C4518D009C3E76 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
|
||||
E8C1670728067DAA00ECB15C /* XPMineGuildSuperAdminSetViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineGuildSuperAdminSetViewController.h; sourceTree = "<group>"; };
|
||||
E8C1670828067DAA00ECB15C /* XPMineGuildSuperAdminSetViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineGuildSuperAdminSetViewController.m; sourceTree = "<group>"; };
|
||||
E8C1670A28067DED00ECB15C /* XPMineGuildChooseManagerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineGuildChooseManagerViewController.h; sourceTree = "<group>"; };
|
||||
@@ -3680,12 +3691,16 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E87888F42738C30E00BF1D57 /* StoreKit.framework in Frameworks */,
|
||||
E8C0DF5D29C4518D009C3E76 /* WebKit.framework in Frameworks */,
|
||||
E8C0DF5B29C45185009C3E76 /* Security.framework in Frameworks */,
|
||||
E8C0DF5929C4517D009C3E76 /* SystemConfiguration.framework in Frameworks */,
|
||||
E8C0DF5729C45170009C3E76 /* CoreSpotlight.framework in Frameworks */,
|
||||
E8A86E0D27BA6B71001C21F9 /* SudMGP.xcframework in Frameworks */,
|
||||
186A52E526FC559200D67B2C /* AliyunOSSiOS.framework in Frameworks */,
|
||||
73FFADDC93E195344047A2EC /* Pods_xplan_ios.framework in Frameworks */,
|
||||
186A52E426FC559200D67B2C /* SGMain.framework in Frameworks */,
|
||||
186A531926FC592100D67B2C /* libresolv.tbd in Frameworks */,
|
||||
E87888F42738C30E00BF1D57 /* StoreKit.framework in Frameworks */,
|
||||
186A52E026FC559200D67B2C /* SecurityGuardSDK.framework in Frameworks */,
|
||||
9BA8A47727C60DF7000365A3 /* AVFoundation.framework in Frameworks */,
|
||||
186A52E226FC559200D67B2C /* RPSDK.framework in Frameworks */,
|
||||
@@ -5397,6 +5412,10 @@
|
||||
BFB922F5D81845AC32D1E1ED /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E8C0DF5C29C4518D009C3E76 /* WebKit.framework */,
|
||||
E8C0DF5A29C45185009C3E76 /* Security.framework */,
|
||||
E8C0DF5829C4517D009C3E76 /* SystemConfiguration.framework */,
|
||||
E8C0DF5629C45170009C3E76 /* CoreSpotlight.framework */,
|
||||
E87888F32738C30E00BF1D57 /* StoreKit.framework */,
|
||||
186A531826FC591100D67B2C /* libresolv.tbd */,
|
||||
CACF623970097D653132D69A /* Pods_xplan_ios.framework */,
|
||||
@@ -8050,6 +8069,8 @@
|
||||
9BFB10212897D68400B3985E /* XPTabAnchorCardModel.m */,
|
||||
9BA3B409293DCDFD0071DF1C /* XPVersionUpdateModel.h */,
|
||||
9BA3B40A293DCDFD0071DF1C /* XPVersionUpdateModel.m */,
|
||||
E8C0DF5329C44F3E009C3E76 /* LinkMeModel.h */,
|
||||
E8C0DF5429C44F3E009C3E76 /* LinkMeModel.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -10294,6 +10315,7 @@
|
||||
E8C21A00294854DA00344FC5 /* AnchorLevelModel.m in Sources */,
|
||||
E8A86DF727BA2F1C001C21F9 /* XPRoomLittleGameContainerView.m in Sources */,
|
||||
E8098CB1282E86EF0090B9F0 /* XPMonentsContentView.m in Sources */,
|
||||
E8C0DF5529C44F3E009C3E76 /* LinkMeModel.m in Sources */,
|
||||
E85E3FA728B7A6F000268DC8 /* MessageContentMonentsView.m in Sources */,
|
||||
E880B3AF278BE1D800A83B0D /* Api+AcrossRoomPK.m in Sources */,
|
||||
E8B9842D28AB77F10022D026 /* XPMonentsPublishTopicView.m in Sources */,
|
||||
|
@@ -11,7 +11,9 @@
|
||||
#import "AppDelegate+ThirdConfig.h"
|
||||
#import <AppTrackingTransparency/AppTrackingTransparency.h>
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
|
||||
#import <LinkedME_iOS/LinkedME.h>
|
||||
#import "LinkMeModel.h"
|
||||
#import "NSObject+MJExtension.h"
|
||||
@interface AppDelegate ()
|
||||
|
||||
@end
|
||||
@@ -28,6 +30,72 @@
|
||||
[self setupLaunchADView];
|
||||
///初始化一些 sdk配置
|
||||
[self initThirdConfig];
|
||||
LinkedME* linkedme = [LinkedME getInstance];
|
||||
[linkedme initSessionWithLaunchOptions:launchOptions automaticallyDisplayDeepLinkController:NO deepLinkHandler:^(NSDictionary* params, NSError* error) {
|
||||
if (!error) {
|
||||
//防止传递参数出错取不到数据,导致App崩溃这里一定要用try catch
|
||||
@try {
|
||||
NSLog(@"LinkedME finished init with params = %@",[params description]);
|
||||
//获取标题
|
||||
NSString *title = [params objectForKey:@"$og_title"];
|
||||
NSString * H5URL;
|
||||
NSDictionary *control = params[@"$control"];
|
||||
if (![params[@"h5_url"] isEqualToString:@""]) {
|
||||
NSString *channel = params[@"h5_url"];
|
||||
H5URL = channel;
|
||||
}
|
||||
NSString * linkedmeChannel = control[@"linkedmeChannel"];
|
||||
if (title.length >0) {
|
||||
LinkMeModel *linkme = [LinkMeModel modelWithJSON:control];
|
||||
if (linkme.url) {
|
||||
H5URL = linkme.url;
|
||||
}
|
||||
|
||||
switch (linkme.type) {
|
||||
case LinkedMESkipType_Room:
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
case LinkedMESkipType_H5:
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//[自动跳转]使用自动跳转
|
||||
//SDK提供的跳转方法
|
||||
/**
|
||||
* pushViewController : 类名
|
||||
* storyBoardID : 需要跳转的页面的storyBoardID
|
||||
* animated : 是否开启动画
|
||||
* customValue : 传参
|
||||
*
|
||||
*warning 需要在被跳转页中实现次方法 - (void)configureControlWithData:(NSDictionary *)data;
|
||||
*/
|
||||
|
||||
// [LinkedME pushViewController:title storyBoardID:@"detailView" animated:YES customValue:@{@"tag":tag} completion:^{
|
||||
////
|
||||
// }];
|
||||
|
||||
//自定义跳转
|
||||
// dvc.openUrl = params[@"$control"][@"ViewId"];
|
||||
// [[LinkedME getViewController] showViewController:dvc sender:nil];
|
||||
}
|
||||
|
||||
} @catch (NSException *exception) {
|
||||
|
||||
} @finally {
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
NSLog(@"LinkedME failed init: %@", error);
|
||||
}
|
||||
}];
|
||||
return YES;
|
||||
}
|
||||
|
||||
@@ -150,5 +218,35 @@
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark 实现深度链接技术
|
||||
//URI Scheme 实现深度链接技术
|
||||
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
|
||||
//判断是否是通过LinkedME的UrlScheme唤起App
|
||||
if ([[url description] rangeOfString:@"click_id"].location != NSNotFound) {
|
||||
[[LinkedME getInstance] handleDeepLink:url];
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
|
||||
//判断是否是通过LinkedME的UrlScheme唤起App
|
||||
if ([[url description] rangeOfString:@"click_id"].location != NSNotFound) {
|
||||
[[LinkedME getInstance] handleDeepLink:url];
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
//Universal Links 通用链接实现深度链接技术
|
||||
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
|
||||
//判断是否是通过LinkedME的Universal Links唤起App
|
||||
if ([[userActivity.webpageURL description] rangeOfString:@"lkme.cc"].location != NSNotFound) {
|
||||
[[LinkedME getInstance] continueUserActivity:userActivity];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
@@ -41,9 +41,10 @@
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>yinmengapp</string>
|
||||
<string>yinmengapplink</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict/>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2022111001</string>
|
||||
@@ -109,5 +110,10 @@
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>linkedme_key</key>
|
||||
<dict>
|
||||
<key>live</key>
|
||||
<string>4e75ead0ff84424339dc8b0616e7094c</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
27
xplan-ios/Main/Tabbar/Model/LinkMeModel.h
Normal file
27
xplan-ios/Main/Tabbar/Model/LinkMeModel.h
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// LinkMeModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2023/3/17.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, LinkedMESkipType) {
|
||||
LinkedMESkipType_InPage = 1, //app内
|
||||
LinkedMESkipType_Room = 2, //房间
|
||||
LinkedMESkipType_H5 = 3, //H5
|
||||
|
||||
};
|
||||
|
||||
|
||||
@interface LinkMeModel : NSObject
|
||||
@property (nonatomic, copy) NSString *roomuid;//房间id
|
||||
@property (nonatomic, copy) NSString *uid;
|
||||
@property (assign, nonatomic) LinkedMESkipType type;
|
||||
@property (nonatomic, copy) NSString *url;//h5跳转链接
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
12
xplan-ios/Main/Tabbar/Model/LinkMeModel.m
Normal file
12
xplan-ios/Main/Tabbar/Model/LinkMeModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// LinkMeModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2023/3/17.
|
||||
//
|
||||
|
||||
#import "LinkMeModel.h"
|
||||
|
||||
@implementation LinkMeModel
|
||||
|
||||
@end
|
@@ -11,6 +11,7 @@
|
||||
<key>com.apple.developer.associated-domains</key>
|
||||
<array>
|
||||
<string>applinks:f02efc69cbad775287063e8ee37733a5.share2dlink.com</string>
|
||||
<string>applinks:ax4m.lkme.cc</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@@ -11,6 +11,7 @@
|
||||
<key>com.apple.developer.associated-domains</key>
|
||||
<array>
|
||||
<string>applinks:f02efc69cbad775287063e8ee37733a5.share2dlink.com</string>
|
||||
<string>applinks:ax4m.lkme.cc</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
Reference in New Issue
Block a user