Dangerous Modify: 移除 Firebase/Analytics lib; 移除埋点文件(不使用);移除部分不使用的 分享功能 相关代码;
@@ -10,7 +10,7 @@
|
||||
#import <UMCommon/UMCommon.h>
|
||||
#import <MobLinkPro/MobLink.h>
|
||||
#import <MobLinkPro/MLSDKScene.h>
|
||||
#import <FBSDKCoreKit/FBSDKCoreKit.h>
|
||||
//#import <FBSDKCoreKit/FBSDKCoreKit.h>
|
||||
#import "TabbarViewController.h"
|
||||
#import "BaseNavigationController.h"
|
||||
#import "AppDelegate+ThirdConfig.h"
|
||||
@@ -18,7 +18,7 @@
|
||||
#import <AppTrackingTransparency/AppTrackingTransparency.h>
|
||||
#import "ClientConfig.h"
|
||||
#import <GoogleSignIn/GoogleSignIn.h>
|
||||
#import "GULAppDelegateSwizzler.h"
|
||||
//#import "GULAppDelegateSwizzler.h"
|
||||
#import <GoogleSignIn/GoogleSignIn.h>
|
||||
#import "XPLoginViewController.h"
|
||||
#import "AccountModel.h"
|
||||
@@ -26,7 +26,7 @@
|
||||
#import "SessionViewController.h"
|
||||
#import "LoginFullInfoViewController.h"
|
||||
#import "UIView+VAP.h"
|
||||
@import Firebase;
|
||||
//@import Firebase;
|
||||
UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
|
||||
@interface AppDelegate ()<IMLSDKRestoreDelegate>
|
||||
@@ -91,8 +91,8 @@ void qg_VAP_Logger_handler(VAPLogLevel level, const char* file, int line, const
|
||||
[UMConfigure initWithAppkey:@"6434c6dfd64e686139618269"
|
||||
channel:@"appstore"];
|
||||
}
|
||||
[[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
|
||||
[FIRApp configure];
|
||||
// [[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
|
||||
// [FIRApp configure];
|
||||
[MobLink setDelegate:self];
|
||||
}
|
||||
|
||||
@@ -243,12 +243,12 @@ void qg_VAP_Logger_handler(VAPLogLevel level, const char* file, int line, const
|
||||
|
||||
}
|
||||
|
||||
if([url.absoluteString containsString:@"fb1266232494209868"]){
|
||||
return [[FBSDKApplicationDelegate sharedInstance] application:app
|
||||
openURL:url
|
||||
sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
|
||||
annotation:options[UIApplicationOpenURLOptionsAnnotationKey]];
|
||||
}
|
||||
// if([url.absoluteString containsString:@"fb1266232494209868"]){
|
||||
// return [[FBSDKApplicationDelegate sharedInstance] application:app
|
||||
// openURL:url
|
||||
// sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
|
||||
// annotation:options[UIApplicationOpenURLOptionsAnnotationKey]];
|
||||
// }
|
||||
|
||||
return [GIDSignIn.sharedInstance handleURL:url];
|
||||
}
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// FBSDKSettings+PISDKSettings.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by duoban on 2023/9/22.
|
||||
//
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKCoreKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface FBSDKSettings (PISDKSettings)
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// FBSDKSettings+PISDKSettings.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by duoban on 2023/9/22.
|
||||
//
|
||||
|
||||
#import "FBSDKSettings+PISDKSettings.h"
|
||||
#import "GULAppDelegateSwizzler.h"
|
||||
|
||||
|
||||
@implementation FBSDKSettings (PISDKSettings)
|
||||
///必须为FBSDKSettings添加setAutoLogAppEventsEnabled方法,不然分享时会闪退
|
||||
+(void)setAutoLogAppEventsEnabled:(BOOL)is{
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "monents_info_like_share@3x.png",
|
||||
"filename" : "组 1@3x (1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
BIN
YuMi/Assets.xcassets/20.20.50/luck_package_coin_button_selected.imageset/组 1@3x (1).png
vendored
Normal file
|
After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
BIN
YuMi/Assets.xcassets/20.20.50/luck_package_gift_button_normal.imageset/组 1@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 34 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "组 11@3x.png",
|
||||
"filename" : "组 1@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
21
YuMi/Assets.xcassets/20.20.50/luck_package_item_reduce.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "组 4 拷贝@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
YuMi/Assets.xcassets/20.20.50/luck_package_item_reduce.imageset/组 4 拷贝@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 695 B |
@@ -15,7 +15,7 @@
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
///Tool
|
||||
#import "TTPopup.h"
|
||||
#import "XPFirebbaseEvent.h"
|
||||
|
||||
///View
|
||||
#import "XPShareItemCell.h"
|
||||
#import "XPMineShareViewController.h"
|
||||
@@ -170,7 +170,7 @@
|
||||
self.shareInfo.shareType = item.type;
|
||||
|
||||
SSDKPlatformType platformType;
|
||||
XPPlatformType FBtype;
|
||||
|
||||
if (item.type == XPShareItemTagLine) {
|
||||
title = YMLocalizedString(@"XPShareView1");
|
||||
platformType = SSDKPlatformTypeLine;
|
||||
@@ -213,11 +213,6 @@
|
||||
switch (state) {
|
||||
case SSDKResponseStateSuccess:
|
||||
{
|
||||
if(self.isFromWebVeiw == NO){
|
||||
[XPFirebbaseEvent shareEventWithContentID:@(self.shareInfo.roomUid).stringValue type:FBtype];
|
||||
}else{
|
||||
[XPFirebbaseEvent shareEventWithContentID:self.shareInfo.uid type:FBtype];
|
||||
}
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:didSuccess:)]) {
|
||||
[self.delegate shareView:self didSuccess:self.shareInfo];
|
||||
}
|
||||
@@ -256,11 +251,6 @@
|
||||
[self.delegate shareView:self shareFail:YMLocalizedString(@"XPShareView6")];
|
||||
}
|
||||
} else {
|
||||
if(self.isFromWebVeiw == NO){
|
||||
[XPFirebbaseEvent shareEventWithContentID:@(self.shareInfo.roomUid).stringValue type:PlatformOfFB];
|
||||
}else{
|
||||
[XPFirebbaseEvent shareEventWithContentID:self.shareInfo.uid type:PlatformOfFB];
|
||||
}
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:didSuccess:)]) {
|
||||
[self.delegate shareView:self didSuccess:self.shareInfo];
|
||||
}
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
#import "ThirdUserInfo.h"
|
||||
#import "AccountModel.h"
|
||||
#import "DESEncrypt.h"
|
||||
//#import <FBSDKCoreKit/FBSDKCoreKit.h>
|
||||
//#import <FBSDKLoginKit/FBSDKLoginKit.h>
|
||||
|
||||
#import "YuMi-swift.h"
|
||||
#import "FeedBackConfigModel.h"
|
||||
|
||||
@@ -33,25 +32,7 @@
|
||||
- (instancetype)init{
|
||||
self = [super init];
|
||||
if(self){
|
||||
// [[NSNotificationCenter defaultCenter] addObserverForName:FBSDKProfileDidChangeNotification
|
||||
// object:nil
|
||||
// queue:[NSOperationQueue mainQueue]
|
||||
// usingBlock:
|
||||
// ^(NSNotification *notification) {
|
||||
// if ([FBSDKProfile currentProfile]) {
|
||||
// //获取当前用户名
|
||||
// [FBSDKProfile loadCurrentProfileWithCompletion:
|
||||
// ^(FBSDKProfile *profile, NSError *error) {
|
||||
// if (profile) {
|
||||
// dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||
// AccountInfoStorage *accountStorage = [AccountInfoStorage instance];
|
||||
// accountStorage.thirdUserInfo.userName = profile.name;
|
||||
// accountStorage.thirdUserInfo.avatarUrl = profile.imageURL.absoluteString;
|
||||
// });
|
||||
// }
|
||||
// }];
|
||||
// }
|
||||
// }];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -200,31 +181,7 @@
|
||||
}];
|
||||
}
|
||||
-(void)thirdLoginByFBWithPresentingViewController:(UIViewController *)presentingViewController {
|
||||
// [FBSDKProfile enableUpdatesOnAccessTokenChange:YES];
|
||||
// [FBSDKAccessToken setCurrentAccessToken:nil];
|
||||
// FBSDKLoginManager *manager = [[FBSDKLoginManager alloc] init];
|
||||
// [manager logOut];
|
||||
// [XNDJTDDLoadingTool showOnlyView:kWindow];
|
||||
// @kWeakify(self);
|
||||
// [manager logInWithPermissions:@[@"public_profile"]
|
||||
// fromViewController:presentingViewController
|
||||
// handler:^(FBSDKLoginManagerLoginResult * _Nullable result, NSError * _Nullable error) {
|
||||
// @kStrongify(self);
|
||||
// if (error) {
|
||||
// [XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
// [[self getView] showErrorToast:YMLocalizedString(@"LoginPresenter1")];
|
||||
// } else if (result.isCancelled) {
|
||||
// [XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
// [[self getView] showErrorToast:YMLocalizedString(@"LoginPresenter0")];
|
||||
// } else {
|
||||
// ThirdUserInfo * userInfo = [[ThirdUserInfo alloc] init];
|
||||
// userInfo.openid = result.token.userID;
|
||||
// userInfo.access_token = result.token.tokenString;
|
||||
// userInfo.unionid = result.token.userID;
|
||||
// [AccountInfoStorage instance].thirdUserInfo = userInfo;
|
||||
// [self loginWithThirdPartWithType:ThirdLoginType_FB];
|
||||
// }
|
||||
// }];
|
||||
|
||||
}
|
||||
-(void)thirdLoginByGoogleWithPresentingViewController:(UIViewController *)presentingViewController configuration:(GIDConfiguration *)configuration{
|
||||
@kWeakify(self);
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
///Tool
|
||||
#import "TTPopup.h"
|
||||
#import "XPShareView.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "Api+Moments.h"
|
||||
///Model
|
||||
@@ -20,7 +19,7 @@
|
||||
#import "XPWebViewController.h"
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
|
||||
@interface XPMomentsTooBarView ()<XCShareViewDelegate>
|
||||
@interface XPMomentsTooBarView ()
|
||||
///喜欢的容器
|
||||
@property (nonatomic,strong) UIView * likeView;
|
||||
///喜欢
|
||||
@@ -33,8 +32,7 @@
|
||||
@property (nonatomic,strong) UIButton *commentButton;
|
||||
///评论数
|
||||
@property (nonatomic,strong) UILabel *commentLabel;
|
||||
///分享
|
||||
@property (nonatomic,strong) UIButton *shareButton;
|
||||
|
||||
///分割线
|
||||
@property (nonatomic,strong) UIView * lineView;
|
||||
///举报
|
||||
@@ -84,7 +82,6 @@
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.likeView];
|
||||
[self addSubview:self.commentView];
|
||||
[self addSubview:self.shareButton];
|
||||
[self addSubview:self.lineView];
|
||||
[self addSubview:self.reportButton];
|
||||
|
||||
@@ -132,12 +129,6 @@
|
||||
make.trailing.equalTo(self.commentView);
|
||||
}];
|
||||
|
||||
[self.shareButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.centerY.equalTo(self.likeView);
|
||||
make.leading.mas_equalTo(self.commentView.mas_trailing).mas_offset(5);
|
||||
}];
|
||||
|
||||
|
||||
[self.reportButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(self).offset(-12);
|
||||
make.centerY.mas_equalTo(self.commentView);
|
||||
@@ -180,11 +171,6 @@
|
||||
make.centerY.mas_equalTo(self.commentView);
|
||||
make.trailing.equalTo(self.commentView);
|
||||
}];
|
||||
|
||||
[self.shareButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.centerY.equalTo(self.likeView);
|
||||
make.leading.mas_equalTo(self.commentView.mas_trailing).mas_offset(5);
|
||||
}];
|
||||
|
||||
[self.reportButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(self).offset(-18);
|
||||
@@ -291,54 +277,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)shareButtonAction:(UIButton *)sender {
|
||||
XPShareItem *cycle = [XPShareItem itemWitTag:XPShareItemTagFaceBook title:@"FaceBook" imageName:@"share_fb" disableImageName:@"share_fb"];
|
||||
XPShareItem *wechat = [XPShareItem itemWitTag:XPShareItemTagLine title:@"Line" imageName:@"share_line" disableImageName:@"share_line"];
|
||||
XPShareItem *qq = [XPShareItem itemWitTag:XPShareItemTagCopyLink title:YMLocalizedString(@"RoomHeaderView3") imageName:@"share_copy_link" disableImageName:@"share_copy_link"];
|
||||
NSArray * items = @[wechat,cycle, qq];
|
||||
CGFloat margin = 15;
|
||||
CGSize itemSize = CGSizeMake((KScreenWidth-2*margin)/4, 65);
|
||||
XPShareInfoModel * shareInfo = [[XPShareInfoModel alloc] init];
|
||||
NSString * title= self.momentsInfo.nick;
|
||||
if (self.momentsInfo.nick.length > 6) {
|
||||
title = [title substringToIndex:6];
|
||||
}
|
||||
shareInfo.nick = title;
|
||||
shareInfo.content = self.momentsInfo.content;
|
||||
shareInfo.imageUrl = self.momentsInfo.avatar;
|
||||
shareInfo.shareTitle = [NSString stringWithFormat:YMLocalizedString(@"XPMonentsTooBarView7"), title];
|
||||
shareInfo.shareContent = self.momentsInfo.content;
|
||||
shareInfo.shareImageUrl = self.momentsInfo.avatar;
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString *urlStr = [NSString stringWithFormat:@"%@/%@?uid=%@&dynamicId=%@&worldId=%ld",[HttpRequestHelper getHostUrl], URLWithType(kMonentsShareURL), uid, self.momentsInfo.dynamicId, self.momentsInfo.worldId];
|
||||
shareInfo.shareUrl = urlStr;
|
||||
shareInfo.dynamicId = self.momentsInfo.dynamicId;
|
||||
shareInfo.uid = self.momentsInfo.uid;
|
||||
shareInfo.worldId = [NSString stringWithFormat:@"%ld", self.momentsInfo.worldId];
|
||||
XPShareView *shareView = [[XPShareView alloc] initWithItems:items itemSize:itemSize shareInfo:shareInfo];
|
||||
shareView.delegate = self;
|
||||
[TTPopup popupView:shareView style:TTPopupStyleActionSheet];
|
||||
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - #pragma mark - XCShareViewDelegate
|
||||
- (void)shareView:(XPShareView *)shareView shareFail:(NSString *)message {
|
||||
[TTPopup dismiss];
|
||||
[XNDJTDDLoadingTool showErrorWithMessage:message];
|
||||
}
|
||||
|
||||
- (void)shareView:(XPShareView *)shareView didSuccess:(XPShareInfoModel *)shareInfo{
|
||||
[Api userShareMoments:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
|
||||
} dynamicId:shareInfo.dynamicId uid:shareInfo.uid worldId:shareInfo.worldId shareUid:[AccountInfoStorage instance].getUid];
|
||||
[TTPopup dismiss];
|
||||
}
|
||||
|
||||
- (void)shareViewDidClickCancel:(XPShareView *)shareView {
|
||||
[TTPopup dismiss];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setMomentsInfo:(MomentsInfoModel *)monentsInfo {
|
||||
_momentsInfo = monentsInfo;
|
||||
@@ -407,17 +345,6 @@
|
||||
return _commentLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)shareButton {
|
||||
if (!_shareButton) {
|
||||
_shareButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_shareButton setImage:[UIImage imageNamed:@"monents_info_like_share"] forState:UIControlStateNormal];
|
||||
[_shareButton setImage:[UIImage imageNamed:@"monents_info_like_share"] forState:UIControlStateSelected];
|
||||
[_shareButton addTarget:self action:@selector(shareButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
_shareButton.hidden = YES;
|
||||
}
|
||||
return _shareButton;
|
||||
}
|
||||
|
||||
- (UIView *)lineView {
|
||||
if (!_lineView) {
|
||||
_lineView = [[UIView alloc] init];
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// LuckyPackageLogicManager.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2025/2/7.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LuckyPackageLogicManager : NSObject
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// LuckyPackageLogicManager.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2025/2/7.
|
||||
//
|
||||
|
||||
#import "LuckyPackageLogicManager.h"
|
||||
|
||||
@implementation LuckyPackageLogicManager
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// LuckyPackagePresenter.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2025/2/7.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LuckyPackagePresenter : BaseMvpPresenter
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// LuckyPackagePresenter.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2025/2/7.
|
||||
//
|
||||
|
||||
#import "LuckyPackagePresenter.h"
|
||||
|
||||
@implementation LuckyPackagePresenter
|
||||
|
||||
@end
|
||||
@@ -12,7 +12,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RoomHeaderView : UIView<RoomGuestDelegate>
|
||||
- (void)showSharePanel;
|
||||
|
||||
- (void)updateLevel:(NSString *)levelIcon;
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#import "MicroQueueModel.h"
|
||||
#import "XPRoomRecommendModel.h"
|
||||
///View
|
||||
#import "XPShareView.h"
|
||||
#import "XPRoomTopicAlertView.h"
|
||||
#import "XPRoomRecommendView.h"
|
||||
///VC
|
||||
@@ -40,7 +39,7 @@
|
||||
#import "XPRoomTopicViewController.h"
|
||||
|
||||
|
||||
@interface RoomHeaderView ()<XCShareViewDelegate, XPRoomRecommendViewDelegate>
|
||||
@interface RoomHeaderView ()<XPRoomRecommendViewDelegate>
|
||||
///容器
|
||||
@property (nonatomic,strong) UIStackView *nickStackView;
|
||||
///
|
||||
@@ -60,8 +59,6 @@
|
||||
@property (nonatomic,strong) YYLabel *idLabel;
|
||||
///收藏
|
||||
@property (nonatomic,strong) UIButton *collectButton;
|
||||
///分享
|
||||
@property (nonatomic,strong) UIButton *shareButton;
|
||||
///设置
|
||||
@property (nonatomic,strong) UIButton *settingButton;
|
||||
///话题设置
|
||||
@@ -93,10 +90,6 @@
|
||||
[self.hostDelegate miniRoom];
|
||||
}
|
||||
|
||||
- (void)shareButtonAction:(UIButton *)sender{
|
||||
[self showSharePanel];
|
||||
}
|
||||
|
||||
- (void)settingButtonAction:(UIButton *)sender {
|
||||
self.recommendRoomView.frame = CGRectMake(KScreenWidth, 0, 250, KScreenHeight);
|
||||
FFPopup *popup = [FFPopup popupWithContentView:self.recommendRoomView];
|
||||
@@ -159,7 +152,6 @@
|
||||
[self addSubview:self.nickStackView];
|
||||
[self addSubview:self.collectButton];
|
||||
|
||||
[self addSubview:self.shareButton];
|
||||
[self addSubview:self.settingButton];
|
||||
[self addSubview:self.topicButton];
|
||||
[self addSubview:self.backBtn];
|
||||
@@ -188,12 +180,6 @@
|
||||
make.bottom.mas_equalTo(-11);
|
||||
make.width.height.mas_equalTo(22);
|
||||
}];
|
||||
|
||||
[self.shareButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.equalTo(self.settingButton.mas_leading).offset(-15);
|
||||
make.centerY.mas_equalTo(self.settingButton);
|
||||
make.width.height.mas_equalTo(22);
|
||||
}];
|
||||
|
||||
[self.collectButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.equalTo(self.settingButton);
|
||||
@@ -280,55 +266,7 @@
|
||||
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)showSharePanel {
|
||||
XPShareItem *cycle = [XPShareItem itemWitTag:XPShareItemTagFaceBook title:@"FaceBook" imageName:@"share_fb" disableImageName:@"share_fb"];
|
||||
XPShareItem *wechat = [XPShareItem itemWitTag:XPShareItemTagLine title:@"Line" imageName:@"share_line" disableImageName:@"share_line"];
|
||||
XPShareItem *qq = [XPShareItem itemWitTag:XPShareItemTagCopyLink title:YMLocalizedString(@"RoomHeaderView3") imageName:@"share_copy_link" disableImageName:@"share_copy_link"];
|
||||
NSArray * items = @[wechat,cycle, qq];
|
||||
RoomInfoModel * roomInfo = [self.hostDelegate getRoomInfo];
|
||||
XPShareInfoModel * shareInfo = [[XPShareInfoModel alloc] init];
|
||||
shareInfo.shareTitle = YMLocalizedString(@"RoomHeaderView4");
|
||||
shareInfo.shareContent = YMLocalizedString(@"RoomHeaderView5");
|
||||
shareInfo.shareImageUrl = [self.hostDelegate getRoomInfo].avatar;
|
||||
shareInfo.type = ShareType_Room;
|
||||
shareInfo.roomUid = roomInfo.uid;
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * urlString = [NSString stringWithFormat:@"%@/%@?shareUid=%@&uid=%ld&room_name=%@&room_id=%ld&room_avatar=%@&share_name=%@",[HttpRequestHelper getHostUrl],URLWithType(kShareRoomURL),uid,roomInfo.uid,roomInfo.title,roomInfo.erbanNo,roomInfo.avatar,roomInfo.nick];
|
||||
|
||||
shareInfo.shareUrl = urlString;
|
||||
CGFloat margin = 15;
|
||||
CGSize itemSize = CGSizeMake((KScreenWidth-2*margin)/4, 65);
|
||||
XPShareView *shareView = [[XPShareView alloc] initWithItems:items itemSize:itemSize shareInfo:shareInfo];
|
||||
shareView.delegate = self;
|
||||
[TTPopup popupView:shareView style:TTPopupStyleActionSheet];
|
||||
}
|
||||
|
||||
///保存一下分享的内容的 不需要处理错误码
|
||||
- (void)saveShare:(XPShareInfoModel *)shareInfo {
|
||||
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
||||
NSString *uid = [AccountInfoStorage instance].getUid;
|
||||
NSString *ticket = [AccountInfoStorage instance].getTicket;
|
||||
[params setObject:uid forKey:@"uid"];
|
||||
[params setObject:@(shareInfo.shareType) forKey:@"shareType"];
|
||||
[params setObject:ticket forKey:@"ticket"];
|
||||
[params setObject:@(shareInfo.type) forKey:@"sharePageId"];
|
||||
if (shareInfo.shareUrl.length > 0) {
|
||||
[params setObject:shareInfo.shareUrl forKey:@"shareUrl"];
|
||||
}
|
||||
if (shareInfo.roomUid > 0) {
|
||||
[params setObject:@(shareInfo.roomUid) forKey:@"targetUid"];
|
||||
}
|
||||
[HttpRequestHelper POST:@"usershare/save" params:params success:^(BaseModel * _Nonnull data) {
|
||||
NSLog(@"%@",data);
|
||||
} failure:^(NSInteger resCode, NSString * _Nonnull message) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)collectButtonAction:(UIButton *)sender {
|
||||
|
||||
|
||||
|
||||
NSString * type = self.collectButton.selected ? @"2" : @"1";
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
|
||||
@@ -368,45 +306,6 @@
|
||||
} roomUid:roomUid uid:uid type:type roomUids:nil];
|
||||
}
|
||||
|
||||
#pragma mark - XCShareViewDelegate
|
||||
- (void)shareView:(XPShareView *)shareView shareFail:(NSString *)message {
|
||||
[TTPopup dismiss];
|
||||
[XNDJTDDLoadingTool showErrorWithMessage:message];
|
||||
}
|
||||
|
||||
- (void)shareView:(XPShareView *)shareView didSuccess:(XPShareInfoModel *)shareInfo{
|
||||
[TTPopup dismiss];
|
||||
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"RoomHeaderView7")];
|
||||
AttachmentModel * attachMent = [[AttachmentModel alloc] init];
|
||||
attachMent.first = CustomMessageType_Room_Tip;
|
||||
attachMent.second = Custom_Message_Sub_Room_Tip_ShareRoom;
|
||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
[dic setValue:uid forKey:@"uid"];
|
||||
NSMutableDictionary * userDic = [NSMutableDictionary dictionary];
|
||||
UserInfoModel * userInfo = [self.hostDelegate getUserInfo];
|
||||
RoomInfoModel * roomInfo = [self.hostDelegate getRoomInfo];
|
||||
[userDic setValue:roomInfo.nick.length > 0 ? roomInfo.nick : @"" forKey:@"targetNick"];
|
||||
[userDic setValue:@(roomInfo.uid) forKey:@"targetUid"];
|
||||
[userDic setValue:userInfo.nick.length > 0 ? userInfo.nick : @"" forKey:@"nick"];
|
||||
[dic setValue:userDic forKey:@"data"];
|
||||
attachMent.data = dic;
|
||||
NSString *sessionID = [NSString stringWithFormat:@"%ld", [self.hostDelegate getRoomInfo].roomId];
|
||||
|
||||
NIMMessage *message = [[NIMMessage alloc]init];
|
||||
NIMCustomObject *object = [[NIMCustomObject alloc] init];
|
||||
object.attachment = attachMent;
|
||||
message.messageObject = object;
|
||||
//构造会话
|
||||
NIMSession *session = [NIMSession session:sessionID type:NIMSessionTypeChatroom];
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session error:nil];
|
||||
///上报一下
|
||||
[self saveShare:shareInfo];
|
||||
}
|
||||
|
||||
- (void)shareViewDidClickCancel:(XPShareView *)shareView {
|
||||
[TTPopup dismiss];
|
||||
}
|
||||
|
||||
#pragma mark - XPRoomRecommendViewDelegate
|
||||
- (void)xPRoomRecommendViewReport {
|
||||
@@ -443,17 +342,6 @@
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (UIButton *)shareButton {
|
||||
if(!_shareButton){
|
||||
_shareButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_shareButton setImage:[UIImage imageNamed:@"room_info_share"] forState:UIControlStateNormal];
|
||||
[_shareButton addTarget:self action:@selector(shareButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_shareButton setEnlargeEdgeWithTop:8 right:8 bottom:8 left:8];
|
||||
_shareButton.hidden = YES;
|
||||
}
|
||||
return _shareButton;
|
||||
}
|
||||
|
||||
- (UIButton *)settingButton {
|
||||
if (!_settingButton) {
|
||||
_settingButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
|
||||
@@ -299,7 +299,6 @@ XPCandyTreeInsufficientBalanceViewDelegate>
|
||||
[XPSkillCardPlayerManager shareInstance].isInRoom = NO;
|
||||
[XPSkillCardPlayerManager shareInstance].roomUid = @"";
|
||||
|
||||
|
||||
if([[XPRoomMiniManager shareManager] getRoomInfo]==nil){
|
||||
[XPSkillCardPlayerManager shareInstance].isMineInMic = NO;
|
||||
}
|
||||
@@ -482,7 +481,7 @@ XPCandyTreeInsufficientBalanceViewDelegate>
|
||||
if(type == 2){
|
||||
[self.messageContainerView showUserCard:userId];
|
||||
}else if (type == 3){
|
||||
[self.roomHeaderView showSharePanel];
|
||||
// [self.roomHeaderView showSharePanel];
|
||||
}else if (type == 4){
|
||||
NSString *scrolling = redPacketDic[@"scrolling"];
|
||||
[self.menuContainerView showInputView:scrolling];
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
//
|
||||
// XPEventHandle.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by duoban on 2022/12/5.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPEventHandle : NSObject
|
||||
///埋点时必传参数
|
||||
+(NSMutableDictionary *)getCommonAttributes;
|
||||
///首页板块点击,1=搜索,2=创建房间,3=排行榜,4=分类导航;5=热门房间,6=banner轮播;7=扩列聊天-用户房间;8=扩列聊天-创建普通房;9=扩列聊天-创建游戏房;10=房间派对;11=菜单栏-首页;12=菜单栏-论坛;13=菜单栏-消息;14=菜单栏-我的
|
||||
+(void)homeClickEventWithType:(NSString *)type;
|
||||
///导航栏tab板块点击,6=推荐,1=女神,2=男神,7=点唱;8=娱乐,3=开黑;4=交友;5=小游戏;
|
||||
+(void)homeTabClickEventWithType:(NSString *)type;
|
||||
///登录协议弹框展示
|
||||
+(void)loginAgreementShowEvent;
|
||||
///登录协议点击,type,1=用户协议,2=隐私协议,3=同意, page,1=隐私协议与用户协议弹框,2=账号注册
|
||||
+(void)loginAgreementClickEventWithWindowType:(NSString *)type;
|
||||
///登录协议点击,type,1=用户协议,2=隐私协议,3=同意, page,1=隐私协议与用户协议弹框,2=账号注册
|
||||
+(void)loginAgreementClickEventWithType:(NSString *)type;
|
||||
///发起登录,1=Facebook登录,2=LINE登录,3=Google登录,4=手机号登录;5=ID登录(其他方式);
|
||||
+(void)loginRequestEventWithType:(NSString *)type;
|
||||
///登录结果,type,1=Facebook登录,2=LINE登录,3=Google登录,4=手机号登录;5=ID登录(其他方式);result,0=失败,1=成功, failDetail,将具体失败原因上报
|
||||
+(void)loginResultEventWithType:(NSString *)type result:(NSString *)result failDetail:(NSString *_Nullable)failDetail;
|
||||
///首次启动
|
||||
+(void)activateFirstEvent;
|
||||
///登录点击,1=Facebook登录,2=LINE登录,3=Google登录,4=手机号登录;5=ID登录(其他方式);
|
||||
+(void)loginClickEventWithType:(NSString *)type;
|
||||
///登录页面展示
|
||||
+(void)loginShowEvent;
|
||||
///根据点击充值的入口上报,type,=房间内背包的充值入口,2=房间内赠送礼物时余额不足的充值入口,3=房间内VIPicon的充值入口;个人中心的充值入口,4=VIP中心的充值入口,5=星级厨房的充值入口;6=寻找小精灵的充值入口;7=寻爱之旅的充值入口;8=私聊送礼的充值入口,balance,返回用户具体余额
|
||||
+(void)payPageShowEventWithType:(NSString *)type balance:(NSString *)balance;
|
||||
///点击确认支付按钮,money,金额
|
||||
+(void)payClickEventWithMoney:(NSString *)money;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,161 +0,0 @@
|
||||
//
|
||||
// XPEventHandle.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by duoban on 2022/12/5.
|
||||
//
|
||||
|
||||
#import "XPEventHandle.h"
|
||||
#import "XPFirebbaseEvent.h"
|
||||
#import "XPEventHead.h"
|
||||
static NSString *const isHaveWindow = @"0";
|
||||
|
||||
|
||||
@implementation XPEventHandle
|
||||
///埋点时必传参数
|
||||
+(NSMutableDictionary *)getCommonAttributes{
|
||||
NSString *timeSp = [NSString stringWithFormat:@"%ld", (long)[[NSDate date] timeIntervalSince1970] * 1000];
|
||||
return [NSMutableDictionary dictionaryWithDictionary:@{
|
||||
@"when":timeSp,
|
||||
@"uid":[AccountInfoStorage instance].getUid ?: @"",
|
||||
@"channel":[YYUtility appName],
|
||||
@"appv":[YYUtility appVersion]
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - 埋点
|
||||
///首页板块点击,1=搜索,2=创建房间,3=排行榜,4=分类导航;5=热门房间,6=banner轮播;7=扩列聊天-用户房间;8=扩列聊天-创建普通房;9=扩列聊天-创建游戏房;10=房间派对;11=菜单栏-首页;12=菜单栏-论坛;13=菜单栏-消息;14=菜单栏-我的
|
||||
+(void)homeClickEventWithType:(NSString *)type{
|
||||
NSMutableDictionary *attributes = [XPEventHandle getCommonAttributes];
|
||||
[attributes setValue:kMoliStarHomepage forKey:kModule];
|
||||
[attributes setValue:type forKey:kHomepageType];
|
||||
[XPFirebbaseEvent event:kModuleHomepageClick attributes:attributes];
|
||||
[XPEventHandle showWindowWtihText:[NSString stringWithFormat:@"埋点事件\n%@\n埋点参数\n%@",kModuleHomepageClick,[attributes mj_JSONString]]];
|
||||
|
||||
}
|
||||
///导航栏tab板块点击,1=推荐,2=女神,3=男神,4=点唱;5=娱乐,6=开黑;7=交友;8=小游戏;
|
||||
+(void)homeTabClickEventWithType:(NSString *)type{
|
||||
NSMutableDictionary *attributes = [XPEventHandle getCommonAttributes];
|
||||
[attributes setValue:kMoliStarHomepage forKey:kModule];
|
||||
[attributes setValue:type forKey:kHomepageTab];
|
||||
[XPFirebbaseEvent event:kTabHomepageClick attributes:attributes];
|
||||
[XPEventHandle showWindowWtihText:[NSString stringWithFormat:@"埋点事件\n%@\n埋点参数\n%@",kTabHomepageClick,[attributes mj_JSONString]]];
|
||||
|
||||
}
|
||||
///登录协议弹框展示
|
||||
+(void)loginAgreementShowEvent{
|
||||
NSMutableDictionary *attributes = [XPEventHandle getCommonAttributes];
|
||||
[attributes setValue:kMoliStarLogin forKey:kModule];
|
||||
[XPFirebbaseEvent event:kAgreementShow attributes:attributes];
|
||||
[XPEventHandle showWindowWtihText:[NSString stringWithFormat:@"埋点事件\n%@\n埋点参数\n%@",kAgreementShow,[attributes mj_JSONString]]];
|
||||
|
||||
|
||||
}
|
||||
///登录协议点击,type,1=用户协议,2=隐私协议,3=同意, page,1=隐私协议与用户协议弹框,2=账号注册
|
||||
+(void)loginAgreementClickEventWithWindowType:(NSString *)type{
|
||||
NSMutableDictionary *attributes = [XPEventHandle getCommonAttributes];
|
||||
[attributes setValue:kMoliStarLogin forKey:kModule];
|
||||
[attributes setValue:type forKey:kClickType];
|
||||
[attributes setValue:@"1" forKey:kPage];
|
||||
[XPFirebbaseEvent event:KAgreementClick attributes:attributes];
|
||||
[XPEventHandle showWindowWtihText:[NSString stringWithFormat:@"埋点事件\n%@\n埋点参数\n%@",KAgreementClick,[attributes mj_JSONString]]];
|
||||
|
||||
|
||||
}
|
||||
///登录协议点击,type,1=用户协议,2=隐私协议,3=同意, page,1=隐私协议与用户协议弹框,2=账号注册
|
||||
+(void)loginAgreementClickEventWithType:(NSString *)type{
|
||||
NSMutableDictionary *attributes = [XPEventHandle getCommonAttributes];
|
||||
[attributes setValue:kMoliStarLogin forKey:kModule];
|
||||
[attributes setValue:type forKey:kClickType];
|
||||
[attributes setValue:@"2" forKey:kPage];
|
||||
[XPFirebbaseEvent event:KAgreementClick attributes:attributes];
|
||||
[XPEventHandle showWindowWtihText:[NSString stringWithFormat:@"埋点事件\n%@\n埋点参数\n%@",KAgreementClick,[attributes mj_JSONString]]];
|
||||
|
||||
|
||||
}
|
||||
///发起登录,1=Facebook登录,2=LINE登录,3=Google登录,4=手机号登录;5=ID登录(其他方式);
|
||||
+(void)loginRequestEventWithType:(NSString *)type{
|
||||
NSMutableDictionary *attributes = [XPEventHandle getCommonAttributes];
|
||||
[attributes setValue:kMoliStarLogin forKey:kModule];
|
||||
[attributes setValue:type forKey:kLoginType];
|
||||
[XPFirebbaseEvent event:kLoginRequest attributes:attributes];
|
||||
[XPEventHandle showWindowWtihText:[NSString stringWithFormat:@"埋点事件\n%@\n埋点参数\n%@",kLoginRequest,[attributes mj_JSONString]]];
|
||||
|
||||
|
||||
}
|
||||
///登录结果,type,1=Facebook登录,2=LINE登录,3=Google登录,4=手机号登录;5=ID登录(其他方式);result,0=失败,1=成功, failDetail,将具体失败原因上报
|
||||
+(void)loginResultEventWithType:(NSString *)type result:(NSString *)result failDetail:(NSString * _Nullable)failDetail{
|
||||
NSMutableDictionary *attributes = [XPEventHandle getCommonAttributes];
|
||||
[attributes setValue:kMoliStarLogin forKey:kModule];
|
||||
[attributes setValue:type forKey:kLoginType];
|
||||
[attributes setValue:result forKey:kResult];
|
||||
if(failDetail != nil){
|
||||
[attributes setValue:failDetail forKey:kFailDetail];
|
||||
}
|
||||
[XPFirebbaseEvent event:kLoginResult attributes:attributes];
|
||||
[XPEventHandle showWindowWtihText:[NSString stringWithFormat:@"埋点事件\n%@\n埋点参数\n%@",kLoginResult,[attributes mj_JSONString]]];
|
||||
|
||||
|
||||
}
|
||||
///首次启动
|
||||
+(void)activateFirstEvent{
|
||||
NSMutableDictionary *attributes = [XPEventHandle getCommonAttributes];
|
||||
[attributes setValue:kMoliStarActivate forKey:kModule];
|
||||
[XPFirebbaseEvent event:kFirstActivate attributes:attributes];
|
||||
[XPEventHandle showWindowWtihText:[NSString stringWithFormat:@"埋点事件\n%@\n埋点参数\n%@",kFirstActivate,[attributes mj_JSONString]]];
|
||||
|
||||
|
||||
}
|
||||
///登录点击,1=Facebook登录,2=LINE登录,3=Google登录,4=手机号登录;5=ID登录(其他方式);
|
||||
+(void)loginClickEventWithType:(NSString *)type{
|
||||
NSMutableDictionary *attributes = [XPEventHandle getCommonAttributes];
|
||||
[attributes setValue:kMoliStarLogin forKey:kModule];
|
||||
[attributes setValue:type forKey:kClickType];
|
||||
[XPFirebbaseEvent event:kLoginClick attributes:attributes];
|
||||
[XPEventHandle showWindowWtihText:[NSString stringWithFormat:@"埋点事件\n%@\n埋点参数\n%@",kLoginClick,[attributes mj_JSONString]]];
|
||||
|
||||
|
||||
}
|
||||
///登录页面展示
|
||||
+(void)loginShowEvent{
|
||||
NSMutableDictionary *attributes = [XPEventHandle getCommonAttributes];
|
||||
[attributes setValue:kMoliStarLogin forKey:kModule];
|
||||
[XPFirebbaseEvent event:kLoginShow attributes:attributes];
|
||||
[XPEventHandle showWindowWtihText:[NSString stringWithFormat:@"埋点事件\n%@\n埋点参数\n%@",kLoginShow,[attributes mj_JSONString]]];
|
||||
|
||||
|
||||
}
|
||||
///根据点击充值的入口上报,type,=房间内背包的充值入口,2=房间内赠送礼物时余额不足的充值入口,3=房间内VIPicon的充值入口;个人中心的充值入口,4=VIP中心的充值入口,5=星级厨房的充值入口;6=寻找小精灵的充值入口;7=寻爱之旅的充值入口;8=私聊送礼的充值入口,balance,返回用户具体余额
|
||||
+(void)payPageShowEventWithType:(NSString *)type balance:(NSString *)balance{
|
||||
NSMutableDictionary *attributes = [XPEventHandle getCommonAttributes];
|
||||
[attributes setValue:kMoliStarPay forKey:kModule];
|
||||
[attributes setValue:type forKey:kPaypageType];
|
||||
[attributes setValue:balance forKey:kAccountBalance];
|
||||
[XPFirebbaseEvent event:kPaypageShow attributes:attributes];
|
||||
[XPEventHandle showWindowWtihText:[NSString stringWithFormat:@"埋点事件\n%@\n埋点参数\n%@",kPaypageShow,[attributes mj_JSONString]]];
|
||||
|
||||
}
|
||||
///点击确认支付按钮,money,金额
|
||||
+(void)payClickEventWithMoney:(NSString *)money{
|
||||
NSMutableDictionary *attributes = [XPEventHandle getCommonAttributes];
|
||||
[attributes setValue:kMoliStarPay forKey:kModule];
|
||||
[attributes setValue:money forKey:kMoney];
|
||||
[XPFirebbaseEvent event:kPayClick attributes:attributes];
|
||||
[XPEventHandle showWindowWtihText:[NSString stringWithFormat:@"埋点事件\n%@\n埋点参数\n%@",kPayClick,[attributes mj_JSONString]]];
|
||||
|
||||
}
|
||||
|
||||
+(void)showWindowWtihText:(NSString *)text{
|
||||
if([isHaveWindow isEqualToString:@"1"]){
|
||||
TTAlertConfig *config = [[TTAlertConfig alloc]init];
|
||||
config.message = text;
|
||||
config.actionStyle = TTAlertActionConfirmStyle;
|
||||
[TTPopup alertWithConfig:config showBorder:NO confirmHandler:^{
|
||||
|
||||
} cancelHandler:^{
|
||||
|
||||
}];
|
||||
}
|
||||
}
|
||||
@end
|
||||
@@ -1,62 +0,0 @@
|
||||
//
|
||||
// XPEventHead.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by duoban on 2022/12/2.
|
||||
//
|
||||
|
||||
#ifndef XPEventHead_h
|
||||
#define XPEventHead_h
|
||||
///AdjustE注册事件
|
||||
static NSString *const RegisterEvent = @"enx4lp";
|
||||
static NSString *const LoginEvent = @"eyxpri";
|
||||
///Firebbase
|
||||
//facebook
|
||||
static NSString *const facebook = @"fb";
|
||||
//line
|
||||
static NSString *const line = @"line";
|
||||
//google
|
||||
static NSString *const google = @"google";
|
||||
//id
|
||||
static NSString *const userId = @"id";
|
||||
//手机
|
||||
static NSString *const phone = @"phone";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///埋点事件
|
||||
static NSString *const kFirstActivate = @"activate_first";
|
||||
static NSString *const kAgreementShow = @"agreement_show";
|
||||
static NSString *const KAgreementClick = @"agreement_click";
|
||||
static NSString *const kLoginShow = @"login_show";
|
||||
static NSString *const kLoginClick = @"login_click";
|
||||
static NSString *const kLoginRequest = @"login_request";
|
||||
static NSString *const kLoginResult = @"login_result";
|
||||
static NSString *const kModuleHomepageClick = @"module_homepage_click";
|
||||
static NSString *const kTabHomepageClick = @"tab_homepage_click";
|
||||
static NSString *const kPaypageShow = @"paypage_show";
|
||||
static NSString *const kPayClick = @"pay_click";
|
||||
|
||||
///事件参数key
|
||||
static NSString *const kModule = @"module";
|
||||
static NSString *const kClickType = @"click_type";
|
||||
static NSString *const kPage = @"page";
|
||||
static NSString *const kLoginType = @"login_type";
|
||||
static NSString *const kResult = @"result";
|
||||
static NSString *const kFailDetail = @"fail_detail";
|
||||
static NSString *const kHomepageType = @"homepage_type";
|
||||
static NSString *const kHomepageTab = @"homepage_tab";
|
||||
static NSString *const kPaypageType = @"paypage_type";
|
||||
static NSString *const kAccountBalance = @"account_balance";
|
||||
static NSString *const kFristMoliStarActivate = @"kFristMoliStarActivate";
|
||||
static NSString *const kMoney = @"money";
|
||||
|
||||
///事件参数value
|
||||
static NSString *const kMoliStarActivate = @"MoliStar_activate";
|
||||
static NSString *const kMoliStarLogin = @"MoliStar_login";
|
||||
static NSString *const kMoliStarHomepage = @"MoliStar_homepage";
|
||||
static NSString *const kMoliStarPay = @"MoliStar_pay";
|
||||
|
||||
#endif /* XPEventHead_h */
|
||||
@@ -1,36 +0,0 @@
|
||||
//
|
||||
// XPFirebbaseEvent.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by duoban on 2022/11/10.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
typedef enum : NSUInteger {
|
||||
PlatformOfFB = 1,
|
||||
PlatformOfLine,
|
||||
PlatformOfGoogle,
|
||||
PlatformOfID,
|
||||
PlatFormOfPhone,
|
||||
} XPPlatformType;
|
||||
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPFirebbaseEvent : NSObject
|
||||
///注册事件
|
||||
+(void)registeringEventWithType:(XPPlatformType)type;
|
||||
///登录事件
|
||||
+(void)loginEventWithType:(XPPlatformType)type;
|
||||
///分享事件事件
|
||||
+(void)shareEventWithContentID:(NSString *)contentID type:(XPPlatformType)type;
|
||||
///埋点事件
|
||||
+(void)event:(NSString *)eventId attributes:(NSDictionary *)attributes;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,127 +0,0 @@
|
||||
//
|
||||
// XPFirebbaseEvent.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by duoban on 2022/11/10.
|
||||
//
|
||||
|
||||
#import "XPFirebbaseEvent.h"
|
||||
#import <Firebase/Firebase.h>
|
||||
#import "XPEventHead.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@implementation XPFirebbaseEvent
|
||||
|
||||
|
||||
+(void)registeringEventWithType:(XPPlatformType)type{
|
||||
NSString *platform = @"";
|
||||
switch (type) {
|
||||
case PlatformOfFB:
|
||||
{
|
||||
platform = facebook;
|
||||
break;
|
||||
}
|
||||
case PlatformOfLine:
|
||||
{
|
||||
platform = line;
|
||||
break;
|
||||
}
|
||||
case PlatformOfID:
|
||||
{
|
||||
platform = userId;
|
||||
break;
|
||||
}
|
||||
case PlatFormOfPhone:
|
||||
{
|
||||
platform = phone;
|
||||
}
|
||||
default:
|
||||
{
|
||||
platform = google;
|
||||
break;
|
||||
}
|
||||
}
|
||||
[FIRAnalytics logEventWithName:kFIREventSignUp
|
||||
parameters:@{
|
||||
kFIRParameterMethod: platform
|
||||
}];
|
||||
|
||||
}
|
||||
+(void)loginEventWithType:(XPPlatformType)type{
|
||||
NSString *platform = @"";
|
||||
switch (type) {
|
||||
case PlatformOfFB:
|
||||
{
|
||||
platform = facebook;
|
||||
break;
|
||||
}
|
||||
case PlatformOfLine:
|
||||
{
|
||||
platform = line;
|
||||
break;
|
||||
}
|
||||
case PlatformOfID:
|
||||
{
|
||||
platform = userId;
|
||||
break;
|
||||
}
|
||||
case PlatFormOfPhone:
|
||||
{
|
||||
platform = phone;
|
||||
}
|
||||
default:
|
||||
{
|
||||
platform = google;
|
||||
break;
|
||||
}
|
||||
}
|
||||
[FIRAnalytics logEventWithName:kFIREventLogin
|
||||
parameters:@{
|
||||
kFIRParameterMethod: platform
|
||||
}];
|
||||
}
|
||||
+(void)shareEventWithContentID:(NSString *)contentID type:(XPPlatformType)type{
|
||||
NSString *platform = @"";
|
||||
switch (type) {
|
||||
case PlatformOfFB:
|
||||
{
|
||||
platform = facebook;
|
||||
break;
|
||||
}
|
||||
case PlatformOfLine:
|
||||
{
|
||||
platform = line;
|
||||
break;
|
||||
}
|
||||
case PlatformOfID:
|
||||
{
|
||||
platform = userId;
|
||||
break;
|
||||
}
|
||||
case PlatFormOfPhone:
|
||||
{
|
||||
platform = phone;
|
||||
}
|
||||
default:
|
||||
{
|
||||
platform = google;
|
||||
break;
|
||||
}
|
||||
}
|
||||
[FIRAnalytics logEventWithName:kFIREventShare
|
||||
parameters:@{
|
||||
kFIRParameterContent: contentID,
|
||||
kFIRParameterContentType: platform
|
||||
}];
|
||||
}
|
||||
+(void)event:(NSString *)eventId attributes:(NSDictionary *)attributes{
|
||||
[FIRAnalytics logEventWithName:eventId
|
||||
parameters:attributes];
|
||||
}
|
||||
|
||||
@end
|
||||