Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
pidan
/
FuSiLive
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6e7bdeed
authored
Apr 25, 2025
by
pidan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、开放ipad
2、修复ATT弹窗弹不出来的问题
parent
801b60d4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
62 deletions
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/UserRouter/FUSUserPublicDefine.h
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/UserRouter/FUSUserPublicDefine.m
FuSiLive.xcodeproj/project.pbxproj
FuSiLive/AppDelegate.m
Modules/FUSUserCenterModule/FUSUserCenterModule/Router/FUSUserCenterRouter.m
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/UserRouter/FUSUserPublicDefine.h
View file @
6e7bdeed
...
@@ -15,9 +15,6 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -15,9 +15,6 @@ NS_ASSUME_NONNULL_BEGIN
@interface
FUSUserUDKeys
:
NSObject
@interface
FUSUserUDKeys
:
NSObject
// 第一次允许联网
+
(
NSString
*
)
fus_FIRST_LAUNCH_NETWORK_ALLOW
;
// 自动登录标记
// 自动登录标记
+
(
NSString
*
)
fus_AUTO_LOGIN_MARK_BOOL
;
+
(
NSString
*
)
fus_AUTO_LOGIN_MARK_BOOL
;
...
...
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/UserRouter/FUSUserPublicDefine.m
View file @
6e7bdeed
...
@@ -14,11 +14,6 @@
...
@@ -14,11 +14,6 @@
@implementation
FUSUserUDKeys
@implementation
FUSUserUDKeys
// 第一次允许联网
+
(
NSString
*
)
fus_FIRST_LAUNCH_NETWORK_ALLOW
{
return
@"FirstLaunchNetworkAllow"
;
}
// 自动登录标记
// 自动登录标记
+
(
NSString
*
)
fus_AUTO_LOGIN_MARK_BOOL
{
+
(
NSString
*
)
fus_AUTO_LOGIN_MARK_BOOL
{
return
@"AutoLoginMarkBool"
;
return
@"AutoLoginMarkBool"
;
...
...
FuSiLive.xcodeproj/project.pbxproj
View file @
6e7bdeed
...
@@ -751,7 +751,7 @@
...
@@ -751,7 +751,7 @@
SWIFT_EMIT_LOC_STRINGS
=
NO
;
SWIFT_EMIT_LOC_STRINGS
=
NO
;
SWIFT_OBJC_BRIDGING_HEADER
=
"FuSiLive/Classes/FusiLive-Bridging-Header.h"
;
SWIFT_OBJC_BRIDGING_HEADER
=
"FuSiLive/Classes/FusiLive-Bridging-Header.h"
;
SWIFT_VERSION
=
5.0
;
SWIFT_VERSION
=
5.0
;
TARGETED_DEVICE_FAMILY
=
1
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
};
};
name
=
Debug
;
name
=
Debug
;
};
};
...
@@ -1034,7 +1034,7 @@
...
@@ -1034,7 +1034,7 @@
SWIFT_EMIT_LOC_STRINGS
=
NO
;
SWIFT_EMIT_LOC_STRINGS
=
NO
;
SWIFT_OBJC_BRIDGING_HEADER
=
"FuSiLive/Classes/FusiLive-Bridging-Header.h"
;
SWIFT_OBJC_BRIDGING_HEADER
=
"FuSiLive/Classes/FusiLive-Bridging-Header.h"
;
SWIFT_VERSION
=
5.0
;
SWIFT_VERSION
=
5.0
;
TARGETED_DEVICE_FAMILY
=
1
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
};
};
name
=
Release
;
name
=
Release
;
};
};
...
...
FuSiLive/AppDelegate.m
View file @
6e7bdeed
...
@@ -44,16 +44,8 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7";
...
@@ -44,16 +44,8 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7";
// 第一次启动执行
// 第一次启动执行
[
self
firstLaunchHandle
];
[
self
firstLaunchHandle
];
// 通过 个推平台 分配的appId、 appKey 、appSecret 启动SDK,注:该方法需要在主线程中调用
[
self
fus_appStartPermissionCheckWithOptions
:
launchOptions
];
[
GeTuiSdk
startSdkWithAppId
:
kGtAppId
appKey
:
kGtAppKey
appSecret
:
kGtAppSecret
delegate
:
self
launchingOptions
:
launchOptions
];
[
GeTuiSdk
registerRemoteNotification
:
UNAuthorizationOptionSound
|
UNAuthorizationOptionAlert
|
UNAuthorizationOptionBadge
|
UNAuthorizationOptionProvidesAppNotificationSettings
];
[
GeTuiSdk
runBackgroundEnable
:
NO
];
// [[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions:UNAuthorizationOptionBadge|UNAuthorizationOptionSound|UNAuthorizationOptionAlert|UNAuthorizationOptionProvidesAppNotificationSettings completionHandler:^(BOOL granted, NSError * _Nullable error) {
// }];
// [UNUserNotificationCenter currentNotificationCenter].delegate = self;
// [UIApplication.sharedApplication registerForRemoteNotifications];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
[
FIRApp
configure
];
[
FIRApp
configure
];
[
FIRAnalytics
setAnalyticsCollectionEnabled
:
YES
];
[
FIRAnalytics
setAnalyticsCollectionEnabled
:
YES
];
...
@@ -85,9 +77,65 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7";
...
@@ -85,9 +77,65 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7";
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
@
(
YES
)
forKey
:
FUSLiveUDKeys
.
fus_SHOULD_REMOTE_NOTIFICATION_TIP
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
@
(
YES
)
forKey
:
FUSLiveUDKeys
.
fus_SHOULD_REMOTE_NOTIFICATION_TIP
];
// 请求sh状态
[
self
fus_checkAppStatus
];
return
YES
;
return
YES
;
}
}
-
(
void
)
fus_appStartPermissionCheckWithOptions
:(
NSDictionary
*
)
launchOptions
{
// 标记是否在一个生命周期内
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
@
(
YES
)
forKey
:
FUSUserUDKeys
.
fus_IS_FIRST_ENTER_APP_CURRENT
];
// 在应用启动时开始监听网络状态,因为我们现在所有接口都需要上传网络状态,之前是在登录成功那里开始监听。这就导致了有一些接口的网络状态监听不到:added by pidan
__block
BOOL
firstLaunchNetworkAllow
=
NO
;
/// 先弹出检测网络弹窗
[
FUSHttpHelper
fus_monitorNetWorkStatus
:
^
(
AFNetworkReachabilityStatus
status
)
{
/// 再弹出检测通知弹窗
[
UNUserNotificationCenter
.
currentNotificationCenter
requestAuthorizationWithOptions
:
UNAuthorizationOptionSound
|
UNAuthorizationOptionAlert
|
UNAuthorizationOptionBadge
|
UNAuthorizationOptionProvidesAppNotificationSettings
completionHandler
:
^
(
BOOL
granted
,
NSError
*
_Nullable
error
)
{
// 通过 个推平台 分配的appId、 appKey 、appSecret 启动SDK,注:该方法需要在主线程中调用
[
GeTuiSdk
startSdkWithAppId
:
kGtAppId
appKey
:
kGtAppKey
appSecret
:
kGtAppSecret
delegate
:
self
launchingOptions
:
launchOptions
];
[
GeTuiSdk
registerRemoteNotification
:
UNAuthorizationOptionSound
|
UNAuthorizationOptionAlert
|
UNAuthorizationOptionBadge
|
UNAuthorizationOptionProvidesAppNotificationSettings
];
[
GeTuiSdk
runBackgroundEnable
:
NO
];
if
(
status
>
0
&&
!
firstLaunchNetworkAllow
)
{
firstLaunchNetworkAllow
=
YES
;
[
self
fus_checkAppStatus
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
0
.
5
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
[
FUSAPIDNSManager
fus_checkCurrentDNSAddress
];
[
FUSEventTrack
fus_initial
];
});
}
}];
}];
}
/**
请求APP状态
*/
-
(
void
)
fus_checkAppStatus
{
[
FUSCommonHttpRequest
fus_checkAppStatuWithSuccess
:
^
(
NSString
*
appStatus
)
{
//黑名单帐号登录过
BOOL
isCheckCountLogined
=
[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
FUSUserUDKeys
.
fus_CHECKCOUNT_LOGINED
]
boolValue
];
if
(
isCheckCountLogined
)
{
appStatus
=
@"1"
;
}
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
appStatus
forKey
:
kFUSConfigAppStatusUDKey
];
[
FUSLocalizationHelper
fus_initLocalizationIfNeed
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatusUpdateNotificationKey
object
:
nil
];
}
failure
:
^
(
NSString
*
msg
)
{
[
FUSLocalizationHelper
fus_initLocalizationIfNeed
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatusUpdateNotificationKey
object
:
nil
];
}];
}
// 支付回调, 9.0以后使用新API接口
// 支付回调, 9.0以后使用新API接口
-
(
BOOL
)
application
:
(
UIApplication
*
)
app
openURL
:
(
NSURL
*
)
url
options
:
(
NSDictionary
<
NSString
*
,
id
>
*
)
options
-
(
BOOL
)
application
:
(
UIApplication
*
)
app
openURL
:
(
NSURL
*
)
url
options
:
(
NSDictionary
<
NSString
*
,
id
>
*
)
options
{
{
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Router/FUSUserCenterRouter.m
View file @
6e7bdeed
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
#import "FUSRecieveNotificationHelper.h"
#import "FUSRecieveNotificationHelper.h"
#import "FUSGotBackpackItemAnimView.h"
#import "FUSGotBackpackItemAnimView.h"
#import <FirebaseAnalytics/FirebaseAnalytics.h>
#import <FirebaseAnalytics/FirebaseAnalytics.h>
#import "FUSTaskCenterListModel.h"
#import "FUSTaskCenterListModel.h"
#import "FUSUserCenterModule/FUSUserCenterModule-Swift.h"
#import "FUSUserCenterModule/FUSUserCenterModule-Swift.h"
...
@@ -548,28 +549,9 @@
...
@@ -548,28 +549,9 @@
#pragma mark - UIApplicationDelegate
#pragma mark - UIApplicationDelegate
-
(
BOOL
)
application
:
(
UIApplication
*
)
application
didFinishLaunchingWithOptions
:
(
NSDictionary
<
UIApplicationLaunchOptionsKey
,
id
>
*
)
launchOptions
{
-
(
BOOL
)
application
:
(
UIApplication
*
)
application
didFinishLaunchingWithOptions
:
(
NSDictionary
<
UIApplicationLaunchOptionsKey
,
id
>
*
)
launchOptions
{
[
FUSEventTrack
fus_initial
];
// 标记是否在一个生命周期内
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
@
(
YES
)
forKey
:
FUSUserUDKeys
.
fus_IS_FIRST_ENTER_APP_CURRENT
];
// 在应用启动时开始监听网络状态,因为我们现在所有接口都需要上传网络状态,之前是在登录成功那里开始监听。这就导致了有一些接口的网络状态监听不到:added by pidan
BOOL
firstLaunchNetworkAllow
=
[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
FUSUserUDKeys
.
fus_FIRST_LAUNCH_NETWORK_ALLOW
]
boolValue
];
[
FUSHttpHelper
fus_monitorNetWorkStatus
:
^
(
AFNetworkReachabilityStatus
status
)
{
if
(
status
>
0
&&
!
firstLaunchNetworkAllow
)
{
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
@
(
YES
)
forKey
:
FUSUserUDKeys
.
fus_FIRST_LAUNCH_NETWORK_ALLOW
];
[
self
checkAppStatus
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
0
.
5
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
[
FUSAPIDNSManager
fus_checkCurrentDNSAddress
];
[
FUSEventTrack
fus_initial
];
});
}
}];
[
self
fus_startAPPPages
];
[
self
fus_startAPPPages
];
// 请求sh状态
[
self
checkAppStatus
];
[[
FUSKeyboardShowHelper
sharedInstance
]
star
];
[[
FUSKeyboardShowHelper
sharedInstance
]
star
];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
...
@@ -587,28 +569,6 @@
...
@@ -587,28 +569,6 @@
return
YES
;
return
YES
;
}
}
/**
请求APP状态
*/
-
(
void
)
checkAppStatus
{
[
FUSCommonHttpRequest
fus_checkAppStatuWithSuccess
:
^
(
NSString
*
appStatus
)
{
//黑名单帐号登录过
BOOL
isCheckCountLogined
=
[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
FUSUserUDKeys
.
fus_CHECKCOUNT_LOGINED
]
boolValue
];
if
(
isCheckCountLogined
)
{
appStatus
=
@"1"
;
}
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
appStatus
forKey
:
kFUSConfigAppStatusUDKey
];
[
FUSLocalizationHelper
fus_initLocalizationIfNeed
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatusUpdateNotificationKey
object
:
nil
];
}
failure
:
^
(
NSString
*
msg
)
{
[
FUSLocalizationHelper
fus_initLocalizationIfNeed
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatusUpdateNotificationKey
object
:
nil
];
}];
}
-
(
void
)
fus_startAPPPages
{
-
(
void
)
fus_startAPPPages
{
// ludy:这里加一个,防止一开始请求checkappversion请求不到
// ludy:这里加一个,防止一开始请求checkappversion请求不到
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment