增加获取idfa 1.0.4发布

This commit is contained in:
zjx 2025-06-23 19:14:14 +08:00
parent 3e994dacee
commit fe1e0a4f13
8 changed files with 51 additions and 10 deletions

View File

@ -1798,13 +1798,15 @@
CODE_SIGN_ENTITLEMENTS = Veloria/Veloria.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = 394VH538M8;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Veloria/Source/Info.plist;
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
INFOPLIST_KEY_NSCameraUsageDescription = "The APP needs to access your album to provide screenshots for feedback.";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "The APP needs to access your location to recommend better short dramas for you";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "The APP needs to access your album to provide screenshots for feedback.";
INFOPLIST_KEY_NSUserTrackingUsageDescription = "We will use your advertising identifier (IDFA) to provide a personalized advertising experience.";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = "";
@ -1839,13 +1841,15 @@
CODE_SIGN_ENTITLEMENTS = Veloria/Veloria.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = 394VH538M8;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Veloria/Source/Info.plist;
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
INFOPLIST_KEY_NSCameraUsageDescription = "The APP needs to access your album to provide screenshots for feedback.";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "The APP needs to access your location to recommend better short dramas for you";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "The APP needs to access your album to provide screenshots for feedback.";
INFOPLIST_KEY_NSUserTrackingUsageDescription = "We will use your advertising identifier (IDFA) to provide a personalized advertising experience.";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = "";

View File

@ -39,7 +39,11 @@ extension SceneDelegate {
private static var webpageURL: URL?
func vp_handleOpenAppMessage(webpageURL: URL?) {
guard VPNetworkReachabilityManager.manager.isReachable == true, AppDelegate.haveBeenShownAPNS, self.isOpenApp else {
guard VPNetworkReachabilityManager.manager.isReachable == true, //
AppDelegate.haveBeenShownAPNS, //
self.isOpenApp, //APP
VPAppTool.idfaAuthorizationFinish //idfa
else {
if let webpageURL = webpageURL {
SceneDelegate.webpageURL = webpageURL
}

View File

@ -58,7 +58,10 @@ class VPTabBarController: UITabBarController {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [weak self] in
self?.checkUpdates()
}
///idfa
VPAppTool.requestIDFAAuthorization { idfa in
vpLog(message: idfa)
}
}

View File

@ -94,7 +94,13 @@ class VPWalletAPI {
]
VPNetwork.request(parameters: param) { (response: VPNetworkResponse<VPIAPOrderModel>) in
if let message = response.data?.message, message.count > 0 {
guard let data = response.data else {
VPToast.show(text: "veloria_network".localized)
completer?(nil)
return
}
if let message = data.message, message.count > 0 {
if response.data?.code == 30007 {
VPToast.show(text: "veloria_vip_error_1".localized)
} else {
@ -103,7 +109,7 @@ class VPWalletAPI {
completer?(nil)
} else {
completer?(response.data)
completer?(data)
}
}
}

View File

@ -87,7 +87,7 @@ extension VPApi: TargetType {
"brand" : "apple", //
"app-name" : kVPAPPBundleIdentifier,
"system-type" : "ios",
"idfa" : JXUUID.idfa(),
"idfa" : VPAppTool.getIdfa(),
"model" : UIDevice.vp_machineModelName(),
]
//

View File

@ -6,6 +6,8 @@
//
import UIKit
import AppTrackingTransparency
import AdSupport
class VPAppTool: NSObject {
@ -54,6 +56,31 @@ class VPAppTool: NSObject {
}
}
extension VPAppTool {
///idfa
static var idfaAuthorizationFinish = false
static var idfa: String?
static func getIdfa() -> String {
if let idfa = idfa {
return idfa
} else {
return ASIdentifierManager.shared().advertisingIdentifier.uuidString
}
}
static func requestIDFAAuthorization(completion: @escaping (String?) -> Void) {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
ATTrackingManager.requestTrackingAuthorization { status in
idfaAuthorizationFinish = true
VPAppTool.idfa = ASIdentifierManager.shared().advertisingIdentifier.uuidString
VPAppTool.sceneDelegate?.vp_retryHandleOpenAppMessage()
completion(idfa)
}
}
}
}
extension VPAppTool {
///

View File

@ -60,7 +60,6 @@ class VPIAPManager {
VPHUD.dismiss()
self.waitRestoreModel = nil
self.completionHandler?(false)
VPToast.show(text: "veloria_network".localized)
return
}
self.orderCode = orderModel.order_code

View File

@ -31,8 +31,6 @@
<string>$(PRODUCT_NAME)</string>
<key>FirebaseAppDelegateProxyEnabled</key>
<false/>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>