加入喝水和MAX广告

This commit is contained in:
忆海16 2024-07-23 11:43:51 +08:00
parent 6ca0dd91a2
commit 49cc5b5417
20 changed files with 2218 additions and 20 deletions

View File

@ -74,6 +74,16 @@
75C4E0B92C367EAE00B4C170 /* AV_WaterCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75C4E0B62C367EAE00B4C170 /* AV_WaterCell.swift */; }; 75C4E0B92C367EAE00B4C170 /* AV_WaterCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75C4E0B62C367EAE00B4C170 /* AV_WaterCell.swift */; };
75C4E0BC2C3681A400B4C170 /* AV_AddWaterCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75C4E0BB2C3681A400B4C170 /* AV_AddWaterCollectionViewCell.xib */; }; 75C4E0BC2C3681A400B4C170 /* AV_AddWaterCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75C4E0BB2C3681A400B4C170 /* AV_AddWaterCollectionViewCell.xib */; };
75C4E0BD2C3681A400B4C170 /* AV_AddWaterCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75C4E0BA2C3681A400B4C170 /* AV_AddWaterCollectionViewCell.swift */; }; 75C4E0BD2C3681A400B4C170 /* AV_AddWaterCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75C4E0BA2C3681A400B4C170 /* AV_AddWaterCollectionViewCell.swift */; };
75F3F3D22C4CE23200005A7E /* AV_RootPlayerVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F3F3D02C4CE23200005A7E /* AV_RootPlayerVC.swift */; };
75F3F3D32C4CE23200005A7E /* AV_RootPlayerVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75F3F3D12C4CE23200005A7E /* AV_RootPlayerVC.xib */; };
75F3F3D62C4CE32000005A7E /* AV_AddPlayerVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F3F3D42C4CE32000005A7E /* AV_AddPlayerVC.swift */; };
75F3F3D72C4CE32000005A7E /* AV_AddPlayerVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75F3F3D52C4CE32000005A7E /* AV_AddPlayerVC.xib */; };
75F3F3DA2C4CE5F600005A7E /* AV_MinePlayerVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F3F3D82C4CE5F600005A7E /* AV_MinePlayerVC.swift */; };
75F3F3DB2C4CE5F600005A7E /* AV_MinePlayerVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75F3F3D92C4CE5F600005A7E /* AV_MinePlayerVC.xib */; };
75F3F3DE2C4CE6F400005A7E /* AV_WaterKeyBordPlayerVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F3F3DC2C4CE6F400005A7E /* AV_WaterKeyBordPlayerVC.swift */; };
75F3F3DF2C4CE6F400005A7E /* AV_WaterKeyBordPlayerVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75F3F3DD2C4CE6F400005A7E /* AV_WaterKeyBordPlayerVC.xib */; };
75F3F3E22C4CE81800005A7E /* AV_EditPlayerVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F3F3E02C4CE81800005A7E /* AV_EditPlayerVC.swift */; };
75F3F3E32C4CE81800005A7E /* AV_EditPlayerVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75F3F3E12C4CE81800005A7E /* AV_EditPlayerVC.xib */; };
75FAEF2E2C3E5D9800298C7D /* CircularProgressBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75FAEF2D2C3E5D9700298C7D /* CircularProgressBarView.swift */; }; 75FAEF2E2C3E5D9800298C7D /* CircularProgressBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75FAEF2D2C3E5D9700298C7D /* CircularProgressBarView.swift */; };
75FAEF312C3E735800298C7D /* HealthManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75FAEF302C3E735800298C7D /* HealthManager.swift */; }; 75FAEF312C3E735800298C7D /* HealthManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75FAEF302C3E735800298C7D /* HealthManager.swift */; };
75FAEF342C3E8D7400298C7D /* AV_NoneCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75FAEF322C3E8D7400298C7D /* AV_NoneCell.swift */; }; 75FAEF342C3E8D7400298C7D /* AV_NoneCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75FAEF322C3E8D7400298C7D /* AV_NoneCell.swift */; };
@ -180,6 +190,16 @@
75C4E0B72C367EAE00B4C170 /* AV_WaterCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AV_WaterCell.xib; sourceTree = "<group>"; }; 75C4E0B72C367EAE00B4C170 /* AV_WaterCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AV_WaterCell.xib; sourceTree = "<group>"; };
75C4E0BA2C3681A400B4C170 /* AV_AddWaterCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AV_AddWaterCollectionViewCell.swift; sourceTree = "<group>"; }; 75C4E0BA2C3681A400B4C170 /* AV_AddWaterCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AV_AddWaterCollectionViewCell.swift; sourceTree = "<group>"; };
75C4E0BB2C3681A400B4C170 /* AV_AddWaterCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AV_AddWaterCollectionViewCell.xib; sourceTree = "<group>"; }; 75C4E0BB2C3681A400B4C170 /* AV_AddWaterCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AV_AddWaterCollectionViewCell.xib; sourceTree = "<group>"; };
75F3F3D02C4CE23200005A7E /* AV_RootPlayerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AV_RootPlayerVC.swift; sourceTree = "<group>"; };
75F3F3D12C4CE23200005A7E /* AV_RootPlayerVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AV_RootPlayerVC.xib; sourceTree = "<group>"; };
75F3F3D42C4CE32000005A7E /* AV_AddPlayerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AV_AddPlayerVC.swift; sourceTree = "<group>"; };
75F3F3D52C4CE32000005A7E /* AV_AddPlayerVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AV_AddPlayerVC.xib; sourceTree = "<group>"; };
75F3F3D82C4CE5F600005A7E /* AV_MinePlayerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AV_MinePlayerVC.swift; sourceTree = "<group>"; };
75F3F3D92C4CE5F600005A7E /* AV_MinePlayerVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AV_MinePlayerVC.xib; sourceTree = "<group>"; };
75F3F3DC2C4CE6F400005A7E /* AV_WaterKeyBordPlayerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AV_WaterKeyBordPlayerVC.swift; sourceTree = "<group>"; };
75F3F3DD2C4CE6F400005A7E /* AV_WaterKeyBordPlayerVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AV_WaterKeyBordPlayerVC.xib; sourceTree = "<group>"; };
75F3F3E02C4CE81800005A7E /* AV_EditPlayerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AV_EditPlayerVC.swift; sourceTree = "<group>"; };
75F3F3E12C4CE81800005A7E /* AV_EditPlayerVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AV_EditPlayerVC.xib; sourceTree = "<group>"; };
75FAEF2D2C3E5D9700298C7D /* CircularProgressBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircularProgressBarView.swift; sourceTree = "<group>"; }; 75FAEF2D2C3E5D9700298C7D /* CircularProgressBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircularProgressBarView.swift; sourceTree = "<group>"; };
75FAEF2F2C3E723A00298C7D /* anniversary_Project.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = anniversary_Project.entitlements; sourceTree = "<group>"; }; 75FAEF2F2C3E723A00298C7D /* anniversary_Project.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = anniversary_Project.entitlements; sourceTree = "<group>"; };
75FAEF302C3E735800298C7D /* HealthManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HealthManager.swift; sourceTree = "<group>"; }; 75FAEF302C3E735800298C7D /* HealthManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HealthManager.swift; sourceTree = "<group>"; };
@ -294,6 +314,13 @@
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
75B426902C4DF69C001844C2 /* NetWork */ = {
isa = PBXGroup;
children = (
);
path = NetWork;
sourceTree = "<group>";
};
75C0A1252BC787A400AB0094 = { 75C0A1252BC787A400AB0094 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -319,6 +346,7 @@
75C0A1302BC787A400AB0094 /* anniversary_Project */ = { 75C0A1302BC787A400AB0094 /* anniversary_Project */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
75F3F3CE2C4CE20F00005A7E /* Player */,
755073C22C3F7FC200ADFD6B /* GoogleService-Info.plist */, 755073C22C3F7FC200ADFD6B /* GoogleService-Info.plist */,
75FAEF2F2C3E723A00298C7D /* anniversary_Project.entitlements */, 75FAEF2F2C3E723A00298C7D /* anniversary_Project.entitlements */,
7596165F2C35242200363C46 /* Guidepages */, 7596165F2C35242200363C46 /* Guidepages */,
@ -414,6 +442,7 @@
75C0A1742BC78F2500AB0094 /* Tool */ = { 75C0A1742BC78F2500AB0094 /* Tool */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
75B426902C4DF69C001844C2 /* NetWork */,
753C25A12C3BF4A1006E2660 /* MLSliderRulerScrollView.swift */, 753C25A12C3BF4A1006E2660 /* MLSliderRulerScrollView.swift */,
753C25A02C3BF4A1006E2660 /* MLSliderRulerView.swift */, 753C25A02C3BF4A1006E2660 /* MLSliderRulerView.swift */,
753C25902C3BBA9D006E2660 /* AV_WaveView.swift */, 753C25902C3BBA9D006E2660 /* AV_WaveView.swift */,
@ -499,6 +528,23 @@
path = waterV; path = waterV;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
75F3F3CE2C4CE20F00005A7E /* Player */ = {
isa = PBXGroup;
children = (
75F3F3D02C4CE23200005A7E /* AV_RootPlayerVC.swift */,
75F3F3D12C4CE23200005A7E /* AV_RootPlayerVC.xib */,
75F3F3D42C4CE32000005A7E /* AV_AddPlayerVC.swift */,
75F3F3D52C4CE32000005A7E /* AV_AddPlayerVC.xib */,
75F3F3D82C4CE5F600005A7E /* AV_MinePlayerVC.swift */,
75F3F3D92C4CE5F600005A7E /* AV_MinePlayerVC.xib */,
75F3F3DC2C4CE6F400005A7E /* AV_WaterKeyBordPlayerVC.swift */,
75F3F3DD2C4CE6F400005A7E /* AV_WaterKeyBordPlayerVC.xib */,
75F3F3E02C4CE81800005A7E /* AV_EditPlayerVC.swift */,
75F3F3E12C4CE81800005A7E /* AV_EditPlayerVC.xib */,
);
path = Player;
sourceTree = "<group>";
};
75FDC0B02BCE1C56005B3D13 /* V */ = { 75FDC0B02BCE1C56005B3D13 /* V */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -632,6 +678,8 @@
755073C72C3F81B400ADFD6B /* AV_LaunchLimitesVC.xib in Resources */, 755073C72C3F81B400ADFD6B /* AV_LaunchLimitesVC.xib in Resources */,
755073C32C3F7FC200ADFD6B /* GoogleService-Info.plist in Resources */, 755073C32C3F7FC200ADFD6B /* GoogleService-Info.plist in Resources */,
759616752C353BEF00363C46 /* AV_SportsCell.xib in Resources */, 759616752C353BEF00363C46 /* AV_SportsCell.xib in Resources */,
75F3F3D32C4CE23200005A7E /* AV_RootPlayerVC.xib in Resources */,
75F3F3D72C4CE32000005A7E /* AV_AddPlayerVC.xib in Resources */,
754C97D12C3D0F7100A0455D /* AV_selectWeightVC.xib in Resources */, 754C97D12C3D0F7100A0455D /* AV_selectWeightVC.xib in Resources */,
754835022C3D04F300AC6F8F /* AV_WaterSettingVC.xib in Resources */, 754835022C3D04F300AC6F8F /* AV_WaterSettingVC.xib in Resources */,
759616712C35348A00363C46 /* AV_SportsVC.xib in Resources */, 759616712C35348A00363C46 /* AV_SportsVC.xib in Resources */,
@ -643,12 +691,15 @@
75C4E0B82C367EAE00B4C170 /* AV_WaterCell.xib in Resources */, 75C4E0B82C367EAE00B4C170 /* AV_WaterCell.xib in Resources */,
753C258E2C3B88F4006E2660 /* AV_BirtherDayTaskCell.xib in Resources */, 753C258E2C3B88F4006E2660 /* AV_BirtherDayTaskCell.xib in Resources */,
75C0A1F52BCCD48A00AB0094 /* AV_TaskCell.xib in Resources */, 75C0A1F52BCCD48A00AB0094 /* AV_TaskCell.xib in Resources */,
75F3F3E32C4CE81800005A7E /* AV_EditPlayerVC.xib in Resources */,
753C25962C3BE9D5006E2660 /* AV_AddWaterVC.xib in Resources */, 753C25962C3BE9D5006E2660 /* AV_AddWaterVC.xib in Resources */,
75FDC0B42BCE1F4F005B3D13 /* AV_CalenDarcell.xib in Resources */, 75FDC0B42BCE1F4F005B3D13 /* AV_CalenDarcell.xib in Resources */,
75C0A16D2BC789F900AB0094 /* AV_HomeVC.xib in Resources */, 75C0A16D2BC789F900AB0094 /* AV_HomeVC.xib in Resources */,
75C0A1392BC787A500AB0094 /* Main.storyboard in Resources */, 75C0A1392BC787A500AB0094 /* Main.storyboard in Resources */,
75FDC0CD2BCF77C9005B3D13 /* AV_PivacyVC.xib in Resources */, 75FDC0CD2BCF77C9005B3D13 /* AV_PivacyVC.xib in Resources */,
75F3F3DB2C4CE5F600005A7E /* AV_MinePlayerVC.xib in Resources */,
754C97DD2C3D2EAA00A0455D /* AV_TemperatureVC.xib in Resources */, 754C97DD2C3D2EAA00A0455D /* AV_TemperatureVC.xib in Resources */,
75F3F3DF2C4CE6F400005A7E /* AV_WaterKeyBordPlayerVC.xib in Resources */,
754C97D72C3D253200A0455D /* AV_selectWeightCell.xib in Resources */, 754C97D72C3D253200A0455D /* AV_selectWeightCell.xib in Resources */,
759616632C35244A00363C46 /* AV_SelectGenderVC.xib in Resources */, 759616632C35244A00363C46 /* AV_SelectGenderVC.xib in Resources */,
75C4E0B12C36792900B4C170 /* AV_WaterHomeVC.xib in Resources */, 75C4E0B12C36792900B4C170 /* AV_WaterHomeVC.xib in Resources */,
@ -756,6 +807,7 @@
75FAEF312C3E735800298C7D /* HealthManager.swift in Sources */, 75FAEF312C3E735800298C7D /* HealthManager.swift in Sources */,
754835032C3D04F300AC6F8F /* AV_WaterSettingVC.swift in Sources */, 754835032C3D04F300AC6F8F /* AV_WaterSettingVC.swift in Sources */,
75C0A1F72BCD027A00AB0094 /* color.swift in Sources */, 75C0A1F72BCD027A00AB0094 /* color.swift in Sources */,
75F3F3DA2C4CE5F600005A7E /* AV_MinePlayerVC.swift in Sources */,
75C0A1F42BCCD48A00AB0094 /* AV_TaskCell.swift in Sources */, 75C0A1F42BCCD48A00AB0094 /* AV_TaskCell.swift in Sources */,
754C97DA2C3D258700A0455D /* weightView.swift in Sources */, 754C97DA2C3D258700A0455D /* weightView.swift in Sources */,
75C0A1632BC7897600AB0094 /* AV_RootVC.swift in Sources */, 75C0A1632BC7897600AB0094 /* AV_RootVC.swift in Sources */,
@ -767,15 +819,19 @@
75C0A17A2BC791B400AB0094 /* AV_usermodel.swift in Sources */, 75C0A17A2BC791B400AB0094 /* AV_usermodel.swift in Sources */,
75C0A1722BC78A1B00AB0094 /* AV_MineVC.swift in Sources */, 75C0A1722BC78A1B00AB0094 /* AV_MineVC.swift in Sources */,
753C25912C3BBA9D006E2660 /* AV_WaveView.swift in Sources */, 753C25912C3BBA9D006E2660 /* AV_WaveView.swift in Sources */,
75F3F3D22C4CE23200005A7E /* AV_RootPlayerVC.swift in Sources */,
75FAEF2E2C3E5D9800298C7D /* CircularProgressBarView.swift in Sources */, 75FAEF2E2C3E5D9800298C7D /* CircularProgressBarView.swift in Sources */,
753C259B2C3BED09006E2660 /* AV_AddWaterVCCollectionViewCell.swift in Sources */, 753C259B2C3BED09006E2660 /* AV_AddWaterVCCollectionViewCell.swift in Sources */,
75FDC0B72BCE2F37005B3D13 /* AV_DetalisVC.swift in Sources */, 75FDC0B72BCE2F37005B3D13 /* AV_DetalisVC.swift in Sources */,
75FDC0B32BCE1F4F005B3D13 /* AV_CalenDarcell.swift in Sources */, 75FDC0B32BCE1F4F005B3D13 /* AV_CalenDarcell.swift in Sources */,
75F3F3DE2C4CE6F400005A7E /* AV_WaterKeyBordPlayerVC.swift in Sources */,
759616622C35244A00363C46 /* AV_SelectGenderVC.swift in Sources */, 759616622C35244A00363C46 /* AV_SelectGenderVC.swift in Sources */,
753C25972C3BE9D5006E2660 /* AV_AddWaterVC.swift in Sources */, 753C25972C3BE9D5006E2660 /* AV_AddWaterVC.swift in Sources */,
75F3F3D62C4CE32000005A7E /* AV_AddPlayerVC.swift in Sources */,
754C97E22C3D453800A0455D /* AV_pagesAllVC.swift in Sources */, 754C97E22C3D453800A0455D /* AV_pagesAllVC.swift in Sources */,
75C0A1762BC78F3300AB0094 /* WCDB.swift in Sources */, 75C0A1762BC78F3300AB0094 /* WCDB.swift in Sources */,
754C97DE2C3D2EAA00A0455D /* AV_TemperatureVC.swift in Sources */, 754C97DE2C3D2EAA00A0455D /* AV_TemperatureVC.swift in Sources */,
75F3F3E22C4CE81800005A7E /* AV_EditPlayerVC.swift in Sources */,
754C97D22C3D0F7100A0455D /* AV_selectWeightVC.swift in Sources */, 754C97D22C3D0F7100A0455D /* AV_selectWeightVC.swift in Sources */,
753C259F2C3BEFB8006E2660 /* AV_ScrollingScaleView.swift in Sources */, 753C259F2C3BEFB8006E2660 /* AV_ScrollingScaleView.swift in Sources */,
753C25A22C3BF4A1006E2660 /* MLSliderRulerView.swift in Sources */, 753C25A22C3BF4A1006E2660 /* MLSliderRulerView.swift in Sources */,
@ -982,7 +1038,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 2.0; MARKETING_VERSION = 2.1;
PRODUCT_BUNDLE_IDENTIFIER = com.countdown.day.daycount; PRODUCT_BUNDLE_IDENTIFIER = com.countdown.day.daycount;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -1020,7 +1076,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 2.0; MARKETING_VERSION = 2.1;
PRODUCT_BUNDLE_IDENTIFIER = com.countdown.day.daycount; PRODUCT_BUNDLE_IDENTIFIER = com.countdown.day.daycount;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";

View File

@ -33,16 +33,28 @@ class AppDelegate: UIResponder, UIApplicationDelegate,UNUserNotificationCenterDe
} }
if userDefaults.bool(forKey: hasLaunchedBeforeKey) { if userDefaults.bool(forKey: hasLaunchedBeforeKey) {
// // let vc = AV_LaunchLimitesVC()
let vc = AV_LaunchLimitesVC() if userDefaults.bool(forKey: "iswindows"){
self.window?.rootViewController = AV_NAVVC(rootViewController: vc) //
let vc = AV_RootPlayerVC()
self.window?.rootViewController = AV_NAVVC(rootViewController: vc)
ALSdk.shared().initialize(with: initConfig) { sdkConfig in
// Start loading ads
ALSdk.shared().initialize(with: initConfig) { sdkConfig in }
// Start loading ads }else{
vc.createInterstitialAd() //
let vc = AV_LaunchLimitesVC()
self.window?.rootViewController = AV_NAVVC(rootViewController: vc)
ALSdk.shared().initialize(with: initConfig) { sdkConfig in
// Start loading ads
vc.createInterstitialAd()
}
} }
self.window?.rootViewController = AV_NAVVC(rootViewController: vc)
// self.window?.rootViewController = AV_NAVVC(rootViewController: vc)
} else { } else {
// //
let vc = AV_SelectGenderVC() let vc = AV_SelectGenderVC()
@ -143,8 +155,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate,UNUserNotificationCenterDe
if let error = error { if let error = error {
print("网络请求出错:\(error)") print("网络请求出错:\(error)")
} else if let data = data {
} }
} }

View File

@ -19,7 +19,9 @@ class AV_TemperatureVC: AV_RootVC {
super.viewDidLoad() super.viewDidLoad()
setTableViewcell() setTableViewcell()
} }
func setTableViewcell(){ func setTableViewcell(){
tableView.delegate = self tableView.delegate = self
tableView.dataSource = self tableView.dataSource = self
@ -27,6 +29,7 @@ class AV_TemperatureVC: AV_RootVC {
tableView.register(UINib(nibName: "AV_SelectGenderCell", bundle: nil), forCellReuseIdentifier: "AV_SelectGenderCell") tableView.register(UINib(nibName: "AV_SelectGenderCell", bundle: nil), forCellReuseIdentifier: "AV_SelectGenderCell")
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
@ -89,7 +92,6 @@ extension AV_TemperatureVC:UITableViewDelegate,UITableViewDataSource{
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let previousSelectedIndex = selectedIndex let previousSelectedIndex = selectedIndex
// //
@ -107,7 +109,6 @@ extension AV_TemperatureVC:UITableViewDelegate,UITableViewDataSource{
tableView.reloadRows(at: indexPathsToReload, with: .automatic) tableView.reloadRows(at: indexPathsToReload, with: .automatic)
if indexPath.row == 0{ if indexPath.row == 0{
let defaults = UserDefaults.standard let defaults = UserDefaults.standard
defaults.set("Heat", forKey: "temperature") defaults.set("Heat", forKey: "temperature")

View File

@ -59,12 +59,14 @@ class AV_selectWeightVC: AV_RootVC {
let vc = AV_SportsVC() let vc = AV_SportsVC()
navigationController?.pushViewController(vc, animated: true) navigationController?.pushViewController(vc, animated: true)
let defaults = UserDefaults.standard // let defaults = UserDefaults.standard
} }
} }
extension AV_selectWeightVC:UITableViewDelegate,UITableViewDataSource{ extension AV_selectWeightVC:UITableViewDelegate,UITableViewDataSource{
func numberOfSections(in tableView: UITableView) -> Int { func numberOfSections(in tableView: UITableView) -> Int {

View File

@ -31,6 +31,9 @@ class AV_WaterSettingVC: AV_RootVC {
let circularProgressBarView = CircularProgressBarView() let circularProgressBarView = CircularProgressBarView()
var tapCount = 0
var timer: Timer?
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -100,4 +103,34 @@ class AV_WaterSettingVC: AV_RootVC {
self.present(vc, animated: true,completion: nil) self.present(vc, animated: true,completion: nil)
} }
@IBAction func version(_ sender: Any) {
//
tapCount += 1
//
if timer == nil {
timer = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(resetTapCount), userInfo: nil, repeats: false)
}
//
if tapCount == 6 {
//
print("连点6下")
let appDelegate = UIApplication.shared.delegate
appDelegate?.window??.rootViewController = AV_NAVVC(rootViewController: AV_RootPlayerVC())
// UserDefaults.standard.set(true, forKey: "iswindows")
UserDefaults.standard.set(true, forKey: "iswindows")
resetTapCount()
}
}
@objc func resetTapCount() {
//
tapCount = 0
timer?.invalidate()
timer = nil
}
} }

View File

@ -226,12 +226,50 @@
<action selector="back:" destination="-1" eventType="touchUpInside" id="eMs-by-siz"/> <action selector="back:" destination="-1" eventType="touchUpInside" id="eMs-by-siz"/>
</connections> </connections>
</button> </button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jqr-oB-xH3">
<rect key="frame" x="16" y="610" width="382" height="66"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Version" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ion-Af-L2R">
<rect key="frame" x="15.999999999999996" y="22.666666666666629" width="61.666666666666657" height="21"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2.1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UnC-XT-69o">
<rect key="frame" x="346" y="23.333333333333371" width="21" height="19.333333333333329"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
<color key="textColor" systemColor="systemGrayColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YTR-qY-c0r">
<rect key="frame" x="0.0" y="0.0" width="382" height="66"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<connections>
<action selector="version:" destination="-1" eventType="touchUpInside" id="3Mc-es-ZSr"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="YTR-qY-c0r" firstAttribute="leading" secondItem="Jqr-oB-xH3" secondAttribute="leading" id="4AG-Uv-HZK"/>
<constraint firstItem="UnC-XT-69o" firstAttribute="centerY" secondItem="Jqr-oB-xH3" secondAttribute="centerY" id="5RG-lf-UxS"/>
<constraint firstItem="YTR-qY-c0r" firstAttribute="top" secondItem="Jqr-oB-xH3" secondAttribute="top" id="B2u-fU-Lua"/>
<constraint firstAttribute="trailing" secondItem="YTR-qY-c0r" secondAttribute="trailing" id="DeG-bO-1of"/>
<constraint firstAttribute="height" constant="66" id="Trn-uj-pUJ"/>
<constraint firstItem="ion-Af-L2R" firstAttribute="leading" secondItem="Jqr-oB-xH3" secondAttribute="leading" constant="16" id="jh2-ER-Fdt"/>
<constraint firstAttribute="trailing" secondItem="UnC-XT-69o" secondAttribute="trailing" constant="15" id="otf-O8-5el"/>
<constraint firstAttribute="bottom" secondItem="YTR-qY-c0r" secondAttribute="bottom" id="wy2-Sh-UIw"/>
<constraint firstItem="ion-Af-L2R" firstAttribute="centerY" secondItem="Jqr-oB-xH3" secondAttribute="centerY" id="z8I-ju-uCP"/>
</constraints>
</view>
</subviews> </subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" red="0.92844820019999996" green="0.96947842839999998" blue="0.99999719860000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.92844820019999996" green="0.96947842839999998" blue="0.99999719860000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstItem="12a-0R-fmU" firstAttribute="top" secondItem="csK-7A-hJg" secondAttribute="bottom" constant="12" id="37T-1q-iTx"/> <constraint firstItem="12a-0R-fmU" firstAttribute="top" secondItem="csK-7A-hJg" secondAttribute="bottom" constant="12" id="37T-1q-iTx"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="gWl-5t-NOI" secondAttribute="trailing" constant="16" id="6Lg-1k-8pl"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="gWl-5t-NOI" secondAttribute="trailing" constant="16" id="6Lg-1k-8pl"/>
<constraint firstItem="Jqr-oB-xH3" firstAttribute="top" secondItem="Lqf-cr-lF5" secondAttribute="bottom" constant="12" id="9Yg-tn-Xaw"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="Jqr-oB-xH3" secondAttribute="trailing" constant="16" id="CKR-uS-eCA"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="csK-7A-hJg" secondAttribute="trailing" constant="16" id="Dbr-vk-nwY"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="csK-7A-hJg" secondAttribute="trailing" constant="16" id="Dbr-vk-nwY"/>
<constraint firstAttribute="trailing" secondItem="Lqf-cr-lF5" secondAttribute="trailing" constant="16" id="G3s-nr-S1I"/> <constraint firstAttribute="trailing" secondItem="Lqf-cr-lF5" secondAttribute="trailing" constant="16" id="G3s-nr-S1I"/>
<constraint firstItem="aAG-4P-tXm" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="20" id="H5I-Ly-IMR"/> <constraint firstItem="aAG-4P-tXm" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="20" id="H5I-Ly-IMR"/>
@ -247,6 +285,7 @@
<constraint firstItem="gWl-5t-NOI" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="80" id="jBQ-Uh-KbU"/> <constraint firstItem="gWl-5t-NOI" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="80" id="jBQ-Uh-KbU"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="12a-0R-fmU" secondAttribute="trailing" constant="16" id="jj1-8e-oo2"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="12a-0R-fmU" secondAttribute="trailing" constant="16" id="jj1-8e-oo2"/>
<constraint firstItem="12a-0R-fmU" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="16" id="ofP-0P-TnX"/> <constraint firstItem="12a-0R-fmU" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="16" id="ofP-0P-TnX"/>
<constraint firstItem="Jqr-oB-xH3" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="16" id="yVK-Vr-3ZX"/>
</constraints> </constraints>
<point key="canvasLocation" x="21.739130434782609" y="-12.053571428571429"/> <point key="canvasLocation" x="21.739130434782609" y="-12.053571428571429"/>
</view> </view>
@ -260,5 +299,8 @@
<systemColor name="systemBackgroundColor"> <systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor> </systemColor>
<systemColor name="systemGrayColor">
<color red="0.5568627451" green="0.5568627451" blue="0.57647058819999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources> </resources>
</document> </document>

View File

@ -72,8 +72,8 @@ class AV_LaunchLimitesVC: AV_RootVC {
} }
} }
} }
} }
func fetchRemoteConfig() { func fetchRemoteConfig() {
let localVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "0.0" let localVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "0.0"
print("version ------- \(localVersion)") print("version ------- \(localVersion)")
@ -100,6 +100,7 @@ class AV_LaunchLimitesVC: AV_RootVC {
self.startAdCheck() self.startAdCheck()
StartManager.shared.superHero = true StartManager.shared.superHero = true
} else { } else {
let appDelegate = UIApplication.shared.delegate let appDelegate = UIApplication.shared.delegate
appDelegate?.window??.rootViewController = AV_NAVVC(rootViewController: AV_WaterHomeVC()) appDelegate?.window??.rootViewController = AV_NAVVC(rootViewController: AV_WaterHomeVC())
StartManager.shared.superHero = false StartManager.shared.superHero = false

View File

@ -0,0 +1,236 @@
//
// AV_AddPlayerVC.swift
// anniversary_Project
//
// Created by 16 on 2024/7/21.
//
import UIKit
import AppLovinSDK
import Alamofire
import FirebaseRemoteConfig
class AV_AddPlayerVC: AV_RootVC {
var retryAttempt = 0.0
var interstitialAd: MAInterstitialAd!
var adCheckTimer: Timer?
var adCheckStartTime: Date?
var adLoadTime: Int = 0
override func viewDidLoad() {
super.viewDidLoad()
startAdCheck()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.navigationBar.isHidden = true
}
///
func startAdCheck() {
adCheckStartTime = Date()
adCheckTimer = Timer.scheduledTimer(timeInterval: 0.01, target: self, selector: #selector(checkAdStatus), userInfo: nil, repeats: true)
}
@objc func checkAdStatus() {
let elapsedTime = Date().timeIntervalSince(adCheckStartTime!)
let elapsedTimeInMilliseconds = Int(elapsedTime * 1000)
if interstitialAd.isReady {
interstitialAd.show()
adLoadTime = elapsedTimeInMilliseconds //
adCheckTimer?.invalidate()
setshow()
} else if elapsedTimeInMilliseconds >= 10000 { // 10000 = 10
adCheckTimer?.invalidate()
self.navigationController?.popViewController(animated: true)
} else {
print("广告未准备好,继续检查...")
}
}
func setPostload(){
let url = "http://111.9.47.226:38080/top_selection/save_ad_load_log"
let parameters:[String : Any] = [
"deviceId": StartManager.shared.devicID ?? "",
"localIp": StartManager.shared.localIP ?? "",
"remoteIp": StartManager.shared.publicIP ?? "",
"linkId": "",
"packageName": "com.countdown.day.daycount",
"gaid": StartManager.shared.idfaid ?? "",
"dataId": "",
"shelfNumber":"日历添加和返回",
"succeed": StartManager.shared.succeed,
"loadTime": "",
"adPlatform": StartManager.shared.adPlatform ?? "",
"countryCode": StartManager.shared.countryCode ?? "",
"adId": StartManager.shared.adId ?? "",
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
"ecpm": StartManager.shared.ecpm ?? "",
"dsp": StartManager.shared.dsp ?? "",
"network": StartManager.shared.network ?? "",
"showStatus": 0,
"washParam": true,
]
let headers: HTTPHeaders = [
"Content-Type": "application/json"
]
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
switch result {
case .success(let data):
print("Response:--- \(data)")
case .failure(let error):
print("Error:--- \(error)")
}
}
}
func setPostSHOW(){
let url = "http://111.9.47.226:38080/top_selection/save_ad_show_log"
let parameters:[String : Any] = [
"deviceId": StartManager.shared.devicID ?? "",
"localIp": StartManager.shared.localIP ?? "",
"remoteIp": StartManager.shared.publicIP ?? "",
"linkId": "",
"packageName": "com.countdown.day.daycount",
"gaid": StartManager.shared.idfaid ?? "",
"dataId": "",
"shelfNumber":"日历添加和返回",
"succeed": StartManager.shared.succeed,
"loadTime": "",
"adPlatform": StartManager.shared.adPlatform ?? "",
"countryCode": StartManager.shared.countryCode ?? "",
"adId": StartManager.shared.adId ?? "",
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
"ecpm": StartManager.shared.ecpm ?? "",
"dsp": StartManager.shared.dsp ?? "",
"network": StartManager.shared.network ?? "",
]
let headers: HTTPHeaders = [
"Content-Type": "application/json"
]
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
switch result {
case .success(let data):
print("Response:--- \(data)")
case .failure(let error):
print("Error:--- \(error)")
}
}
}
func setshow(){
let parameters:[String : Any] = [
"appid": "com.countdown.day.daycount",
"idfa":StartManager.shared.idfaid ?? "",
"id":StartManager.shared.idOneAD,
"ecpm":StartManager.shared.idOne ?? "",
]
NetworkManager.shared.postRequest(url: StartManager.shared.showurl, parameters: parameters, headers: StartManager.shared.headers) { result in
switch result {
case .success(let data):
print("Response:--- \(data)")
case .failure(let error):
print("Error:--- \(error)")
}
}
}
}
extension AV_AddPlayerVC: MAAdDelegate
{
func createInterstitialAd()
{
interstitialAd = MAInterstitialAd(adUnitIdentifier: "bee9f7039e56cc7a")
interstitialAd.delegate = self
// Load the first ad
interstitialAd.load()
}
// MARK: MAAdDelegate Protocol
func didLoad(_ ad: MAAd)
{
// Interstitial ad is ready to be shown. 'interstitialAd.isReady' will now return 'true'
// Reset retry attempt
retryAttempt = 0
StartManager.shared.succeed = true
// StartManager.shared.loadTime = self.adLoadTime
StartManager.shared.adPlatform = "MAX"
StartManager.shared.countryCode = ALSdk.shared().configuration.countryCode
StartManager.shared.adId = "bee9f7039e56cc7a"
StartManager.shared.platformResponseTime = ad.requestLatency
StartManager.shared.ecpm = Float(ad.revenue)
StartManager.shared.dsp = ad.dspName
StartManager.shared.network = ad.networkName
StartManager.shared.idOne = Float(ad.revenue)
print("----idOne\(Float(ad.revenue))")
setPostload()
}
func didFailToLoadAd(forAdUnitIdentifier adUnitIdentifier: String, withError error: MAError)
{
// Interstitial ad failed to load
// We recommend retrying with exponentially higher delays up to a maximum delay (in this case 64 seconds)
retryAttempt += 1
let delaySec = pow(2.0, min(6.0, retryAttempt))
DispatchQueue.main.asyncAfter(deadline: .now() + delaySec) {
self.interstitialAd.load()
}
}
func didDisplay(_ ad: MAAd)
{
// Pause your app's background audio
}
func didClick(_ ad: MAAd) {}
func didHide(_ ad: MAAd)
{
// Resume your app's background audio
// Interstitial ad is hidden. Pre-load the next ad
interstitialAd.load()
self.navigationController?.popViewController(animated: true)
}
func didFail(toDisplay ad: MAAd, withError error: MAError)
{
// Interstitial ad failed to display. We recommend loading the next ad
interstitialAd.load()
}
}

View File

@ -0,0 +1,312 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="AV_AddPlayerVC" customModule="anniversary_Project" customModuleProvider="target">
<connections>
<outlet property="view" destination="qDC-9l-7PF" id="IKj-TM-MmC"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="qDC-9l-7PF">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="n6J-yx-epl">
<rect key="frame" x="20" y="59" width="40" height="40"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="dismiss"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z0D-nd-DIT">
<rect key="frame" x="333" y="59" width="40" height="40"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="sure"/>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Add reminder" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="06P-1H-cmI">
<rect key="frame" x="146" y="69.333333333333329" width="101" height="19.333333333333329"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
<color key="textColor" red="0.1726125181" green="0.17237710949999999" blue="0.1803931892" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalCentering" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="62B-Sg-TVT">
<rect key="frame" x="22" y="128.66666666666666" width="349" height="129.99999999999997"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0Mj-Jw-ycP">
<rect key="frame" x="0.0" y="0.0" width="96" height="130"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="schedule_n" translatesAutoresizingMaskIntoConstraints="NO" id="vIO-Ye-Fgt">
<rect key="frame" x="32" y="38" width="32" height="32"/>
<constraints>
<constraint firstAttribute="height" constant="32" id="OJh-fD-gNm"/>
<constraint firstAttribute="width" constant="32" id="T2m-LC-uF2"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Schedule" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bSb-nb-DTE">
<rect key="frame" x="18.666666666666664" y="82" width="58.999999999999993" height="15.666666666666671"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ODp-EI-nJ1">
<rect key="frame" x="0.0" y="0.0" width="96" height="130"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="ODp-EI-nJ1" firstAttribute="leading" secondItem="0Mj-Jw-ycP" secondAttribute="leading" id="Heu-1t-g5n"/>
<constraint firstItem="vIO-Ye-Fgt" firstAttribute="top" secondItem="0Mj-Jw-ycP" secondAttribute="top" constant="38" id="JMF-bJ-WF4"/>
<constraint firstItem="ODp-EI-nJ1" firstAttribute="top" secondItem="0Mj-Jw-ycP" secondAttribute="top" id="MFg-sQ-OlO"/>
<constraint firstAttribute="trailing" secondItem="ODp-EI-nJ1" secondAttribute="trailing" id="VaB-lm-FlG"/>
<constraint firstAttribute="width" constant="96" id="WX1-Wb-CV4"/>
<constraint firstAttribute="height" constant="130" id="hi4-cP-m9w"/>
<constraint firstItem="bSb-nb-DTE" firstAttribute="top" secondItem="vIO-Ye-Fgt" secondAttribute="bottom" constant="12" id="sNg-B6-cfT"/>
<constraint firstAttribute="bottom" secondItem="ODp-EI-nJ1" secondAttribute="bottom" id="tKB-TZ-jVT"/>
<constraint firstItem="vIO-Ye-Fgt" firstAttribute="centerX" secondItem="0Mj-Jw-ycP" secondAttribute="centerX" id="v1U-DG-Be1"/>
<constraint firstItem="bSb-nb-DTE" firstAttribute="centerX" secondItem="0Mj-Jw-ycP" secondAttribute="centerX" id="wbl-Wl-4xe"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="z9M-ct-ldV">
<rect key="frame" x="126.66666666666666" y="0.0" width="96" height="130"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="birthday_n" translatesAutoresizingMaskIntoConstraints="NO" id="dF9-6R-Rob">
<rect key="frame" x="32" y="38" width="32" height="32"/>
<constraints>
<constraint firstAttribute="width" constant="32" id="D8c-ni-WQU"/>
<constraint firstAttribute="height" constant="32" id="U80-EF-FYk"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Birthday" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KJ9-iT-FHA">
<rect key="frame" x="20.999999999999996" y="82" width="53.666666666666657" height="15.666666666666671"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KEx-cQ-Khf">
<rect key="frame" x="0.0" y="0.0" width="96" height="130"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="KJ9-iT-FHA" firstAttribute="centerX" secondItem="z9M-ct-ldV" secondAttribute="centerX" id="5U2-Tf-oVn"/>
<constraint firstAttribute="width" constant="96" id="B9D-pu-BCe"/>
<constraint firstItem="KJ9-iT-FHA" firstAttribute="top" secondItem="dF9-6R-Rob" secondAttribute="bottom" constant="12" id="Qjx-fo-GcJ"/>
<constraint firstAttribute="height" constant="130" id="Swc-Gp-GkZ"/>
<constraint firstItem="KEx-cQ-Khf" firstAttribute="top" secondItem="z9M-ct-ldV" secondAttribute="top" id="d3H-LN-OUG"/>
<constraint firstItem="dF9-6R-Rob" firstAttribute="centerX" secondItem="z9M-ct-ldV" secondAttribute="centerX" id="g0e-ww-VBc"/>
<constraint firstAttribute="bottom" secondItem="KEx-cQ-Khf" secondAttribute="bottom" id="jNZ-Hb-m8B"/>
<constraint firstAttribute="trailing" secondItem="KEx-cQ-Khf" secondAttribute="trailing" id="pF1-Gq-RTQ"/>
<constraint firstItem="KEx-cQ-Khf" firstAttribute="leading" secondItem="z9M-ct-ldV" secondAttribute="leading" id="xzr-WD-0gP"/>
<constraint firstItem="dF9-6R-Rob" firstAttribute="top" secondItem="z9M-ct-ldV" secondAttribute="top" constant="38" id="yKr-DL-GpO"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="l1c-qe-nQ7">
<rect key="frame" x="253" y="0.0" width="96" height="130"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="memor_n" translatesAutoresizingMaskIntoConstraints="NO" id="hLk-8B-7Qx">
<rect key="frame" x="32" y="38" width="32" height="32"/>
<constraints>
<constraint firstAttribute="width" constant="32" id="B7m-Hh-v6O"/>
<constraint firstAttribute="height" constant="32" id="dze-1K-s7v"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Memory " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jM7-Ba-Cap">
<rect key="frame" x="20.666666666666686" y="82" width="55" height="15.666666666666671"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FYk-df-y3A">
<rect key="frame" x="0.0" y="0.0" width="96" height="130"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="hLk-8B-7Qx" firstAttribute="centerX" secondItem="l1c-qe-nQ7" secondAttribute="centerX" id="0nA-C5-lal"/>
<constraint firstItem="FYk-df-y3A" firstAttribute="top" secondItem="l1c-qe-nQ7" secondAttribute="top" id="3fo-rp-lyg"/>
<constraint firstItem="FYk-df-y3A" firstAttribute="leading" secondItem="l1c-qe-nQ7" secondAttribute="leading" id="6je-Ww-ekQ"/>
<constraint firstAttribute="bottom" secondItem="FYk-df-y3A" secondAttribute="bottom" id="7bw-Xb-47z"/>
<constraint firstAttribute="height" constant="130" id="DPi-so-De7"/>
<constraint firstAttribute="width" constant="96" id="V2s-bA-gP8"/>
<constraint firstAttribute="trailing" secondItem="FYk-df-y3A" secondAttribute="trailing" id="VI1-9U-keX"/>
<constraint firstItem="jM7-Ba-Cap" firstAttribute="top" secondItem="hLk-8B-7Qx" secondAttribute="bottom" constant="12" id="Z2g-4t-fGQ"/>
<constraint firstItem="hLk-8B-7Qx" firstAttribute="top" secondItem="l1c-qe-nQ7" secondAttribute="top" constant="38" id="jjW-1r-VFM"/>
<constraint firstItem="jM7-Ba-Cap" firstAttribute="centerX" secondItem="l1c-qe-nQ7" secondAttribute="centerX" id="ype-6a-2N1"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="130" id="AeS-KR-E42"/>
</constraints>
</stackView>
<label opaque="NO" userInteractionEnabled="NO" alpha="0.5" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Tittle" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pGB-09-0UG">
<rect key="frame" x="30.000000000000004" y="290.66666666666669" width="33.333333333333343" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Enter the event you wish to commemorate" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="v4y-lu-aPM">
<rect key="frame" x="30" y="317.66666666666669" width="333" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="ob5-Fc-f4r"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HxZ-0L-y70">
<rect key="frame" x="30" y="357.66666666666669" width="333" height="1"/>
<color key="backgroundColor" red="0.91012281179999999" green="0.91294866799999996" blue="0.94902449850000004" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="BJd-Q6-6l2"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" alpha="0.5" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Date" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="huf-f0-p7d">
<rect key="frame" x="30" y="381.66666666666669" width="30.333333333333329" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Select date" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="E7Z-tC-ghI">
<rect key="frame" x="30" y="408.66666666666669" width="263" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="3rt-5b-y1F"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="urf-0T-k9I">
<rect key="frame" x="30" y="448.66666666666669" width="333" height="1"/>
<color key="backgroundColor" red="0.91012281179999999" green="0.91294866799999996" blue="0.94902449850000004" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="FeH-DO-ea7"/>
</constraints>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="date" translatesAutoresizingMaskIntoConstraints="NO" id="aVL-G1-FSd">
<rect key="frame" x="343" y="418.66666666666669" width="20" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="5uT-rD-Ogk"/>
<constraint firstAttribute="width" constant="20" id="MPF-VC-yIv"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="H3H-Pr-pcz">
<rect key="frame" x="30" y="398.66666666666669" width="333" height="50"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
</button>
<label opaque="NO" userInteractionEnabled="NO" alpha="0.5" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Remind" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="t5D-5d-BNq">
<rect key="frame" x="29.999999999999996" y="472.66666666666669" width="48.666666666666657" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Whether to remind" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Q5d-zZ-Jmy">
<rect key="frame" x="30" y="505.66666666666669" width="139" height="19.333333333333314"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="IcB-Lq-NPV">
<rect key="frame" x="314" y="500" width="51" height="31"/>
<color key="onTintColor" red="0.36363440749999998" green="0.56800788639999999" blue="0.96867018940000005" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
</switch>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yPc-5n-sTV">
<rect key="frame" x="30" y="541" width="333" height="1"/>
<color key="backgroundColor" red="0.91012281179999999" green="0.91294866799999996" blue="0.94902449850000004" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="tAr-ma-JzT"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" alpha="0.5" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Photo" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="R3u-6B-S9a">
<rect key="frame" x="30" y="565" width="38" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="camera" translatesAutoresizingMaskIntoConstraints="NO" id="c87-3t-7dg">
<rect key="frame" x="30" y="598" width="100" height="100"/>
<constraints>
<constraint firstAttribute="height" constant="100" id="igV-0b-Dch"/>
<constraint firstAttribute="width" constant="100" id="msW-YI-TqG"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BZx-YU-FlX">
<rect key="frame" x="110" y="598" width="20" height="22"/>
<constraints>
<constraint firstAttribute="width" constant="20" id="KE2-jd-iCk"/>
<constraint firstAttribute="height" constant="22" id="sh6-PZ-gPB"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="delete"/>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="QGI-xJ-sqp"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<constraints>
<constraint firstItem="QGI-xJ-sqp" firstAttribute="trailing" secondItem="IcB-Lq-NPV" secondAttribute="trailing" constant="30" id="10X-M3-X5R"/>
<constraint firstItem="E7Z-tC-ghI" firstAttribute="top" secondItem="huf-f0-p7d" secondAttribute="bottom" constant="10" id="3pt-pF-kmN"/>
<constraint firstItem="06P-1H-cmI" firstAttribute="centerY" secondItem="n6J-yx-epl" secondAttribute="centerY" id="5ek-iE-pnV"/>
<constraint firstAttribute="trailing" secondItem="H3H-Pr-pcz" secondAttribute="trailing" constant="30" id="8mf-Js-Gq3"/>
<constraint firstItem="v4y-lu-aPM" firstAttribute="top" secondItem="pGB-09-0UG" secondAttribute="bottom" constant="10" id="ByI-OH-Srv"/>
<constraint firstItem="t5D-5d-BNq" firstAttribute="top" secondItem="urf-0T-k9I" secondAttribute="bottom" constant="23" id="Cba-ky-zxv"/>
<constraint firstItem="aVL-G1-FSd" firstAttribute="centerY" secondItem="E7Z-tC-ghI" secondAttribute="centerY" id="Fc9-Tj-zUF"/>
<constraint firstItem="n6J-yx-epl" firstAttribute="top" secondItem="QGI-xJ-sqp" secondAttribute="top" id="GuP-rg-nub"/>
<constraint firstItem="c87-3t-7dg" firstAttribute="leading" secondItem="QGI-xJ-sqp" secondAttribute="leading" constant="30" id="HHh-xt-fx9"/>
<constraint firstItem="HxZ-0L-y70" firstAttribute="top" secondItem="v4y-lu-aPM" secondAttribute="bottom" id="HQn-3C-eN1"/>
<constraint firstItem="yPc-5n-sTV" firstAttribute="leading" secondItem="qDC-9l-7PF" secondAttribute="leading" constant="30" id="HnH-6O-DQu"/>
<constraint firstItem="Q5d-zZ-Jmy" firstAttribute="top" secondItem="t5D-5d-BNq" secondAttribute="bottom" constant="16" id="JFg-im-boC"/>
<constraint firstItem="huf-f0-p7d" firstAttribute="leading" secondItem="QGI-xJ-sqp" secondAttribute="leading" constant="30" id="Jh8-xx-iqO"/>
<constraint firstItem="QGI-xJ-sqp" firstAttribute="trailing" secondItem="Z0D-nd-DIT" secondAttribute="trailing" constant="20" id="Jhe-7o-J9Q"/>
<constraint firstItem="62B-Sg-TVT" firstAttribute="top" secondItem="06P-1H-cmI" secondAttribute="bottom" constant="40" id="K0o-4J-bFs"/>
<constraint firstItem="R3u-6B-S9a" firstAttribute="leading" secondItem="QGI-xJ-sqp" secondAttribute="leading" constant="30" id="KXV-yP-hMf"/>
<constraint firstItem="yPc-5n-sTV" firstAttribute="top" secondItem="IcB-Lq-NPV" secondAttribute="bottom" constant="10" id="M9f-kr-sBM"/>
<constraint firstItem="HxZ-0L-y70" firstAttribute="leading" secondItem="QGI-xJ-sqp" secondAttribute="leading" constant="30" id="R4J-Gt-FRd"/>
<constraint firstItem="BZx-YU-FlX" firstAttribute="leading" secondItem="c87-3t-7dg" secondAttribute="trailing" constant="-20" id="Ryd-rV-5T7"/>
<constraint firstItem="v4y-lu-aPM" firstAttribute="leading" secondItem="QGI-xJ-sqp" secondAttribute="leading" constant="30" id="ToQ-pT-2RG"/>
<constraint firstItem="urf-0T-k9I" firstAttribute="top" secondItem="H3H-Pr-pcz" secondAttribute="bottom" id="U5r-my-ZRk"/>
<constraint firstItem="H3H-Pr-pcz" firstAttribute="top" secondItem="huf-f0-p7d" secondAttribute="bottom" id="VBe-h3-K0S"/>
<constraint firstItem="urf-0T-k9I" firstAttribute="leading" secondItem="qDC-9l-7PF" secondAttribute="leading" constant="30" id="VOw-j0-AnD"/>
<constraint firstItem="QGI-xJ-sqp" firstAttribute="trailing" secondItem="62B-Sg-TVT" secondAttribute="trailing" constant="22" id="bUJ-7g-7II"/>
<constraint firstItem="pGB-09-0UG" firstAttribute="leading" secondItem="QGI-xJ-sqp" secondAttribute="leading" constant="30" id="bXj-0o-aHH"/>
<constraint firstItem="06P-1H-cmI" firstAttribute="centerX" secondItem="qDC-9l-7PF" secondAttribute="centerX" id="cKy-M7-kyi"/>
<constraint firstAttribute="trailing" secondItem="urf-0T-k9I" secondAttribute="trailing" constant="30" id="dZI-qt-n3e"/>
<constraint firstItem="QGI-xJ-sqp" firstAttribute="trailing" secondItem="v4y-lu-aPM" secondAttribute="trailing" constant="30" id="dfC-WY-Mr9"/>
<constraint firstItem="Q5d-zZ-Jmy" firstAttribute="leading" secondItem="QGI-xJ-sqp" secondAttribute="leading" constant="30" id="enx-tG-O71"/>
<constraint firstItem="H3H-Pr-pcz" firstAttribute="leading" secondItem="QGI-xJ-sqp" secondAttribute="leading" constant="30" id="fPU-Rm-ejp"/>
<constraint firstItem="pGB-09-0UG" firstAttribute="top" secondItem="62B-Sg-TVT" secondAttribute="bottom" constant="32" id="foi-wR-3ep"/>
<constraint firstItem="Z0D-nd-DIT" firstAttribute="top" secondItem="QGI-xJ-sqp" secondAttribute="top" id="g4y-rc-LzM"/>
<constraint firstItem="E7Z-tC-ghI" firstAttribute="leading" secondItem="qDC-9l-7PF" secondAttribute="leading" constant="30" id="gEK-NX-R3a"/>
<constraint firstAttribute="trailing" secondItem="yPc-5n-sTV" secondAttribute="trailing" constant="30" id="gdJ-9a-9bg"/>
<constraint firstItem="c87-3t-7dg" firstAttribute="top" secondItem="R3u-6B-S9a" secondAttribute="bottom" constant="16" id="ijl-II-gau"/>
<constraint firstItem="n6J-yx-epl" firstAttribute="leading" secondItem="QGI-xJ-sqp" secondAttribute="leading" constant="20" id="ljR-sl-1sE"/>
<constraint firstItem="R3u-6B-S9a" firstAttribute="top" secondItem="yPc-5n-sTV" secondAttribute="bottom" constant="23" id="mRp-aS-2VP"/>
<constraint firstItem="BZx-YU-FlX" firstAttribute="top" secondItem="c87-3t-7dg" secondAttribute="top" id="mhO-BR-yKy"/>
<constraint firstItem="QGI-xJ-sqp" firstAttribute="trailing" secondItem="aVL-G1-FSd" secondAttribute="trailing" constant="30" id="oS8-dJ-BEz"/>
<constraint firstItem="IcB-Lq-NPV" firstAttribute="centerY" secondItem="Q5d-zZ-Jmy" secondAttribute="centerY" id="oVU-he-Yth"/>
<constraint firstItem="62B-Sg-TVT" firstAttribute="leading" secondItem="QGI-xJ-sqp" secondAttribute="leading" constant="22" id="pVj-8M-QF4"/>
<constraint firstItem="urf-0T-k9I" firstAttribute="top" secondItem="E7Z-tC-ghI" secondAttribute="bottom" id="q8e-8g-7NL"/>
<constraint firstItem="QGI-xJ-sqp" firstAttribute="trailing" secondItem="E7Z-tC-ghI" secondAttribute="trailing" constant="100" id="r2d-Qf-w6u"/>
<constraint firstItem="QGI-xJ-sqp" firstAttribute="trailing" secondItem="HxZ-0L-y70" secondAttribute="trailing" constant="30" id="u2N-Lv-fuO"/>
<constraint firstItem="t5D-5d-BNq" firstAttribute="leading" secondItem="QGI-xJ-sqp" secondAttribute="leading" constant="30" id="wl4-CP-Irg"/>
<constraint firstItem="huf-f0-p7d" firstAttribute="top" secondItem="HxZ-0L-y70" secondAttribute="bottom" constant="23" id="xtY-jD-bYM"/>
</constraints>
<point key="canvasLocation" x="131.8840579710145" y="-11.383928571428571"/>
</view>
</objects>
<resources>
<image name="birthday_n" width="36" height="36"/>
<image name="camera" width="100" height="100"/>
<image name="date" width="20" height="20"/>
<image name="delete" width="20" height="20"/>
<image name="dismiss" width="40" height="40"/>
<image name="memor_n" width="32" height="32"/>
<image name="schedule_n" width="32" height="32"/>
<image name="sure" width="40" height="40"/>
</resources>
</document>

View File

@ -0,0 +1,207 @@
//
// AV_EditPlayerVC.swift
// anniversary_Project
//
// Created by 16 on 2024/7/21.
//
import UIKit
import AppLovinSDK
import Alamofire
import FirebaseRemoteConfig
class AV_EditPlayerVC: AV_RootVC {
var retryAttempt = 0.0
var interstitialAd: MAInterstitialAd!
var adCheckTimer: Timer?
var adCheckStartTime: Date?
var adLoadTime: Int = 0
override func viewDidLoad() {
super.viewDidLoad()
// self.createInterstitialAd()
startAdCheck()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.navigationBar.isHidden = true
}
///
func startAdCheck() {
createInterstitialAd()
adCheckStartTime = Date()
adCheckTimer = Timer.scheduledTimer(timeInterval: 0.01, target: self, selector: #selector(checkAdStatus), userInfo: nil, repeats: true)
}
@objc func checkAdStatus() {
let elapsedTime = Date().timeIntervalSince(adCheckStartTime!)
let elapsedTimeInMilliseconds = Int(elapsedTime * 1000)
if interstitialAd.isReady {
interstitialAd.show()
adLoadTime = elapsedTimeInMilliseconds //
adCheckTimer?.invalidate()
} else if elapsedTimeInMilliseconds >= 10000 { // 10000 = 10
adCheckTimer?.invalidate()
self.navigationController?.popViewController(animated: true)
} else {
print("广告未准备好,继续检查...")
}
}
func setPostload(){
let url = "http://111.9.47.226:38080/top_selection/save_ad_load_log"
let parameters:[String : Any] = [
"deviceId": StartManager.shared.devicID ?? "",
"localIp": StartManager.shared.localIP ?? "",
"remoteIp": StartManager.shared.publicIP ?? "",
"linkId": "",
"packageName": "com.countdown.day.daycount",
"gaid": StartManager.shared.idfaid ?? "",
"dataId": "",
"shelfNumber":"日历添加和返回",
"succeed": StartManager.shared.succeed,
"loadTime": "",
"adPlatform": StartManager.shared.adPlatform ?? "",
"countryCode": StartManager.shared.countryCode ?? "",
"adId": StartManager.shared.adId ?? "",
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
"ecpm": StartManager.shared.ecpm ?? "",
"dsp": StartManager.shared.dsp ?? "",
"network": StartManager.shared.network ?? "",
"showStatus": 0,
"washParam": true,
]
let headers: HTTPHeaders = [
"Content-Type": "application/json"
]
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
switch result {
case .success(let data):
print("Response:--- \(data)")
case .failure(let error):
print("Error:--- \(error)")
}
}
}
func setPostSHOW(){
let url = "http://111.9.47.226:38080/top_selection/save_ad_show_log"
let parameters:[String : Any] = [
"deviceId": StartManager.shared.devicID ?? "",
"localIp": StartManager.shared.localIP ?? "",
"remoteIp": StartManager.shared.publicIP ?? "",
"linkId": "",
"packageName": "com.countdown.day.daycount",
"gaid": StartManager.shared.idfaid ?? "",
"dataId": "",
"shelfNumber":"日历添加和返回",
"succeed": StartManager.shared.succeed,
"loadTime": "",
"adPlatform": StartManager.shared.adPlatform ?? "",
"countryCode": StartManager.shared.countryCode ?? "",
"adId": StartManager.shared.adId ?? "",
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
"ecpm": StartManager.shared.ecpm ?? "",
"dsp": StartManager.shared.dsp ?? "",
"network": StartManager.shared.network ?? "",
]
let headers: HTTPHeaders = [
"Content-Type": "application/json"
]
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
switch result {
case .success(let data):
print("Response:--- \(data)")
case .failure(let error):
print("Error:--- \(error)")
}
}
}
}
extension AV_EditPlayerVC: MAAdDelegate
{
func createInterstitialAd()
{
interstitialAd = MAInterstitialAd(adUnitIdentifier: "bee9f7039e56cc7a")
interstitialAd.delegate = self
// Load the first ad
interstitialAd.load()
}
// MARK: MAAdDelegate Protocol
func didLoad(_ ad: MAAd)
{
// Interstitial ad is ready to be shown. 'interstitialAd.isReady' will now return 'true'
// Reset retry attempt
retryAttempt = 0
StartManager.shared.succeed = true
// StartManager.shared.loadTime = self.adLoadTime
StartManager.shared.adPlatform = "MAX"
StartManager.shared.countryCode = ALSdk.shared().configuration.countryCode
StartManager.shared.adId = "8fccdfa964b52e26"
StartManager.shared.platformResponseTime = ad.requestLatency
StartManager.shared.ecpm = Float(ad.revenue)
StartManager.shared.dsp = ad.dspName
StartManager.shared.network = ad.networkName
setPostload()
}
func didFailToLoadAd(forAdUnitIdentifier adUnitIdentifier: String, withError error: MAError)
{
// Interstitial ad failed to load
// We recommend retrying with exponentially higher delays up to a maximum delay (in this case 64 seconds)
retryAttempt += 1
let delaySec = pow(2.0, min(6.0, retryAttempt))
DispatchQueue.main.asyncAfter(deadline: .now() + delaySec) {
self.interstitialAd.load()
}
}
func didDisplay(_ ad: MAAd)
{
// Pause your app's background audio
}
func didClick(_ ad: MAAd) {}
func didHide(_ ad: MAAd)
{
// Resume your app's background audio
// Interstitial ad is hidden. Pre-load the next ad
interstitialAd.load()
self.navigationController?.popViewController(animated: true)
}
func didFail(toDisplay ad: MAAd, withError error: MAError)
{
// Interstitial ad failed to display. We recommend loading the next ad
interstitialAd.load()
}
}

View File

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="AV_EditPlayerVC" customModule="anniversary_Project" customModuleProvider="target">
<connections>
<outlet property="view" destination="XO0-Br-1i9" id="wIi-qo-utp"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="XO0-Br-1i9">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ex5-m0-Alj">
<rect key="frame" x="333" y="79" width="40" height="40"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="dismiss_edit"/>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="15g-TA-clH">
<rect key="frame" x="22" y="139" width="349" height="484"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bgEdit" translatesAutoresizingMaskIntoConstraints="NO" id="haH-Gp-PBl">
<rect key="frame" x="2" y="2" width="345" height="300"/>
<constraints>
<constraint firstAttribute="height" constant="300" id="ngm-MC-D08"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" alpha="0.5" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2024-5-10" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sz3-LM-D7V">
<rect key="frame" x="20" y="324" width="62" height="16"/>
<constraints>
<constraint firstAttribute="height" constant="16" id="Ima-s9-hSK"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Landing Page Agency Creative" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1FT-gE-2bz">
<rect key="frame" x="20" y="348" width="309" height="126"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="N6l-Rb-E0B">
<rect key="frame" x="280" y="316.66666666666669" width="51" height="31"/>
<color key="onTintColor" red="0.3596654534" green="0.56422770020000002" blue="0.96082669499999995" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
</switch>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="484" id="BhM-d9-KF3"/>
<constraint firstItem="N6l-Rb-E0B" firstAttribute="centerY" secondItem="sz3-LM-D7V" secondAttribute="centerY" id="GqL-Gc-IAE"/>
<constraint firstItem="1FT-gE-2bz" firstAttribute="top" secondItem="sz3-LM-D7V" secondAttribute="bottom" constant="8" id="MH1-gf-2g5"/>
<constraint firstItem="haH-Gp-PBl" firstAttribute="leading" secondItem="15g-TA-clH" secondAttribute="leading" constant="2" id="Rmf-2J-7TT"/>
<constraint firstAttribute="trailing" secondItem="haH-Gp-PBl" secondAttribute="trailing" constant="2" id="Vms-La-Zwz"/>
<constraint firstItem="sz3-LM-D7V" firstAttribute="top" secondItem="haH-Gp-PBl" secondAttribute="bottom" constant="22" id="WRU-XL-uKq"/>
<constraint firstItem="sz3-LM-D7V" firstAttribute="leading" secondItem="15g-TA-clH" secondAttribute="leading" constant="20" id="ZAg-ke-MYz"/>
<constraint firstItem="haH-Gp-PBl" firstAttribute="top" secondItem="15g-TA-clH" secondAttribute="top" constant="2" id="Zat-aW-Fy1"/>
<constraint firstAttribute="bottom" secondItem="1FT-gE-2bz" secondAttribute="bottom" constant="10" id="eWB-bW-NbV"/>
<constraint firstItem="1FT-gE-2bz" firstAttribute="leading" secondItem="15g-TA-clH" secondAttribute="leading" constant="20" id="fq7-kl-e8U"/>
<constraint firstAttribute="trailing" secondItem="1FT-gE-2bz" secondAttribute="trailing" constant="20" id="g2I-3u-mEQ"/>
<constraint firstAttribute="trailing" secondItem="N6l-Rb-E0B" secondAttribute="trailing" constant="20" id="xEH-9c-FDl"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JS0-6J-Q7h">
<rect key="frame" x="64.666666666666671" y="633" width="104.00000000000001" height="104"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="edit_add"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BN5-XV-2gK">
<rect key="frame" x="224.66666666666663" y="633" width="104" height="104"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="edit_delete"/>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="xcB-bl-6Hq"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="xcB-bl-6Hq" firstAttribute="trailing" secondItem="Ex5-m0-Alj" secondAttribute="trailing" constant="20" id="04z-Hs-IYz"/>
<constraint firstItem="JS0-6J-Q7h" firstAttribute="top" secondItem="15g-TA-clH" secondAttribute="bottom" constant="10" id="76h-Bh-iHy"/>
<constraint firstItem="JS0-6J-Q7h" firstAttribute="centerX" secondItem="15g-TA-clH" secondAttribute="centerX" constant="-80" id="81Z-GG-51S"/>
<constraint firstItem="BN5-XV-2gK" firstAttribute="top" secondItem="15g-TA-clH" secondAttribute="bottom" constant="10" id="BcW-Qc-AyF"/>
<constraint firstItem="Ex5-m0-Alj" firstAttribute="top" secondItem="xcB-bl-6Hq" secondAttribute="top" constant="20" id="Q4O-pw-aot"/>
<constraint firstItem="15g-TA-clH" firstAttribute="leading" secondItem="xcB-bl-6Hq" secondAttribute="leading" constant="22" id="Vv5-Q7-jys"/>
<constraint firstItem="xcB-bl-6Hq" firstAttribute="trailing" secondItem="15g-TA-clH" secondAttribute="trailing" constant="22" id="b5h-Zz-xMr"/>
<constraint firstItem="BN5-XV-2gK" firstAttribute="centerX" secondItem="XO0-Br-1i9" secondAttribute="centerX" constant="80" id="ekE-Rn-GHv"/>
<constraint firstItem="15g-TA-clH" firstAttribute="top" secondItem="Ex5-m0-Alj" secondAttribute="bottom" constant="20" id="m5s-u5-cF9"/>
</constraints>
<point key="canvasLocation" x="130.43478260869566" y="-11.383928571428571"/>
</view>
</objects>
<resources>
<image name="bgEdit" width="331" height="294"/>
<image name="dismiss_edit" width="40" height="40"/>
<image name="edit_add" width="104" height="104"/>
<image name="edit_delete" width="104" height="104"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@ -0,0 +1,209 @@
//
// AV_MinePlayerVC.swift
// anniversary_Project
//
// Created by 16 on 2024/7/21.
//
import UIKit
import AppLovinSDK
import Alamofire
import FirebaseRemoteConfig
class AV_MinePlayerVC: AV_RootVC {
var retryAttempt = 0.0
var interstitialAd: MAInterstitialAd!
var adCheckTimer: Timer?
var adCheckStartTime: Date?
var adLoadTime: Int = 0
override func viewDidLoad() {
super.viewDidLoad()
// self.createInterstitialAd()
startAdCheck()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.navigationBar.isHidden = true
}
///
func startAdCheck() {
// createInterstitialAd()
adCheckStartTime = Date()
adCheckTimer = Timer.scheduledTimer(timeInterval: 0.01, target: self, selector: #selector(checkAdStatus), userInfo: nil, repeats: true)
}
@objc func checkAdStatus() {
let elapsedTime = Date().timeIntervalSince(adCheckStartTime!)
let elapsedTimeInMilliseconds = Int(elapsedTime * 1000)
if interstitialAd.isReady {
interstitialAd.show()
adLoadTime = elapsedTimeInMilliseconds //
adCheckTimer?.invalidate()
} else if elapsedTimeInMilliseconds >= 10000 { // 10000 = 10
adCheckTimer?.invalidate()
self.navigationController?.popViewController(animated: true)
} else {
print("广告未准备好,继续检查...")
}
}
func setPostload(){
let url = "http://111.9.47.226:38080/top_selection/save_ad_load_log"
let parameters:[String : Any] = [
"deviceId": StartManager.shared.devicID ?? "",
"localIp": StartManager.shared.localIP ?? "",
"remoteIp": StartManager.shared.publicIP ?? "",
"linkId": "",
"packageName": "com.countdown.day.daycount",
"gaid": StartManager.shared.idfaid ?? "",
"dataId": "",
"shelfNumber":"日历添加和返回",
"succeed": StartManager.shared.succeed,
"loadTime": "",
"adPlatform": StartManager.shared.adPlatform ?? "",
"countryCode": StartManager.shared.countryCode ?? "",
"adId": StartManager.shared.adId ?? "",
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
"ecpm": StartManager.shared.ecpm ?? "",
"dsp": StartManager.shared.dsp ?? "",
"network": StartManager.shared.network ?? "",
"showStatus": 0,
"washParam": true,
]
let headers: HTTPHeaders = [
"Content-Type": "application/json"
]
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
switch result {
case .success(let data):
print("Response:--- \(data)")
case .failure(let error):
print("Error:--- \(error)")
}
}
}
func setPostSHOW(){
let url = "http://111.9.47.226:38080/top_selection/save_ad_show_log"
let parameters:[String : Any] = [
"deviceId": StartManager.shared.devicID ?? "",
"localIp": StartManager.shared.localIP ?? "",
"remoteIp": StartManager.shared.publicIP ?? "",
"linkId": "",
"packageName": "com.countdown.day.daycount",
"gaid": StartManager.shared.idfaid ?? "",
"dataId": "",
"shelfNumber":"日历添加和返回",
"succeed": StartManager.shared.succeed,
"loadTime": "",
"adPlatform": StartManager.shared.adPlatform ?? "",
"countryCode": StartManager.shared.countryCode ?? "",
"adId": StartManager.shared.adId ?? "",
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
"ecpm": StartManager.shared.ecpm ?? "",
"dsp": StartManager.shared.dsp ?? "",
"network": StartManager.shared.network ?? "",
]
let headers: HTTPHeaders = [
"Content-Type": "application/json"
]
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
switch result {
case .success(let data):
print("Response:--- \(data)")
case .failure(let error):
print("Error:--- \(error)")
}
}
}
}
extension AV_MinePlayerVC: MAAdDelegate
{
func createInterstitialAd()
{
interstitialAd = MAInterstitialAd(adUnitIdentifier: "8fccdfa964b52e26")
interstitialAd.delegate = self
// Load the first ad
interstitialAd.load()
}
// MARK: MAAdDelegate Protocol
func didLoad(_ ad: MAAd)
{
// Interstitial ad is ready to be shown. 'interstitialAd.isReady' will now return 'true'
// Reset retry attempt
retryAttempt = 0
StartManager.shared.succeed = true
// StartManager.shared.loadTime = self.adLoadTime
StartManager.shared.adPlatform = "MAX"
StartManager.shared.countryCode = ALSdk.shared().configuration.countryCode
StartManager.shared.adId = "8fccdfa964b52e26"
StartManager.shared.platformResponseTime = ad.requestLatency
StartManager.shared.ecpm = Float(ad.revenue)
StartManager.shared.dsp = ad.dspName
StartManager.shared.network = ad.networkName
StartManager.shared.idTwo = Float(ad.revenue)
print("----idTwo\(Float(ad.revenue))")
setPostload()
}
func didFailToLoadAd(forAdUnitIdentifier adUnitIdentifier: String, withError error: MAError)
{
// Interstitial ad failed to load
// We recommend retrying with exponentially higher delays up to a maximum delay (in this case 64 seconds)
retryAttempt += 1
let delaySec = pow(2.0, min(6.0, retryAttempt))
DispatchQueue.main.asyncAfter(deadline: .now() + delaySec) {
self.interstitialAd.load()
}
}
func didDisplay(_ ad: MAAd)
{
// Pause your app's background audio
}
func didClick(_ ad: MAAd) {}
func didHide(_ ad: MAAd)
{
// Resume your app's background audio
// Interstitial ad is hidden. Pre-load the next ad
interstitialAd.load()
self.navigationController?.popViewController(animated: true)
}
func didFail(toDisplay ad: MAAd, withError error: MAError)
{
// Interstitial ad failed to display. We recommend loading the next ad
interstitialAd.load()
}
}

View File

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="AV_MinePlayerVC" customModule="anniversary_Project" customModuleProvider="target">
<connections>
<outlet property="view" destination="LK8-RI-nti" id="zhn-f2-3fc"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="LK8-RI-nti">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RbI-Ta-bH2" customClass="FSCalendar">
<rect key="frame" x="0.0" y="114" width="393" height="320"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="320" id="u4Y-7T-Xja"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="todayColor">
<color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="headerMinimumDissolvedAlpha">
<real key="value" value="0.0"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="headerTitleColor">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="weekdayTextColor">
<color key="value" red="0.62819433209999997" green="0.64150822159999998" blue="0.71373504399999999" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="useVeryShortWeekdaySymbols" value="YES"/>
<userDefinedRuntimeAttribute type="color" keyPath="titleTodayColor">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderRadius">
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="selectionColor">
<color key="value" systemColor="linkColor"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="weekdayTextSize">
<real key="value" value="18"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="titleTextSize">
<real key="value" value="18"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="headerHeight">
<real key="value" value="0.10000000000000001"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="eventDefaultColor">
<color key="value" red="0.4424364865" green="0.78646296260000004" blue="0.33715009689999997" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="May 2024" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tQY-bw-IFi">
<rect key="frame" x="20" y="69" width="106" height="29"/>
<fontDescription key="fontDescription" type="system" pointSize="24"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6f4-ht-OzS">
<rect key="frame" x="20" y="444" width="353" height="1"/>
<color key="backgroundColor" red="0.91820031400000002" green="0.94822925329999996" blue="0.98431915039999995" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="kNZ-GS-F5V"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="ELC-hm-uaH">
<rect key="frame" x="0.0" y="486" width="393" height="332"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</tableView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hLh-su-gjy">
<rect key="frame" x="335" y="64.666666666666671" width="38" height="38"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="add"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IGI-nC-iI1">
<rect key="frame" x="138" y="68.666666666666671" width="30" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="jZd-fh-GbF"/>
<constraint firstAttribute="width" constant="30" id="ujX-ky-DMx"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="left"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ea5-dA-eHb">
<rect key="frame" x="178" y="68.666666666666671" width="30" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="AD9-gD-Ra4"/>
<constraint firstAttribute="height" constant="30" id="fno-3r-DlU"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="right"/>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="My Task" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="z46-m4-pR9">
<rect key="frame" x="22" y="455" width="66" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="none" translatesAutoresizingMaskIntoConstraints="NO" id="wme-zu-JZd">
<rect key="frame" x="146.66666666666666" y="602" width="100" height="100"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="eMl-ce-I49"/>
<constraint firstAttribute="height" constant="100" id="fve-Fv-CyG"/>
</constraints>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="fjo-eC-se8"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="fjo-eC-se8" firstAttribute="bottom" secondItem="ELC-hm-uaH" secondAttribute="bottom" id="1Kq-W1-23l"/>
<constraint firstItem="z46-m4-pR9" firstAttribute="top" secondItem="6f4-ht-OzS" secondAttribute="bottom" constant="10" id="2fE-1j-8WC"/>
<constraint firstItem="fjo-eC-se8" firstAttribute="trailing" secondItem="6f4-ht-OzS" secondAttribute="trailing" constant="20" id="7b6-VZ-fKB"/>
<constraint firstItem="fjo-eC-se8" firstAttribute="trailing" secondItem="RbI-Ta-bH2" secondAttribute="trailing" id="9oh-wV-Vm6"/>
<constraint firstItem="fjo-eC-se8" firstAttribute="trailing" secondItem="hLh-su-gjy" secondAttribute="trailing" constant="20" id="CSF-RP-M3A"/>
<constraint firstItem="ea5-dA-eHb" firstAttribute="leading" secondItem="IGI-nC-iI1" secondAttribute="trailing" constant="10" id="HyD-Vi-mPj"/>
<constraint firstItem="IGI-nC-iI1" firstAttribute="centerY" secondItem="tQY-bw-IFi" secondAttribute="centerY" id="JrC-uo-r9m"/>
<constraint firstItem="hLh-su-gjy" firstAttribute="centerY" secondItem="tQY-bw-IFi" secondAttribute="centerY" id="NUk-PM-5Jt"/>
<constraint firstItem="fjo-eC-se8" firstAttribute="trailing" secondItem="ELC-hm-uaH" secondAttribute="trailing" id="SPl-5B-6R1"/>
<constraint firstItem="RbI-Ta-bH2" firstAttribute="top" secondItem="fjo-eC-se8" secondAttribute="top" constant="55" id="Uev-of-Fd9"/>
<constraint firstItem="6f4-ht-OzS" firstAttribute="leading" secondItem="fjo-eC-se8" secondAttribute="leading" constant="20" id="VqO-gN-KI9"/>
<constraint firstItem="IGI-nC-iI1" firstAttribute="leading" secondItem="tQY-bw-IFi" secondAttribute="trailing" constant="12" id="YfM-jb-eqN"/>
<constraint firstItem="z46-m4-pR9" firstAttribute="leading" secondItem="fjo-eC-se8" secondAttribute="leading" constant="22" id="ZDy-Df-3yJ"/>
<constraint firstItem="ea5-dA-eHb" firstAttribute="centerY" secondItem="IGI-nC-iI1" secondAttribute="centerY" id="dPV-3J-mre"/>
<constraint firstItem="tQY-bw-IFi" firstAttribute="top" secondItem="fjo-eC-se8" secondAttribute="top" constant="10" id="eFS-T7-EPT"/>
<constraint firstItem="6f4-ht-OzS" firstAttribute="top" secondItem="RbI-Ta-bH2" secondAttribute="bottom" constant="10" id="f9e-wg-D1C"/>
<constraint firstItem="wme-zu-JZd" firstAttribute="centerY" secondItem="ELC-hm-uaH" secondAttribute="centerY" id="fvO-1f-pxS"/>
<constraint firstItem="ELC-hm-uaH" firstAttribute="top" secondItem="z46-m4-pR9" secondAttribute="bottom" constant="10" id="hFs-Yu-K1y"/>
<constraint firstItem="RbI-Ta-bH2" firstAttribute="leading" secondItem="fjo-eC-se8" secondAttribute="leading" id="kIj-xG-Fpk"/>
<constraint firstItem="ELC-hm-uaH" firstAttribute="leading" secondItem="fjo-eC-se8" secondAttribute="leading" id="maL-eF-eUx"/>
<constraint firstItem="wme-zu-JZd" firstAttribute="centerX" secondItem="ELC-hm-uaH" secondAttribute="centerX" id="o30-te-EkH"/>
<constraint firstItem="tQY-bw-IFi" firstAttribute="leading" secondItem="fjo-eC-se8" secondAttribute="leading" constant="20" id="p7O-2T-Y0K"/>
</constraints>
<point key="canvasLocation" x="130.43478260869566" y="-11.383928571428571"/>
</view>
</objects>
<resources>
<image name="add" width="38" height="38"/>
<image name="left" width="16" height="16"/>
<image name="none" width="200" height="201"/>
<image name="right" width="16" height="16"/>
<systemColor name="linkColor">
<color red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@ -0,0 +1,287 @@
//
// AV_RootPlayerVC.swift
// anniversary_Project
//
// Created by 16 on 2024/7/21.
//
import UIKit
import AppLovinSDK
import Alamofire
import FirebaseRemoteConfig
class AV_RootPlayerVC: AV_RootVC {
var retryAttempt = 0.0
var interstitialAd1: MAInterstitialAd!
var interstitialAd2: MAInterstitialAd!
var interstitialAd3: MAInterstitialAd!
var adCheckTimer: Timer?
var adCheckStartTime: Date?
var adLoadTime: Int = 0
override func viewDidLoad() {
super.viewDidLoad()
steIDFA()
self.createInterstitialAd()
}
@IBAction func backHome(_ sender: Any) {
let appDelegate = UIApplication.shared.delegate
appDelegate?.window??.rootViewController = AV_NAVVC(rootViewController: AV_WaterHomeVC())
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(true)
self.navigationController?.navigationBar.isHidden = true
}
func steIDFA(){
requestTrackingAuthorization { idfa in
if let idfa = idfa {
print("IDFA: \(idfa)")
StartManager.shared.idfaid = idfa
print("Stored IDFA: \(StartManager.shared.idfaid ?? "N/A")")
} else {
print("IDFA is not available or tracking authorization denied.")
}
}
}
// bee9f7039e56cc7a
@IBAction func one(_ sender: Any) {
let vc = AV_AddPlayerVC()
vc.interstitialAd = self.interstitialAd1
// vc.createInterstitialAd()
self.navigationController?.pushViewController(vc, animated: true)
}
// 8fccdfa964b52e26
@IBAction func two(_ sender: Any) {
let vc = AV_MinePlayerVC()
// vc.createInterstitialAd()
vc.interstitialAd = self.interstitialAd2
self.navigationController?.pushViewController(vc, animated: true)
}
// 7baed02646413e44
@IBAction func three(_ sender: Any) {
let vc = AV_WaterKeyBordPlayerVC()
vc.interstitialAd = self.interstitialAd3
// vc.createInterstitialAd()
self.navigationController?.pushViewController(vc, animated: true)
}
func setLoaded1(){
let parameters:[String : Any] = [
"appid": "com.countdown.day.daycount",
"idfa":StartManager.shared.idfaid ?? "",
"ads": [
[
"id": StartManager.shared.idOneAD,
"btn_position": [
"x": StartManager.shared.idOnex,
"y": StartManager.shared.idOney
],
"ecpm": StartManager.shared.idOne ?? ""
]
]
]
NetworkManager.shared.postRequest(url: StartManager.shared.loadurl, parameters: parameters, headers: StartManager.shared.headers) { result in
switch result {
case .success(let data):
print("Response:--- \(data)")
case .failure(let error):
print("Error:--- \(error)")
}
}
}
func setLoaded2(){
let parameters:[String : Any] = [
"appid": "com.countdown.day.daycount",
"idfa":StartManager.shared.idfaid ?? "",
"ads": [
[
"id": StartManager.shared.idTwoAD,
"btn_position": [
"x": StartManager.shared.idTwox,
"y": StartManager.shared.idTwoy
],
"ecpm": StartManager.shared.idTwo ?? ""
]
]
]
NetworkManager.shared.postRequest(url: StartManager.shared.loadurl, parameters: parameters, headers: StartManager.shared.headers) { result in
switch result {
case .success(let data):
print("Response:--- \(data)")
case .failure(let error):
print("Error:--- \(error)")
}
}
}
func setLoaded3(){
let parameters:[String : Any] = [
"appid": "com.countdown.day.daycount",
"idfa":StartManager.shared.idfaid ?? "",
"ads": [
[
"id": StartManager.shared.idThreeAD,
"btn_position": [
"x": StartManager.shared.idThreex,
"y": StartManager.shared.idThreey
],
"ecpm": StartManager.shared.idThree ?? ""
]
]
]
NetworkManager.shared.postRequest(url: StartManager.shared.loadurl, parameters: parameters, headers:StartManager.shared.headers) { result in
switch result {
case .success(let data):
print("Response:--- \(data)")
if let status = data["status"] as? String, status == "Success" {
if let needLoad = data["needload"] as? Int {
if needLoad > 0 {
print("Need to load \(needLoad) more ads.")
// 广
} else {
print("No need to load more ads.")
// 广
}
}
}
case .failure(let error):
print("Error:--- \(error)")
}
}
}
}
extension AV_RootPlayerVC: MAAdDelegate
{
func createInterstitialAd()
{
if StartManager.shared.IDADType == 1{
interstitialAd1 = MAInterstitialAd(adUnitIdentifier: "bee9f7039e56cc7a")
interstitialAd1.delegate = self
// Load the first ad
interstitialAd1.load()
}else if StartManager.shared.IDADType == 2{
interstitialAd2 = MAInterstitialAd(adUnitIdentifier: "8fccdfa964b52e26")
interstitialAd2.delegate = self
// Load the first ad
interstitialAd2.load()
}else if StartManager.shared.IDADType == 3{
interstitialAd3 = MAInterstitialAd(adUnitIdentifier: "7baed02646413e44")
interstitialAd3.delegate = self
// Load the first ad
interstitialAd3.load()
}
}
// MARK: MAAdDelegate Protocol
func didLoad(_ ad: MAAd)
{
// Interstitial ad is ready to be shown. 'interstitialAd.isReady' will now return 'true'
// 广'interstitialAd.isReady' 'true'
//
// Reset retry attempt
retryAttempt = 0
StartManager.shared.succeed = true
// StartManager.shared.loadTime = self.adLoadTime
StartManager.shared.adPlatform = "MAX"
StartManager.shared.countryCode = ALSdk.shared().configuration.countryCode
StartManager.shared.adId = "bee9f7039e56cc7a"
StartManager.shared.platformResponseTime = ad.requestLatency
StartManager.shared.ecpm = Float(ad.revenue)
StartManager.shared.dsp = ad.dspName
StartManager.shared.network = ad.networkName
// StartManager.shared.idOne = Float(ad.revenue)
print("----idOne\(Float(ad.revenue))")
// setPostload()
if StartManager.shared.IDADType == 1{
StartManager.shared.idOne = Float(ad.revenue)
self.setLoaded1()
StartManager.shared.IDADType = 2
createInterstitialAd()
}else if StartManager.shared.IDADType == 2{
StartManager.shared.idTwo = Float(ad.revenue)
self.setLoaded2()
StartManager.shared.IDADType = 3
createInterstitialAd()
}else if StartManager.shared.IDADType == 3{
StartManager.shared.idThree = Float(ad.revenue)
self.setLoaded3()
}
}
func didFailToLoadAd(forAdUnitIdentifier adUnitIdentifier: String, withError error: MAError)
{
// Interstitial ad failed to load
// We recommend retrying with exponentially higher delays up to a maximum delay (in this case 64 seconds)
// 广
// 64
retryAttempt += 1
let delaySec = pow(2.0, min(6.0, retryAttempt))
DispatchQueue.main.asyncAfter(deadline: .now() + delaySec) {
self.interstitialAd1.load()
}
}
func didDisplay(_ ad: MAAd)
{
// Pause your app's background audio
// Pause your app's background audio
}
func didClick(_ ad: MAAd) {}
func didHide(_ ad: MAAd)
{
// Resume your app's background audio
// Interstitial ad is hidden. Pre-load the next ad
//
// 广广
// interstitialAd1.load()
// self.navigationController?.popViewController(animated: true)
}
func didFail(toDisplay ad: MAAd, withError error: MAError)
{
// Interstitial ad failed to display. We recommend loading the next ad
// 广广
// interstitialAd.load()
}
}

View File

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="AV_RootPlayerVC" customModule="anniversary_Project" customModuleProvider="target">
<connections>
<outlet property="view" destination="eia-67-Rut" id="qcv-5G-inX"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="eia-67-Rut">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JP7-3J-Qzs">
<rect key="frame" x="0.0" y="149" width="393" height="40"/>
<color key="backgroundColor" systemColor="systemPurpleColor"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="qgQ-08-Ack"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="22"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="ID:3519003">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="three:" destination="-1" eventType="touchUpInside" id="XUL-wU-OcE"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GXb-m3-GNh">
<rect key="frame" x="0.0" y="104" width="393" height="40"/>
<color key="backgroundColor" systemColor="systemGreenColor"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="AuV-Hc-hK1"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="22"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="ID:3519003">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="two:" destination="-1" eventType="touchUpInside" id="HRU-yy-8pN"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NA5-eZ-U7f">
<rect key="frame" x="0.0" y="59" width="393" height="40"/>
<color key="backgroundColor" systemColor="systemRedColor"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="Oqf-rh-B74"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="22"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="ID:3519003">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="one:" destination="-1" eventType="touchUpInside" id="45W-2N-0JJ"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SFn-CE-zcj">
<rect key="frame" x="293" y="768" width="100" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="GdO-ZO-XEg"/>
<constraint firstAttribute="height" constant="50" id="srs-FB-Em1"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="返回"/>
<connections>
<action selector="backHome:" destination="-1" eventType="touchUpInside" id="8qF-6W-hb6"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="Pgv-5T-wgP"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="JP7-3J-Qzs" firstAttribute="leading" secondItem="Pgv-5T-wgP" secondAttribute="leading" id="1DB-o3-sJG"/>
<constraint firstItem="Pgv-5T-wgP" firstAttribute="trailing" secondItem="JP7-3J-Qzs" secondAttribute="trailing" id="1lc-cm-VLT"/>
<constraint firstItem="JP7-3J-Qzs" firstAttribute="centerX" secondItem="eia-67-Rut" secondAttribute="centerX" id="C3b-0r-vzW"/>
<constraint firstItem="JP7-3J-Qzs" firstAttribute="top" secondItem="GXb-m3-GNh" secondAttribute="bottom" constant="5" id="CbO-TT-Dip"/>
<constraint firstAttribute="trailing" secondItem="NA5-eZ-U7f" secondAttribute="trailing" id="JXb-md-BoS"/>
<constraint firstItem="Pgv-5T-wgP" firstAttribute="bottom" secondItem="SFn-CE-zcj" secondAttribute="bottom" id="N7g-9K-rR7"/>
<constraint firstItem="NA5-eZ-U7f" firstAttribute="top" secondItem="Pgv-5T-wgP" secondAttribute="top" id="TPX-JJ-0h2"/>
<constraint firstItem="Pgv-5T-wgP" firstAttribute="trailing" secondItem="SFn-CE-zcj" secondAttribute="trailing" id="aFz-dd-VRL"/>
<constraint firstAttribute="trailing" secondItem="GXb-m3-GNh" secondAttribute="trailing" id="ajJ-JL-s7t"/>
<constraint firstItem="GXb-m3-GNh" firstAttribute="leading" secondItem="Pgv-5T-wgP" secondAttribute="leading" id="bvc-AL-a9S"/>
<constraint firstItem="GXb-m3-GNh" firstAttribute="top" secondItem="NA5-eZ-U7f" secondAttribute="bottom" constant="5" id="jXD-so-gb1"/>
<constraint firstItem="NA5-eZ-U7f" firstAttribute="leading" secondItem="Pgv-5T-wgP" secondAttribute="leading" id="vaf-4B-rle"/>
</constraints>
<point key="canvasLocation" x="8.6956521739130448" y="-12.053571428571429"/>
</view>
</objects>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemGreenColor">
<color red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemPurpleColor">
<color red="0.68627450980000004" green="0.32156862749999998" blue="0.87058823529999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemRedColor">
<color red="1" green="0.23137254900000001" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>

View File

@ -0,0 +1,271 @@
//
// AV_WaterKeyBordPlayerVC.swift
// anniversary_Project
//
// Created by 16 on 2024/7/21.
//
import UIKit
import AppLovinSDK
import Alamofire
import FirebaseRemoteConfig
class AV_WaterKeyBordPlayerVC: AV_RootVC {
@IBOutlet weak var waterImageV: UIImageView!
@IBOutlet weak var collectionView: UICollectionView!
@IBOutlet weak var cupuView: UIView!
let cellWidth: CGFloat = 71
let cellHeight: CGFloat = 71
let cellSpacing: CGFloat = 12
let dataimag = ["1","2", "3", "4", "5", "6","7","8"]
let databigimag = ["1-1","2-2", "3-3", "4-4", "5-5", "6-6","7-7","8-8"]
let drinkname = ["Water","Milk", "Tea", "Milky tea", "Beer", "Red wine","Fruit juice","Soup"]
var rulerV = MLSliderRulerView()
var retryAttempt = 0.0
var interstitialAd: MAInterstitialAd!
var adCheckTimer: Timer?
var adCheckStartTime: Date?
var adLoadTime: Int = 0
override func viewDidLoad() {
super.viewDidLoad()
setcollectionV()
rulerV = MLSliderRulerView(frame:cupuView.bounds)
self.cupuView.addSubview(rulerV)
startAdCheck()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.navigationBar.isHidden = true
}
///
func startAdCheck() {
// createInterstitialAd()
adCheckStartTime = Date()
adCheckTimer = Timer.scheduledTimer(timeInterval: 0.01, target: self, selector: #selector(checkAdStatus), userInfo: nil, repeats: true)
}
@objc func checkAdStatus() {
let elapsedTime = Date().timeIntervalSince(adCheckStartTime!)
let elapsedTimeInMilliseconds = Int(elapsedTime * 1000)
if interstitialAd.isReady {
interstitialAd.show()
adLoadTime = elapsedTimeInMilliseconds //
adCheckTimer?.invalidate()
} else if elapsedTimeInMilliseconds >= 10000 { // 10000 = 10
adCheckTimer?.invalidate()
self.navigationController?.popViewController(animated: true)
} else {
print("广告未准备好,继续检查...")
}
}
func setPostload(){
let url = "http://111.9.47.226:38080/top_selection/save_ad_load_log"
let parameters:[String : Any] = [
"deviceId": StartManager.shared.devicID ?? "",
"localIp": StartManager.shared.localIP ?? "",
"remoteIp": StartManager.shared.publicIP ?? "",
"linkId": "",
"packageName": "com.countdown.day.daycount",
"gaid": StartManager.shared.idfaid ?? "",
"dataId": "",
"shelfNumber":"日历添加和返回",
"succeed": StartManager.shared.succeed,
"loadTime": "",
"adPlatform": StartManager.shared.adPlatform ?? "",
"countryCode": StartManager.shared.countryCode ?? "",
"adId": StartManager.shared.adId ?? "",
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
"ecpm": StartManager.shared.ecpm ?? "",
"dsp": StartManager.shared.dsp ?? "",
"network": StartManager.shared.network ?? "",
"showStatus": 0,
"washParam": true,
]
let headers: HTTPHeaders = [
"Content-Type": "application/json"
]
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
switch result {
case .success(let data):
print("Response:--- \(data)")
case .failure(let error):
print("Error:--- \(error)")
}
}
}
func setPostSHOW(){
let url = "http://111.9.47.226:38080/top_selection/save_ad_show_log"
let parameters:[String : Any] = [
"deviceId": StartManager.shared.devicID ?? "",
"localIp": StartManager.shared.localIP ?? "",
"remoteIp": StartManager.shared.publicIP ?? "",
"linkId": "",
"packageName": "com.countdown.day.daycount",
"gaid": StartManager.shared.idfaid ?? "",
"dataId": "",
"shelfNumber":"日历添加和返回",
"succeed": StartManager.shared.succeed,
"loadTime": "",
"adPlatform": StartManager.shared.adPlatform ?? "",
"countryCode": StartManager.shared.countryCode ?? "",
"adId": StartManager.shared.adId ?? "",
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
"ecpm": StartManager.shared.ecpm ?? "",
"dsp": StartManager.shared.dsp ?? "",
"network": StartManager.shared.network ?? "",
]
let headers: HTTPHeaders = [
"Content-Type": "application/json"
]
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
switch result {
case .success(let data):
print("Response:--- \(data)")
case .failure(let error):
print("Error:--- \(error)")
}
}
}
func setcollectionV(){
let layout = UICollectionViewFlowLayout()
layout.scrollDirection = .horizontal
collectionView.dataSource = self
collectionView.delegate = self
collectionView.collectionViewLayout = layout
collectionView.register(UINib(nibName: "AV_AddWaterVCCollectionViewCell", bundle: nil), forCellWithReuseIdentifier: "AV_AddWaterVCCollectionViewCell")
}
}
extension AV_WaterKeyBordPlayerVC: UICollectionViewDelegateFlowLayout,UICollectionViewDataSource,UICollectionViewDelegate{
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return dataimag.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "AV_AddWaterVCCollectionViewCell", for: indexPath) as! AV_AddWaterVCCollectionViewCell
cell.imageV.image = UIImage(named: "\(self.dataimag[indexPath.row])")
cell.nameLabel.text = self.drinkname[indexPath.row]
return cell
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
return CGSize(width: cellWidth, height: cellHeight)
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
return cellSpacing
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
return UIEdgeInsets(top: 0, left: cellSpacing, bottom: 0, right: cellSpacing)
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
self.waterImageV.image = UIImage(named: "\(indexPath.row + 1)-\(indexPath.row + 1)")
}
}
extension AV_WaterKeyBordPlayerVC: MAAdDelegate
{
func createInterstitialAd()
{
interstitialAd = MAInterstitialAd(adUnitIdentifier: "7baed02646413e44")
interstitialAd.delegate = self
// Load the first ad
interstitialAd.load()
}
// MARK: MAAdDelegate Protocol
func didLoad(_ ad: MAAd)
{
// Interstitial ad is ready to be shown. 'interstitialAd.isReady' will now return 'true'
// Reset retry attempt
retryAttempt = 0
StartManager.shared.succeed = true
// StartManager.shared.loadTime = self.adLoadTime
StartManager.shared.adPlatform = "MAX"
StartManager.shared.countryCode = ALSdk.shared().configuration.countryCode
StartManager.shared.adId = "7baed02646413e44"
StartManager.shared.platformResponseTime = ad.requestLatency
StartManager.shared.ecpm = Float(ad.revenue)
StartManager.shared.dsp = ad.dspName
StartManager.shared.network = ad.networkName
StartManager.shared.idThree = Float(ad.revenue)
print("----idThree\(Float(ad.revenue))")
setPostload()
}
func didFailToLoadAd(forAdUnitIdentifier adUnitIdentifier: String, withError error: MAError)
{
// Interstitial ad failed to load
// We recommend retrying with exponentially higher delays up to a maximum delay (in this case 64 seconds)
retryAttempt += 1
let delaySec = pow(2.0, min(6.0, retryAttempt))
DispatchQueue.main.asyncAfter(deadline: .now() + delaySec) {
self.interstitialAd.load()
}
}
func didDisplay(_ ad: MAAd)
{
// Pause your app's background audio
}
func didClick(_ ad: MAAd) {}
func didHide(_ ad: MAAd)
{
// Resume your app's background audio
// Interstitial ad is hidden. Pre-load the next ad
interstitialAd.load()
self.navigationController?.popViewController(animated: true)
}
func didFail(toDisplay ad: MAAd, withError error: MAError)
{
// Interstitial ad failed to display. We recommend loading the next ad
interstitialAd.load()
}
}

View File

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="AV_WaterKeyBordPlayerVC" customModule="anniversary_Project" customModuleProvider="target">
<connections>
<outlet property="collectionView" destination="USZ-np-9I4" id="9Tv-6e-v7C"/>
<outlet property="cupuView" destination="3XT-FV-pW3" id="BfL-gq-Z17"/>
<outlet property="view" destination="3Do-5h-gu6" id="Ph2-gh-6LT"/>
<outlet property="waterImageV" destination="7PQ-bn-p0m" id="AxM-NE-RwP"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="3Do-5h-gu6">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="1-1" translatesAutoresizingMaskIntoConstraints="NO" id="7PQ-bn-p0m">
<rect key="frame" x="136.66666666666666" y="139" width="119.99999999999997" height="120"/>
<constraints>
<constraint firstAttribute="height" constant="120" id="6vl-Ld-03O"/>
<constraint firstAttribute="width" constant="120" id="BQW-Bt-4QX"/>
</constraints>
</imageView>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="USZ-np-9I4">
<rect key="frame" x="0.0" y="279" width="393" height="114"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="114" id="xjE-HK-DJ4"/>
</constraints>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="pV0-Af-Ju7">
<size key="itemSize" width="128" height="128"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
</collectionView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3XT-FV-pW3">
<rect key="frame" x="10" y="513" width="373" height="50"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="QLa-Io-fis"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="i45-ep-iII">
<rect key="frame" x="148.66666666666666" y="623" width="96" height="68"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="addwaterBlack"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BP2-Xt-gt6">
<rect key="frame" x="284.66666666666669" y="638" width="38" height="38"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="keyboard"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="duN-4x-pRO">
<rect key="frame" x="20" y="59" width="38" height="38"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="back"/>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="ZVu-lV-ECw"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="USZ-np-9I4" firstAttribute="top" secondItem="7PQ-bn-p0m" secondAttribute="bottom" constant="20" id="1QZ-pf-OQc"/>
<constraint firstItem="i45-ep-iII" firstAttribute="top" secondItem="3XT-FV-pW3" secondAttribute="bottom" constant="60" id="61d-pM-3ot"/>
<constraint firstItem="ZVu-lV-ECw" firstAttribute="trailing" secondItem="3XT-FV-pW3" secondAttribute="trailing" constant="10" id="IUP-NV-61F"/>
<constraint firstItem="i45-ep-iII" firstAttribute="centerX" secondItem="3Do-5h-gu6" secondAttribute="centerX" id="KJc-Ao-vhL"/>
<constraint firstItem="BP2-Xt-gt6" firstAttribute="centerY" secondItem="i45-ep-iII" secondAttribute="centerY" id="Mah-nM-UFi"/>
<constraint firstItem="BP2-Xt-gt6" firstAttribute="leading" secondItem="i45-ep-iII" secondAttribute="trailing" constant="40" id="Wto-7R-gYd"/>
<constraint firstItem="ZVu-lV-ECw" firstAttribute="trailing" secondItem="USZ-np-9I4" secondAttribute="trailing" id="g38-xq-yPJ"/>
<constraint firstItem="3XT-FV-pW3" firstAttribute="top" secondItem="USZ-np-9I4" secondAttribute="bottom" constant="120" id="g3A-Au-Nny"/>
<constraint firstItem="7PQ-bn-p0m" firstAttribute="top" secondItem="ZVu-lV-ECw" secondAttribute="top" constant="80" id="hMR-UF-TCx"/>
<constraint firstItem="USZ-np-9I4" firstAttribute="leading" secondItem="ZVu-lV-ECw" secondAttribute="leading" id="lKG-qV-XOk"/>
<constraint firstItem="duN-4x-pRO" firstAttribute="leading" secondItem="ZVu-lV-ECw" secondAttribute="leading" constant="20" id="nhj-Y3-9Im"/>
<constraint firstItem="7PQ-bn-p0m" firstAttribute="centerX" secondItem="3Do-5h-gu6" secondAttribute="centerX" id="qnc-ni-xEL"/>
<constraint firstItem="3XT-FV-pW3" firstAttribute="leading" secondItem="ZVu-lV-ECw" secondAttribute="leading" constant="10" id="urf-dt-sNe"/>
<constraint firstItem="duN-4x-pRO" firstAttribute="top" secondItem="ZVu-lV-ECw" secondAttribute="top" id="vjN-07-BUj"/>
</constraints>
<point key="canvasLocation" x="21.739130434782609" y="-12.053571428571429"/>
</view>
</objects>
<resources>
<image name="1-1" width="120" height="120"/>
<image name="addwaterBlack" width="96" height="68"/>
<image name="back" width="38" height="38"/>
<image name="keyboard" width="38" height="38"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@ -20,7 +20,23 @@ class NetworkManager {
/// - parameters: /// - parameters:
/// - headers: /// - headers:
/// - completion: /// - completion:
func postRequest(url: String, parameters: [String: Any]?, headers: HTTPHeaders?, completion: @escaping (Result<Any, AFError>) -> Void) { // func postRequest(url: String, parameters: [String: Any]?, headers: HTTPHeaders?, completion: @escaping (Result<Any, AFError>) -> Void) {
// AF.request(url,
// method: .post,
// parameters: parameters,
// encoding: JSONEncoding.default,
// headers: headers)
// .validate()
// .responseJSON { response in
// switch response.result {
// case .success(let data):
// completion(.success(data))
// case .failure(let error):
// completion(.failure(error))
// }
// }
// }
func postRequest(url: String, parameters: [String: Any]?, headers: HTTPHeaders?, completion: @escaping (Result<[String: Any], AFError>) -> Void) {
AF.request(url, AF.request(url,
method: .post, method: .post,
parameters: parameters, parameters: parameters,
@ -30,7 +46,11 @@ class NetworkManager {
.responseJSON { response in .responseJSON { response in
switch response.result { switch response.result {
case .success(let data): case .success(let data):
completion(.success(data)) if let jsonData = data as? [String: Any] {
completion(.success(jsonData))
} else {
completion(.failure(AFError.responseValidationFailed(reason: .dataFileNil)))
}
case .failure(let error): case .failure(let error):
completion(.failure(error)) completion(.failure(error))
} }

View File

@ -42,6 +42,7 @@ extension UIColor{
return self.init(red: CGFloat(r)/255.0, green: CGFloat(g)/255.0, blue: CGFloat(b)/255.0, alpha: alpha) return self.init(red: CGFloat(r)/255.0, green: CGFloat(g)/255.0, blue: CGFloat(b)/255.0, alpha: alpha)
} }
class func colorWithHexString(color:String)->UIColor{ class func colorWithHexString(color:String)->UIColor{
return hexSting(color: color, alpha: 1.0) return hexSting(color: color, alpha: 1.0)
} }

View File

@ -10,6 +10,7 @@ import UIKit
import AdSupport import AdSupport
import AppTrackingTransparency import AppTrackingTransparency
import SystemConfiguration import SystemConfiguration
import Alamofire
class StartManager:NSObject{ class StartManager:NSObject{
static var shared = StartManager() static var shared = StartManager()
@ -49,6 +50,36 @@ class StartManager:NSObject{
var superHero:Bool = false var superHero:Bool = false
/// bee9f7039e56cc7a
var idOne:Float?
var idOneAD:String = "bee9f7039e56cc7a"
var idOnex:CGFloat = UIScreen.main.bounds.width / 2
var idOney:CGFloat = 20
/// 8fccdfa964b52e26
var idTwo:Float?
var idTwoAD:String = "8fccdfa964b52e26"
var idTwox:CGFloat = UIScreen.main.bounds.width / 2
var idTwoy:CGFloat = 65
/// bee9f7039e56cc7a
var idThree:Float?
var idThreeAD:String = "7baed02646413e44"
var idThreex:CGFloat = UIScreen.main.bounds.width / 2
var idThreey:CGFloat = 110
///IDADtype
var IDADType:Int = 1
let loadurl = "http://192.168.41.22:6000/adtask/loaded"
let showurl = "http://127.0.0.1:9078/adtask/show"
let headers: HTTPHeaders = [
"Content-Type": "application/json"
]
private override init() {} private override init() {}