[WIP] firebase init Error

This commit is contained in:
2024-08-02 20:09:59 +08:00
commit b77fd9f498
7087 changed files with 1466846 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0bd9ff896ac5d4d61b214abccf0eca50
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,81 @@
fileFormatVersion: 2
guid: 2c6001f9da28e41e386808302b11b597
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Android: Android
second:
enabled: 0
settings:
AndroidSharedLibraryType: Executable
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cda7a90bc12004ad183f06246d617810
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,28 @@
//
// Header.h
// NotificationSDK
//
// Created by APPLE on 2020/9/28.
// Copyright © 2020 周翔宇. All rights reserved.
//
#ifndef Header_h
#define Header_h
typedef NS_ENUM(NSUInteger, NotifationType) {
NotifationBackground = 0, /**< 后台收到推送点击消息进入 */
NotifationForeground = 1, /**< 前台收到推送 */
NotifationClickIcon = 2, /**< 点击图标进app收到推送 */
NotifationKill = 3, /**< app杀死收到推送点击消息进入 */
};
typedef NS_ENUM(NSInteger, NotiResultCode) {
NotiResultSuccess = 0, /**< 成功 */
NotiResultFail = 1, /**< 失败 */
};
#endif /* Header_h */

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 068cfd77a213f4ae08d983902c0231ad
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,51 @@
//
// LocalNotiModel.h
// NotificationSDK
//
// Created by 周翔宇 on 2019/8/2.
// Copyright © 2019 周翔宇. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface LocalNotiModel : NSObject
/**
消息id,可随便定义,但要保证唯一性 required
*/
@property (nonatomic,strong)NSString *messageId;
/**
消息标题 optional
*/
@property (nonatomic,strong)NSString *messageTitle;
/**
消息内容 optional
*/
@property (nonatomic,strong)NSString *messageContent;
/**
时间秒数,消息从注册起多长时间推送 required
*/
@property (nonatomic,assign)NSTimeInterval time;
/**
手机收到消息是否震动 optional
*/
@property (nonatomic,assign)BOOL isShake;
/**
是否运行此消息在前台接收 optional(默认为NO) 废弃
*/
@property (nonatomic,assign)BOOL isAlertWhileAppInsForeground __attribute__((deprecated("废弃 使用showNotificationAlert")));
/// 是否展示通知提示 默认yes 弹出系统通知提示框修改为no收到通知不弹出系统通知框项目组接收到通知自定义弹框
@property (nonatomic, assign)BOOL showNotificationAlert;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c3690d2a84b9d4e6db1a632eabc69421
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,53 @@
//
// NotificationResult.h
// NotificationSDK
//
// Created by 周翔宇 on 2019/8/8.
// Copyright © 2019 周翔宇. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Header.h"
NS_ASSUME_NONNULL_BEGIN
@interface NotificationResult : NSObject
@property (nonatomic, assign) NSInteger code;
@property (nonatomic, copy) NSString * msg;
@property (nonatomic, readwrite, copy) NSDictionary * originRespDic;
@property (nonatomic, assign) NotifationType notifationType;
@property (nonatomic, copy) NSString * title;
@property (nonatomic, copy) NSString * body;
@property (nonatomic, copy) NSString * user_id;
@property (nonatomic, copy) NSString * image_url;
@property (nonatomic, copy) NSString * push_id;
@property (nonatomic, copy) NSString * olap_id;
@property (nonatomic, copy) NSString * push_time;
@property (nonatomic, copy) NSString * execute_id;
@property (nonatomic, copy) NSString * producer_time;
@property (nonatomic, copy) NSString * extra;
/// 创建返回层模型
/// @param dic 返回数据 notificationType:NotifationType, userInfo:userInfo
/// @param msg 描述desc
+ (id)responseWithOriginDic:(NSDictionary *)dic msg:(NSString *)msg;
+ (instancetype)successRespWithStr:(NSString *)errStr;
+ (instancetype)commonError:(NSString *)errStr;
@end
/**
函数回调的block
@param resp 返回信息
*/
typedef void(^ResultBlock)(NotificationResult * _Nonnull resp);
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5432ab8ee2c944e9aa3c15942e38c2d8
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,161 @@
//
// NotificationSDK.h
// NotificationSDK
//
// Created by 周翔宇 on 2019/5/29.
// Copyright © 2019 周翔宇. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "LocalNotiModel.h"
#import "NotificationResult.h"
#import "Header.h"
#import <GASDK/GAConstants.h>
NS_ASSUME_NONNULL_BEGIN
@interface NotificationSDK : NSObject
/**
初始化方法
@param productId 游戏productId
@param projectId 游戏projectId
@param cloudId cloudid
@param clientId 客户端id
@param appId appid
@param teamId teamId
@param setBadge 是否开启角标功能 YES:开启 NO:不开启
*/
+ (void)initWithProductId:(NSString *)productId projectId:(NSString *)projectId cloudId:(NSString *)cloudId clientId:(NSString *)clientId appId:(NSString *)appId teamId:(NSString *)teamId serverUrl:(NSString *)serverurl setBadge:(BOOL)setBadge;
/**
设置推送权限
*/
+ (void)setPushNotification;
/// 跳转到系统页面
/// @param complate ios 10以上设备发起跳转 success是跳转api回调结果
+ (void)jumpToSystemSettingVcWithComplate:(void(^)(BOOL success))complate;;
/**
检测推送权限
@return YES:有权限。NO没有权限
*/
//+ (BOOL)IsAllowedNotification;
/// 检测推送权限
/// @param complate 回调结果
/***
iOS10 以上的返回数值对应以下枚举
typedef NS_ENUM(NSInteger, UNAuthorizationStatus) {
// The user has not yet made a choice regarding whether the application may post user notifications.
UNAuthorizationStatusNotDetermined = 0,
// The application is not authorized to post user notifications.
UNAuthorizationStatusDenied = 1,
// The application is authorized to post user notifications.
UNAuthorizationStatusAuthorized = 2,
// The application is authorized to post non-interruptive user notifications.
UNAuthorizationStatusProvisional = 3
// The application is temporarily authorized to post notifications. Only available to app clips.
UNAuthorizationStatusEphemeral = 4
}
ios 10一下返回的数值对应以下枚举
typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
UIUserNotificationTypeNone = 0, // the application may not present any UI upon a notification being received
UIUserNotificationTypeBadge = 1 << 0, // the application may badge its icon upon a notification being received
UIUserNotificationTypeSound = 1 << 1, // the application may play a sound upon a notification being received
UIUserNotificationTypeAlert = 1 << 2, // the application may display an alert upon a notification being received
}
*/
+ (void)checkNotifyAuthorizationWithComplate:(void(^)(NSInteger authorization))complate;
/**
注册本地推送
@param localNotiModel localNotiModel
@param completion 回调
*/
+ (void)RegistLocalNotice:(LocalNotiModel *)localNotiModel Completion:(ResultBlock)completion;
/**
获取本地消息
@param completion 回调
*/
+ (void)receiveLocalNoteInfo:(ResultBlock)completion;
/**
注销本地推送
@param noticeId 消息id
*/
+ (void)removeOneNotificationWithID:(NSString *)noticeId;
/**
注销所有的本地推送
*/
+ (void)removeAllLocalNotification;
//上报token
+ (void)PushNotificationToken:(NSData *)token;
/**
上报userId
@param userId userid
*/
+ (void)PushNotificationTokenWithUserId:(NSString *)userId Completion:(ResultBlock)completion;
/// 初始化通知上报管理 替换原来的bi
/// @param debug debug环境或者release环境
/// @param gaUrlType 1 国内 2 国外
/* 使用时 确保已初始化NotificationSDK -initWithProductId:(NSString *)productId projectId:(NSString *)projectId cloudId:(NSString *)cloudId clientId:(NSString *)clientId appId:(NSString *)appId teamId:(NSString *)teamId serverUrl:(NSString *)serverurl setBadge:(BOOL)setBadge;
GA线上 debug no
projectIdStr 20477
clientIdStr H5_5.0_tuyoo.tuyoo.0-hall20477.tuyoo.BiPush
appIdStr 20477
gameIdStr 20477
--------
GA测试 debug yes
projectIdStr 20433
clientIdStr IOS_5.0_guest.appStore.0-hall20433.appStore.sdktest
appIdStr 20433
gameIdStr 20433
*/
+ (void)initGAWithDebug:(BOOL)debug gaUrlType:(GAServerUrl)gaUrlType;
/**
确保ga已经初始化 没有初始化需要调用 + (void)initGAWithDebug:(BOOL)debug gaUrlType:(GAServerUrl)gaUrlType 先初始化ga
*/
/// 使用ga上报事件
/// @param eventType 事件类别
/// @param originParam 参数
+ (void)trackEventWithType:(NSString *)eventType originParam:(NSDictionary *)originParam;
/**
获取消息
@param completion 回调
*/
+ (void)receiveRemoteNoteInfo:(ResultBlock)completion;
+ (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler;
/**
@param application application
*/
+ (void)applicationDidBecomeActive:(UIApplication *)application;
+ (void)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 40cc7a65d12144f218301787ea3e71b3
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,25 @@
//
// NotificationSDKConfig.h
// NotificationSDK
//
// Created by 周翔宇 on 2019/5/29.
// Copyright © 2019年 周翔宇. All rights reserved.
//
#ifndef NotificationSDKConfig_h
#define NotificationSDKConfig_h
/** NotificationSDK */
#define NotificationSDK_CHServer @""
#define NotificationSDK_ABServer @""
//#define NotificationSDK_Post @"/push/report_data.json"
#define NotificationSDK_Post @"/api/push/ga/report_data.json"
//#define NotificationSDK_setBadge @"/push/set_badge.json"
#define NotificationSDK_setBadge @"/api/push/ga/set_badge.json"
#define kXYNotFirstReqNotification @"XY_isNotFirstReqNotification"
#define NotificationToken @"NotificationToken"
#define PushNotificationTokenStatus @"NotificationTokenStatus"
#define NotificationTokenUsrId @"NotificationTokenUsrId"
#endif /* TerminalIDConfig_h */

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: fdd3022cdfced465db31feccbb92cce9
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1a8dcb30984994696b86e935ea51dad5
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b4728f9d12d6b4c1d987af6536bf083f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,6 @@
framework module NotificationSDK {
umbrella header "NotificationSDK.h"
export *
module * { export * }
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ae5a22e82d6a1442fb728e0911df3507
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9027835e505fb43068fdc2b8701af5d0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: