diff --git a/Podfile b/Podfile index cc03db5..85d58a7 100644 --- a/Podfile +++ b/Podfile @@ -33,10 +33,11 @@ target 'SynthReel' do pod 'HWPanModal' pod 'LYEmptyView' pod 'ZLPhotoBrowser' + pod 'Adjust' - # AdMob SDK - pod 'Google-Mobile-Ads-SDK' - - # AppLovin SDK - pod 'AppLovinSDK' +# # AdMob SDK +# pod 'Google-Mobile-Ads-SDK' +# +# # AppLovin SDK +# pod 'AppLovinSDK' end diff --git a/SynthReel.xcodeproj/project.pbxproj b/SynthReel.xcodeproj/project.pbxproj index d4ab4e8..c02d323 100644 --- a/SynthReel.xcodeproj/project.pbxproj +++ b/SynthReel.xcodeproj/project.pbxproj @@ -194,10 +194,32 @@ 3754B0312EE2C9D4009EBCAD /* SRVideoRechargeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3754B0302EE2C9D4009EBCAD /* SRVideoRechargeView.swift */; }; 3779D0612ECF1CB8006B1698 /* SRShortHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3779D0602ECF1CB8006B1698 /* SRShortHeaderView.swift */; }; 47BB39E2DD30787FA591F8EB /* Pods_SynthReel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F9255BF4D4B1CFDDB5CFFB43 /* Pods_SynthReel.framework */; }; - 85ACDA2F2EE6B3760009B306 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 85ACDA2E2EE6B3760009B306 /* GoogleService-Info.plist */; }; 85ACDA312EE6C3640009B306 /* SRVipRetainAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85ACDA302EE6C3640009B306 /* SRVipRetainAlert.swift */; }; + 85AE54682EE7F7940058FEA3 /* SRCoinPackCanReceiveModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85AE54672EE7F7940058FEA3 /* SRCoinPackCanReceiveModel.swift */; }; + 85AE546A2EE7F8790058FEA3 /* SRCoinsPackAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85AE54692EE7F8790058FEA3 /* SRCoinsPackAlert.swift */; }; + 85AE546C2EE804A90058FEA3 /* SRHomeCoinsPackButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85AE546B2EE804A90058FEA3 /* SRHomeCoinsPackButton.swift */; }; + 85AE546E2EE809850058FEA3 /* AppDelegate+SRAPNS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85AE546D2EE809850058FEA3 /* AppDelegate+SRAPNS.swift */; }; + 85AE54712EE80AFE0058FEA3 /* adjustManger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85AE54702EE80AFE0058FEA3 /* adjustManger.swift */; }; + 85AE54732EE80B700058FEA3 /* AppDelegate+adjust.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85AE54722EE80B700058FEA3 /* AppDelegate+adjust.swift */; }; + 85AE54762EE80D900058FEA3 /* SROpenAppModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85AE54752EE80D900058FEA3 /* SROpenAppModel.swift */; }; + 85AE54782EE8106F0058FEA3 /* SRApnsAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85AE54772EE8106F0058FEA3 /* SRApnsAlert.swift */; }; + 85AE547A2EE8154A0058FEA3 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 85AE54792EE8154A0058FEA3 /* GoogleService-Info.plist */; }; + 85AE549C2EE81E730058FEA3 /* SRAppStartViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85AE549B2EE81E730058FEA3 /* SRAppStartViewController.swift */; }; /* End PBXBuildFile section */ +/* Begin PBXCopyFilesBuildPhase section */ + 85AE54992EE818190058FEA3 /* Embed Foundation Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + ); + name = "Embed Foundation Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 03980F4E2ECEB91C0006E317 /* SRRecommendPlayerViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRRecommendPlayerViewModel.swift; sourceTree = ""; }; 03980F502ECEBEE20006E317 /* SRRecommendPlayerCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRRecommendPlayerCell.swift; sourceTree = ""; }; @@ -340,7 +362,6 @@ 3754AD012EDA8AF7009EBCAD /* SRLoginController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRLoginController.swift; sourceTree = ""; }; 3754AD192EDD745A009EBCAD /* SRVideoLockView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRVideoLockView.swift; sourceTree = ""; }; 3754AD1B2EDD77BA009EBCAD /* SRVideoUnlockResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRVideoUnlockResult.swift; sourceTree = ""; }; - 3754AD1D2EDD84DD009EBCAD /* SynthReel.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SynthReel.entitlements; sourceTree = ""; }; 3754AD302EDD939A009EBCAD /* SRUserLoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRUserLoginView.swift; sourceTree = ""; }; 3754AD322EDD96E0009EBCAD /* SRLoginButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRLoginButtonView.swift; sourceTree = ""; }; 3754AD352EDD9AA7009EBCAD /* SRLogin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRLogin.swift; sourceTree = ""; }; @@ -499,8 +520,20 @@ 85ACDA282EE69CD90009B306 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 85ACDA292EE69CD90009B306 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 85ACDA2B2EE69CD90009B306 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; - 85ACDA2E2EE6B3760009B306 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 85ACDA302EE6C3640009B306 /* SRVipRetainAlert.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRVipRetainAlert.swift; sourceTree = ""; }; + 85AE54672EE7F7940058FEA3 /* SRCoinPackCanReceiveModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRCoinPackCanReceiveModel.swift; sourceTree = ""; }; + 85AE54692EE7F8790058FEA3 /* SRCoinsPackAlert.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRCoinsPackAlert.swift; sourceTree = ""; }; + 85AE546B2EE804A90058FEA3 /* SRHomeCoinsPackButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRHomeCoinsPackButton.swift; sourceTree = ""; }; + 85AE546D2EE809850058FEA3 /* AppDelegate+SRAPNS.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppDelegate+SRAPNS.swift"; sourceTree = ""; }; + 85AE54702EE80AFE0058FEA3 /* adjustManger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = adjustManger.swift; sourceTree = ""; }; + 85AE54722EE80B700058FEA3 /* AppDelegate+adjust.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppDelegate+adjust.swift"; sourceTree = ""; }; + 85AE54752EE80D900058FEA3 /* SROpenAppModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SROpenAppModel.swift; sourceTree = ""; }; + 85AE54772EE8106F0058FEA3 /* SRApnsAlert.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRApnsAlert.swift; sourceTree = ""; }; + 85AE54792EE8154A0058FEA3 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + 85AE54802EE818180058FEA3 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; + 85AE54822EE818180058FEA3 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; + 85AE549A2EE8183A0058FEA3 /* SynthReel.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SynthReel.entitlements; sourceTree = ""; }; + 85AE549B2EE81E730058FEA3 /* SRAppStartViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRAppStartViewController.swift; sourceTree = ""; }; AA88214030574193B51DE563 /* Pods-SynthReel.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SynthReel.release.xcconfig"; path = "Target Support Files/Pods-SynthReel/Pods-SynthReel.release.xcconfig"; sourceTree = ""; }; F9255BF4D4B1CFDDB5CFFB43 /* Pods_SynthReel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SynthReel.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -570,6 +603,7 @@ 03B1A8422EC5CB99006C353F /* SRTabBarController.swift */, 03B1A8442EC5CBBB006C353F /* SRNavigationController.swift */, 03B1A8462EC5CBCF006C353F /* SRViewController.swift */, + 85AE549B2EE81E730058FEA3 /* SRAppStartViewController.swift */, ); path = ViewController; sourceTree = ""; @@ -659,6 +693,7 @@ 370D2F2C2ED5AA9700571E77 /* SRViralHitCell.swift */, 3754ACC02ED69105009EBCAD /* SRTopChartsHeaderView.swift */, 3754ACDB2ED83F80009EBCAD /* SRHomeHistoryBottomView.swift */, + 85AE546B2EE804A90058FEA3 /* SRHomeCoinsPackButton.swift */, ); path = V; sourceTree = ""; @@ -761,7 +796,7 @@ 03E9A7C82EC47177000D1067 /* SynthReel */ = { isa = PBXGroup; children = ( - 3754AD1D2EDD84DD009EBCAD /* SynthReel.entitlements */, + 85AE549A2EE8183A0058FEA3 /* SynthReel.entitlements */, 03E9A7D02EC471D6000D1067 /* Delegate */, 03E9A7D22EC47204000D1067 /* Base */, 03E9A7D32EC4720F000D1067 /* Class */, @@ -778,6 +813,8 @@ 03E9A7BF2EC47177000D1067 /* AppDelegate.swift */, 03E9A7C62EC47177000D1067 /* SceneDelegate.swift */, 03B1A83F2EC5CA2E006C353F /* AppDelegate+Config.swift */, + 85AE546D2EE809850058FEA3 /* AppDelegate+SRAPNS.swift */, + 85AE54722EE80B700058FEA3 /* AppDelegate+adjust.swift */, ); path = Delegate; sourceTree = ""; @@ -785,9 +822,9 @@ 03E9A7D12EC471F3000D1067 /* Source */ = { isa = PBXGroup; children = ( + 85AE54792EE8154A0058FEA3 /* GoogleService-Info.plist */, 03E9A7C02EC47177000D1067 /* Assets.xcassets */, 03E9A7C12EC47177000D1067 /* Info.plist */, - 85ACDA2E2EE6B3760009B306 /* GoogleService-Info.plist */, 03E9A7C32EC47177000D1067 /* LaunchScreen.storyboard */, 03B1A8562EC5E4F1006C353F /* Localizable.strings */, 03B1A8692EC6BD49006C353F /* Bridging-Header.h */, @@ -798,6 +835,7 @@ 03E9A7D22EC47204000D1067 /* Base */ = { isa = PBXGroup; children = ( + 85AE54742EE80D7A0058FEA3 /* Model */, 3754ACE22ED93E04009EBCAD /* webview */, 03B1A8412EC5CB4F006C353F /* ViewController */, 03B1A8D62EC6D03A006C353F /* View */, @@ -826,8 +864,9 @@ 03E9A7D42EC4764A000D1067 /* Libs */ = { isa = PBXGroup; children = ( - 3754AF022EDED751009EBCAD /* SRAppstore */, 3754AEFF2EDED691009EBCAD /* payManger */, + 85AE546F2EE80AE40058FEA3 /* adjust */, + 3754AF022EDED751009EBCAD /* SRAppstore */, 3754AD342EDD9A8F009EBCAD /* SRLogin */, 3754ACD82ED83724009EBCAD /* FSPagerView */, 3754ACCF2ED81F2F009EBCAD /* Alert */, @@ -980,6 +1019,7 @@ isa = PBXGroup; children = ( 3754ACD02ED81F55009EBCAD /* SRBaseAlert.swift */, + 85AE54772EE8106F0058FEA3 /* SRApnsAlert.swift */, ); path = Alert; sourceTree = ""; @@ -1021,6 +1061,7 @@ 3754B0162EE12633009EBCAD /* SRCoinPackConfirmItemView.swift */, 3754B0182EE1267B009EBCAD /* SRCoinPackConfirmItem1View.swift */, 3754B01A2EE12690009EBCAD /* SRCoinPackConfirmItem2View.swift */, + 85AE54692EE7F8790058FEA3 /* SRCoinsPackAlert.swift */, ); path = view; sourceTree = ""; @@ -1131,6 +1172,7 @@ children = ( 3754ACFB2ED9A36C009EBCAD /* SRCoinsPackModel.swift */, 3754ACFD2ED9A3A0009EBCAD /* SRCoinsPackReceiveModel.swift */, + 85AE54672EE7F7940058FEA3 /* SRCoinPackCanReceiveModel.swift */, ); path = M; sourceTree = ""; @@ -1532,6 +1574,22 @@ path = "tokenizedHrtf 2"; sourceTree = ""; }; + 85AE546F2EE80AE40058FEA3 /* adjust */ = { + isa = PBXGroup; + children = ( + 85AE54702EE80AFE0058FEA3 /* adjustManger.swift */, + ); + path = adjust; + sourceTree = ""; + }; + 85AE54742EE80D7A0058FEA3 /* Model */ = { + isa = PBXGroup; + children = ( + 85AE54752EE80D900058FEA3 /* SROpenAppModel.swift */, + ); + path = Model; + sourceTree = ""; + }; 8CAFCEC2C631CAE75726D90C /* Pods */ = { isa = PBXGroup; children = ( @@ -1545,6 +1603,8 @@ isa = PBXGroup; children = ( F9255BF4D4B1CFDDB5CFFB43 /* Pods_SynthReel.framework */, + 85AE54802EE818180058FEA3 /* WidgetKit.framework */, + 85AE54822EE818180058FEA3 /* SwiftUI.framework */, ); name = Frameworks; sourceTree = ""; @@ -1561,6 +1621,7 @@ 03E9A7A42EC4716A000D1067 /* Frameworks */, 03E9A7A52EC4716A000D1067 /* Resources */, 92A47CFFAED31670C9452A17 /* [CP] Embed Pods Frameworks */, + 85AE54992EE818190058FEA3 /* Embed Foundation Extensions */, ); buildRules = ( ); @@ -1579,7 +1640,7 @@ attributes = { BuildIndependentTargetsInParallel = 1; CLASSPREFIX = SR; - LastSwiftUpdateCheck = 2600; + LastSwiftUpdateCheck = 1610; LastUpgradeCheck = 2600; ORGANIZATIONNAME = SR; TargetAttributes = { @@ -1620,7 +1681,7 @@ files = ( 03E9A7CC2EC47177000D1067 /* Assets.xcassets in Resources */, 03B1A8582EC5E4F1006C353F /* Localizable.strings in Resources */, - 85ACDA2F2EE6B3760009B306 /* GoogleService-Info.plist in Resources */, + 85AE547A2EE8154A0058FEA3 /* GoogleService-Info.plist in Resources */, 03B1A8DD2EC6D0EB006C353F /* SRHomeChildCell.xib in Resources */, 03E9A7CE2EC47177000D1067 /* LaunchScreen.storyboard in Resources */, ); @@ -1676,6 +1737,7 @@ buildActionMask = 2147483647; files = ( 03B1A9402ECC45BA006C353F /* SRTableViewCell.swift in Sources */, + 85AE54682EE7F7940058FEA3 /* SRCoinPackCanReceiveModel.swift in Sources */, 03E9A7EA2EC4995D000D1067 /* SRKeychain.swift in Sources */, 03E9A7D92EC47B90000D1067 /* SRNetworkReachableManager.swift in Sources */, 3754ACF82ED9A32C009EBCAD /* SRCoinPackHeaderView.swift in Sources */, @@ -1690,6 +1752,7 @@ 3754B0312EE2C9D4009EBCAD /* SRVideoRechargeView.swift in Sources */, 3754AF1C2EDEF112009EBCAD /* SRStoreCoinsView.swift in Sources */, 03B1A8452EC5CBBB006C353F /* SRNavigationController.swift in Sources */, + 85AE54712EE80AFE0058FEA3 /* adjustManger.swift in Sources */, 03B1A9092ECAAF55006C353F /* SRHomeTopChartsView.swift in Sources */, 03E9A7E42EC49593000D1067 /* SRUrlPath.swift in Sources */, 3754AF122EDEDEBF009EBCAD /* SRIapOrderModel.swift in Sources */, @@ -1701,10 +1764,13 @@ 03B1A9172ECAF14F006C353F /* SRHomeHotView.swift in Sources */, 03B1A8FD2EC81C62006C353F /* SRHomeBannerCell.swift in Sources */, 3754AF2A2EDEF425009EBCAD /* SRStoreCoinsCell.swift in Sources */, + 85AE54762EE80D900058FEA3 /* SROpenAppModel.swift in Sources */, 03E9A7DB2EC485BE000D1067 /* SRNetwork.swift in Sources */, + 85AE546A2EE7F8790058FEA3 /* SRCoinsPackAlert.swift in Sources */, 370D2F152ED457F000571E77 /* SRUserTopCell.swift in Sources */, 3754ACBD2ED5B6B6009EBCAD /* UINavigationBar+SRAdd.swift in Sources */, 3754ACE82ED93ED9009EBCAD /* SRWebMessageModel.swift in Sources */, + 85AE54732EE80B700058FEA3 /* AppDelegate+adjust.swift in Sources */, 03E9A7F42EC4A94D000D1067 /* SRAccountToken.swift in Sources */, 3754ACD12ED81F55009EBCAD /* SRBaseAlert.swift in Sources */, 370D2F222ED54CA400571E77 /* SRPrivacyController.swift in Sources */, @@ -1740,6 +1806,7 @@ 03E9A7EC2EC499A9000D1067 /* SRDeviceId.swift in Sources */, 03E9A7E22EC494F9000D1067 /* SRTargetType.swift in Sources */, 370D2F092ED44A6D00571E77 /* SRListMenuCell.swift in Sources */, + 85AE549C2EE81E730058FEA3 /* SRAppStartViewController.swift in Sources */, 03980F532ECEDEAB0006E317 /* SRRecommendPlayerControlView.swift in Sources */, 03B1A90F2ECAC768006C353F /* SRHomeBingeWorthyView.swift in Sources */, 3754B0192EE1267B009EBCAD /* SRCoinPackConfirmItem1View.swift in Sources */, @@ -1753,6 +1820,7 @@ 3754AD332EDD96E0009EBCAD /* SRLoginButtonView.swift in Sources */, 03B1A8402EC5CA37006C353F /* AppDelegate+Config.swift in Sources */, 03B1A9152ECAEE63006C353F /* SRHomeViralHitsCell.swift in Sources */, + 85AE546E2EE809850058FEA3 /* AppDelegate+SRAPNS.swift in Sources */, 03B1A8472EC5CBCF006C353F /* SRViewController.swift in Sources */, 3754AF192EDEF0AF009EBCAD /* SRStoreController.swift in Sources */, 370D2F052ED3FEE700571E77 /* SRHistoryCell.swift in Sources */, @@ -1764,6 +1832,7 @@ 3754AF262EDEF3A7009EBCAD /* SRSmallCoinViewCell.swift in Sources */, 03B1A8D82EC6D051006C353F /* SRCollectionView.swift in Sources */, 03B1A90D2ECAC51A006C353F /* NSNumber+SRAdd.swift in Sources */, + 85AE54782EE8106F0058FEA3 /* SRApnsAlert.swift in Sources */, 3754AF082EDED91C009EBCAD /* SRPayDateModel.swift in Sources */, 03E9A7DD2EC485E1000D1067 /* SRNetworkModel.swift in Sources */, 3754ACEC2ED943AB009EBCAD /* SRAppWebViewController.swift in Sources */, @@ -1844,6 +1913,7 @@ 03B1A93C2ECC406E006C353F /* SRHotSearchView.swift in Sources */, 03B1A8E32EC6F577006C353F /* SRHomeMenuCell.swift in Sources */, 3754AD362EDD9AA7009EBCAD /* SRLogin.swift in Sources */, + 85AE546C2EE804A90058FEA3 /* SRHomeCoinsPackButton.swift in Sources */, 3754AF142EDEE1AC009EBCAD /* SRStatAPI.swift in Sources */, 3754B01B2EE12690009EBCAD /* SRCoinPackConfirmItem2View.swift in Sources */, 3754ACE12ED93C4D009EBCAD /* SRCoinPackController.swift in Sources */, @@ -1898,7 +1968,7 @@ CODE_SIGN_ENTITLEMENTS = SynthReel/SynthReel.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 1.1; DEVELOPMENT_TEAM = 9JR2Y32ZU3; EXCLUDED_ARCHS = ""; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; @@ -1914,7 +1984,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0; + MARKETING_VERSION = 1.0.1; PRODUCT_BUNDLE_IDENTIFIER = com.SynthReel.Tv.lssj; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1942,7 +2012,7 @@ CODE_SIGN_ENTITLEMENTS = SynthReel/SynthReel.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 1.1; DEVELOPMENT_TEAM = 9JR2Y32ZU3; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = SynthReel/Source/Info.plist; @@ -1956,7 +2026,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0; + MARKETING_VERSION = 1.0.1; PRODUCT_BUNDLE_IDENTIFIER = com.SynthReel.Tv.lssj; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/SynthReel/Base/API/SRHomeApi.swift b/SynthReel/Base/API/SRHomeApi.swift index 3eb8e9b..4b93eb9 100644 --- a/SynthReel/Base/API/SRHomeApi.swift +++ b/SynthReel/Base/API/SRHomeApi.swift @@ -2,7 +2,7 @@ // SRHomeApi.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/14. +// Created by 澜声世纪 on 2025/11/14. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/API/SRShortApi.swift b/SynthReel/Base/API/SRShortApi.swift index b29df89..20e36f5 100644 --- a/SynthReel/Base/API/SRShortApi.swift +++ b/SynthReel/Base/API/SRShortApi.swift @@ -2,7 +2,7 @@ // SRShortApi.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/API/SRStatAPI.swift b/SynthReel/Base/API/SRStatAPI.swift index 1bd5edd..b6fe1cb 100644 --- a/SynthReel/Base/API/SRStatAPI.swift +++ b/SynthReel/Base/API/SRStatAPI.swift @@ -2,7 +2,7 @@ // SRStatAPI.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // @@ -42,7 +42,7 @@ class SRStatAPI: NSObject { var param = SRNetwork.Parameters(path: "/createOrder") param.method = .post param.parameters = [ - "userId" : SRAccountManager.manager.userInfo?.customer_id ?? "", + "userId" : SRLogin.manager.userInfo?.customer_id ?? "", "short_play_video_id" : videoId ?? "0", "short_play_id" : shortPlayId ?? "0", "event_key" : eventKey.rawValue, @@ -64,4 +64,35 @@ class SRStatAPI: NSObject { } } } + + static func requestUploadApnsAuthorizationStatus(_ status: Bool) async { + await withCheckedContinuation { continuation in + var param = SRNetwork.Parameters(path: "/customer/uploadNoticeStatus") + param.method = .post + param.parameters = [ + "is_open_notice" : status ? 1 : 0 + ] + SRNetwork.request(parameters: param) { (_: SRNetwork.Response) in + continuation.resume() + } + } + } +} + +extension SRStatAPI { + ///更新通知状态 + static func uploadApnsAuthorizationStatus() { + UNUserNotificationCenter.current().getNotificationSettings { settings in + if settings.authorizationStatus == .authorized { + Task { + await requestUploadApnsAuthorizationStatus(true) + } + + } else if settings.authorizationStatus == .denied { + Task { + await requestUploadApnsAuthorizationStatus(false) + } + } + } + } } diff --git a/SynthReel/Base/API/SRStoreAPI.swift b/SynthReel/Base/API/SRStoreAPI.swift index f29a01c..6d22245 100644 --- a/SynthReel/Base/API/SRStoreAPI.swift +++ b/SynthReel/Base/API/SRStoreAPI.swift @@ -2,7 +2,7 @@ // SRStoreAPI.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // @@ -72,9 +72,23 @@ class SRStoreAPI: NSObject { } } + + static func requestCoinBagCanReceiveInfo() async -> SRCoinPackCanReceiveModel? { + await withCheckedContinuation { continuation in + var param = SRNetwork.Parameters(path: "/getReceiveDayCoin") + param.method = .get + SRNetwork.request(parameters: param) { (response: SRNetwork.Response) in + continuation.resume(returning: response.data) + } + } + } + + + + static func requestReceiveCoinsPackCoins(id: String?) async -> Bool { await withCheckedContinuation { continuation in - var param = SRNetwork.Parameters(path: "/getReceiveDayCoinInfo") + var param = SRNetwork.Parameters(path: "/receiveDayCoin") param.method = .post param.parameters = [ "id" : id ?? "" @@ -94,7 +108,12 @@ class SRStoreAPI: NSObject { var param = SRNetwork.Parameters(path: "/getRetainVipPaySetting") param.method = .get SRNetwork.request(parameters: param) { (response: SRNetwork.Response) in - continuation.resume(returning: response.data) + if let model = response.data, + model.info != nil { + continuation.resume(returning: model) + } else { + continuation.resume(returning: nil) + } } } } diff --git a/SynthReel/Base/API/SRUserApi.swift b/SynthReel/Base/API/SRUserApi.swift index ff2daa6..f6d36bb 100644 --- a/SynthReel/Base/API/SRUserApi.swift +++ b/SynthReel/Base/API/SRUserApi.swift @@ -2,7 +2,7 @@ // SRUserApi.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/13. +// Created by 澜声世纪 on 2025/11/13. // Copyright © 2025 SR. All rights reserved. // @@ -80,7 +80,7 @@ struct SRUserApi { static func requestUploadApnsDeviceToken(token: String) async { await withCheckedContinuation { continuation in - var param = SRNetwork.Parameters(path: "/customer/onLine") + var param = SRNetwork.Parameters(path: "/customer/firebaseToken") param.method = .post param.parameters = [ "fcm_token": token @@ -111,4 +111,17 @@ struct SRUserApi { } } } + + static func requestUploadW2a(data: String) async { + await withCheckedContinuation { continuation in + var param = SRNetwork.Parameters(path: "/w2aSelfAttribution") + param.method = .post + param.parameters = [ + "data": data + ] + SRNetwork.request(parameters: param) { (_: SRNetwork.Response) in + continuation.resume() + } + } + } } diff --git a/SynthReel/Base/Define/SRDefine.swift b/SynthReel/Base/Define/SRDefine.swift index 356f28d..27fe390 100644 --- a/SynthReel/Base/Define/SRDefine.swift +++ b/SynthReel/Base/Define/SRDefine.swift @@ -2,7 +2,7 @@ // SRDefine.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/12. +// Created by 澜声世纪 on 2025/11/12. // Copyright © 2025 SR. All rights reserved. // import UIKit diff --git a/SynthReel/Base/Define/SRUserDefaultsKey.swift b/SynthReel/Base/Define/SRUserDefaultsKey.swift index 84905a7..dc171ba 100644 --- a/SynthReel/Base/Define/SRUserDefaultsKey.swift +++ b/SynthReel/Base/Define/SRUserDefaultsKey.swift @@ -2,7 +2,7 @@ // SRUserDefaultsKey.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/12. +// Created by 澜声世纪 on 2025/11/12. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/Extension/Dictionary+SRAdd.swift b/SynthReel/Base/Extension/Dictionary+SRAdd.swift index 11395f2..e1b0f21 100644 --- a/SynthReel/Base/Extension/Dictionary+SRAdd.swift +++ b/SynthReel/Base/Extension/Dictionary+SRAdd.swift @@ -2,7 +2,7 @@ // Dictionary+SRAdd.swift // SynthReel // -// Created by CSGY on 2025/11/28. +// Created by 澜声世纪 on 2025/11/28. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/Extension/NSNumber+SRAdd.swift b/SynthReel/Base/Extension/NSNumber+SRAdd.swift index 319ebad..7523825 100644 --- a/SynthReel/Base/Extension/NSNumber+SRAdd.swift +++ b/SynthReel/Base/Extension/NSNumber+SRAdd.swift @@ -2,7 +2,7 @@ // NSNumber+SRAdd.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/17. +// Created by 澜声世纪 on 2025/11/17. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/Extension/String+SRAdd.swift b/SynthReel/Base/Extension/String+SRAdd.swift index 5bc47e8..68e4c58 100644 --- a/SynthReel/Base/Extension/String+SRAdd.swift +++ b/SynthReel/Base/Extension/String+SRAdd.swift @@ -2,7 +2,7 @@ // String+SRAdd.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/13. +// Created by 澜声世纪 on 2025/11/13. // Copyright © 2025 SR. All rights reserved. // @@ -36,3 +36,22 @@ extension String: SmartCodable { } } + +extension String { + ///将url中的参数转换成字典 + func urlQuryToDictionary() -> [String : Any] { + let array = self.components(separatedBy: "&") + var tempDic: [String : Any] = [:] + + array.forEach { + if let strRange = $0.range(of: "=") { + var key: String = String($0.prefix(upTo: strRange.upperBound)) + key.removeLast() + var value: String = String($0.suffix(from: strRange.upperBound)) + value = value.removingPercentEncoding ?? value + tempDic[key] = value + } + } + return tempDic + } +} diff --git a/SynthReel/Base/Extension/UIFont+SRAdd.swift b/SynthReel/Base/Extension/UIFont+SRAdd.swift index c77e250..0405cbe 100644 --- a/SynthReel/Base/Extension/UIFont+SRAdd.swift +++ b/SynthReel/Base/Extension/UIFont+SRAdd.swift @@ -2,7 +2,7 @@ // UIFont+SRAdd.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/13. +// Created by 澜声世纪 on 2025/11/13. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/Extension/UINavigationBar+SRAdd.swift b/SynthReel/Base/Extension/UINavigationBar+SRAdd.swift index 860eb8a..0936db6 100644 --- a/SynthReel/Base/Extension/UINavigationBar+SRAdd.swift +++ b/SynthReel/Base/Extension/UINavigationBar+SRAdd.swift @@ -2,7 +2,7 @@ // UINavigationBar+SRAdd.swift // SynthReel // -// Created by CSGY on 2025/11/25. +// Created by 澜声世纪 on 2025/11/25. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/Extension/UIScreen+SRAdd.swift b/SynthReel/Base/Extension/UIScreen+SRAdd.swift index 071dadb..afc1507 100644 --- a/SynthReel/Base/Extension/UIScreen+SRAdd.swift +++ b/SynthReel/Base/Extension/UIScreen+SRAdd.swift @@ -2,7 +2,7 @@ // UIScreen+SRAdd.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/13. +// Created by 澜声世纪 on 2025/11/13. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/Extension/UIScrollView+SRAdd.swift b/SynthReel/Base/Extension/UIScrollView+SRAdd.swift index d95a0ec..2b0dd53 100644 --- a/SynthReel/Base/Extension/UIScrollView+SRAdd.swift +++ b/SynthReel/Base/Extension/UIScrollView+SRAdd.swift @@ -2,7 +2,7 @@ // UIScrollView+SRAdd.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/17. +// Created by 澜声世纪 on 2025/11/17. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/Extension/UIStackView+SRAdd.swift b/SynthReel/Base/Extension/UIStackView+SRAdd.swift index 9e251bb..b7e2f1d 100644 --- a/SynthReel/Base/Extension/UIStackView+SRAdd.swift +++ b/SynthReel/Base/Extension/UIStackView+SRAdd.swift @@ -2,7 +2,7 @@ // UIStackView+SRAdd.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/15. +// Created by 澜声世纪 on 2025/11/15. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/Extension/UIView+SRAdd.swift b/SynthReel/Base/Extension/UIView+SRAdd.swift index a53fa52..770a480 100644 --- a/SynthReel/Base/Extension/UIView+SRAdd.swift +++ b/SynthReel/Base/Extension/UIView+SRAdd.swift @@ -2,7 +2,7 @@ // UIView+SRAdd.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/17. +// Created by 澜声世纪 on 2025/11/17. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/Extension/UserDefaults+SRAdd.swift b/SynthReel/Base/Extension/UserDefaults+SRAdd.swift index da70b84..60c578c 100644 --- a/SynthReel/Base/Extension/UserDefaults+SRAdd.swift +++ b/SynthReel/Base/Extension/UserDefaults+SRAdd.swift @@ -2,7 +2,7 @@ // UserDefaults+SRAdd.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/12. +// Created by 澜声世纪 on 2025/11/12. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/Model/SROpenAppModel.swift b/SynthReel/Base/Model/SROpenAppModel.swift new file mode 100644 index 0000000..4e035fa --- /dev/null +++ b/SynthReel/Base/Model/SROpenAppModel.swift @@ -0,0 +1,26 @@ +// +// SROpenAppModel.swift +// SynthReel +// +// Created by 澜声世纪 on 2025/12/9. +// Copyright © 2025 SR. All rights reserved. +// + +import UIKit +import SmartCodable + +struct SROpenAppModel: SmartCodable { + + enum Path: String, SmartCaseDefaultable { + case videoDetail = "detail" + ///反馈列表 + case feedback = "feedback" + ///活动 + case promotion = "promotion" + } + + var id: String? + var message_id: String? + var short_play_id: String? + var path: Path? +} diff --git a/SynthReel/Base/Networking/SRNetwork.swift b/SynthReel/Base/Networking/SRNetwork.swift index 4bf2e21..f974757 100644 --- a/SynthReel/Base/Networking/SRNetwork.swift +++ b/SynthReel/Base/Networking/SRNetwork.swift @@ -2,7 +2,7 @@ // SRNetwork.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/12. +// Created by 澜声世纪 on 2025/11/12. // Copyright © 2025 SR. All rights reserved. // @@ -20,7 +20,8 @@ class SRNetwork: NSObject { static func request(parameters: SRNetwork.Parameters, completion: ((_ response: SRNetwork.Response) -> Void)?) { - if SRAccountManager.manager.token == nil { + if SRLogin.manager.token == nil { + print(SRLogin.manager.token ?? "123") self.requestToken(completer: nil) } @@ -81,7 +82,7 @@ class SRNetwork: NSObject { self.requestToken { token in if token != nil { _Concurrency.Task { - await SRAccountManager.manager.updateUserInfo() + await SRLogin.manager.requestUserToken(completer: nil) } } } @@ -164,7 +165,7 @@ class SRNetwork: NSObject { extension SRNetwork { ///获取token - static func requestToken(completer: ((_ token: SRAccountToken?) -> Void)?) { + static func requestToken(completer: ((_ token: SRTokenModel?) -> Void)?) { guard self.tokenOperation == nil else { completer?(nil) return @@ -173,11 +174,11 @@ extension SRNetwork { self.tokenOperation = BlockOperation(block: { let semaphore = DispatchSemaphore(value: 0) let param = SRNetwork.Parameters(path: "/customer/register") - + print("chongfu") DispatchQueue.main.async { - SRNetwork.request(parameters: param) { (response: SRNetwork.Response) in + SRNetwork.request(parameters: param) { (response: SRNetwork.Response) in if let token = response.data { - SRAccountManager.manager.setAccountToken(token) + SRLogin.manager.loginSuccessSaveToken(token) } do { semaphore.signal() } self.tokenOperation = nil @@ -189,5 +190,4 @@ extension SRNetwork { operationQueue.addOperation(self.tokenOperation!) } - } diff --git a/SynthReel/Base/Networking/SRNetworkModel.swift b/SynthReel/Base/Networking/SRNetworkModel.swift index 953295a..39771cd 100644 --- a/SynthReel/Base/Networking/SRNetworkModel.swift +++ b/SynthReel/Base/Networking/SRNetworkModel.swift @@ -2,7 +2,7 @@ // SRNetworkModel.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/12. +// Created by 澜声世纪 on 2025/11/12. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/Networking/SRNetworkReachableManager.swift b/SynthReel/Base/Networking/SRNetworkReachableManager.swift index d98f92a..5d90c9e 100644 --- a/SynthReel/Base/Networking/SRNetworkReachableManager.swift +++ b/SynthReel/Base/Networking/SRNetworkReachableManager.swift @@ -2,7 +2,7 @@ // SRNetworkReachableManager.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/12. +// Created by 澜声世纪 on 2025/11/12. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/Networking/SRResponseCryptor.swift b/SynthReel/Base/Networking/SRResponseCryptor.swift index 303dec7..4ff0502 100644 --- a/SynthReel/Base/Networking/SRResponseCryptor.swift +++ b/SynthReel/Base/Networking/SRResponseCryptor.swift @@ -2,7 +2,7 @@ // SRResponseCryptor.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/12. +// Created by 澜声世纪 on 2025/11/12. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/Networking/SRTargetType.swift b/SynthReel/Base/Networking/SRTargetType.swift index 6a4dd6c..17484bd 100644 --- a/SynthReel/Base/Networking/SRTargetType.swift +++ b/SynthReel/Base/Networking/SRTargetType.swift @@ -2,7 +2,7 @@ // SRTargetType.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/12. +// Created by 澜声世纪 on 2025/11/12. // Copyright © 2025 SR. All rights reserved. // @@ -56,7 +56,7 @@ extension SRTargetType: TargetType { "device-id" : SRDeviceId.shared.id, //设备id "system-type" : "ios", "model" : UIDevice.current.machineModelName ?? "", - "authorization" : SRAccountManager.manager.token?.token ?? "", + "authorization" : SRLogin.manager.token?.token ?? "", "device-gaid" : UIDevice.current.identifierForVendor?.uuidString ?? "", "product-prefix" : "SynthReel" ] diff --git a/SynthReel/Base/Networking/SRUrlPath.swift b/SynthReel/Base/Networking/SRUrlPath.swift index aa41749..c4f1a15 100644 --- a/SynthReel/Base/Networking/SRUrlPath.swift +++ b/SynthReel/Base/Networking/SRUrlPath.swift @@ -2,14 +2,12 @@ // SRUrlPath.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/12. +// Created by 澜声世纪 on 2025/11/12. // Copyright © 2025 SR. All rights reserved. // let SRBaseURL = "https://api-synthreeltv.synthreeltv.com" -//let SRBaseURL = "https://api-univicos.univicos.com" let SRUrlPathPrefix = "/th" -//let SRUrlPathPrefix = "/uni" let SRWebBaseURL = "https://www.synthreeltv.com" let SRCampaignWebURL = "https://campaign.synthreeltv.com" diff --git a/SynthReel/Base/View/SRCollectionView.swift b/SynthReel/Base/View/SRCollectionView.swift index 3318d71..5f5630e 100644 --- a/SynthReel/Base/View/SRCollectionView.swift +++ b/SynthReel/Base/View/SRCollectionView.swift @@ -2,7 +2,7 @@ // SRCollectionView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/14. +// Created by 澜声世纪 on 2025/11/14. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/View/SRGradientView.swift b/SynthReel/Base/View/SRGradientView.swift index 8a48cf1..febcea2 100644 --- a/SynthReel/Base/View/SRGradientView.swift +++ b/SynthReel/Base/View/SRGradientView.swift @@ -2,7 +2,7 @@ // SRGradientView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/15. +// Created by 澜声世纪 on 2025/11/15. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/View/SRGradientbutton.swift b/SynthReel/Base/View/SRGradientbutton.swift index 1dcd344..9a70a13 100644 --- a/SynthReel/Base/View/SRGradientbutton.swift +++ b/SynthReel/Base/View/SRGradientbutton.swift @@ -2,7 +2,7 @@ // SRGradientbutton.swift // SynthReel // -// Created by CSGY on 2025/11/27. +// Created by 澜声世纪 on 2025/11/27. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/View/SRImageView.swift b/SynthReel/Base/View/SRImageView.swift index 5b9bb99..4b96c90 100644 --- a/SynthReel/Base/View/SRImageView.swift +++ b/SynthReel/Base/View/SRImageView.swift @@ -2,7 +2,7 @@ // SRImageView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/15. +// Created by 澜声世纪 on 2025/11/15. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/View/SRLabel.swift b/SynthReel/Base/View/SRLabel.swift index 8a551b5..2354899 100644 --- a/SynthReel/Base/View/SRLabel.swift +++ b/SynthReel/Base/View/SRLabel.swift @@ -2,7 +2,7 @@ // SRLabel.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/14. +// Created by 澜声世纪 on 2025/11/14. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/View/SRNavgationTitleView.swift b/SynthReel/Base/View/SRNavgationTitleView.swift index f412fe2..44b2bd8 100644 --- a/SynthReel/Base/View/SRNavgationTitleView.swift +++ b/SynthReel/Base/View/SRNavgationTitleView.swift @@ -2,7 +2,7 @@ // SRNavgationTitleView.swift // SynthReel // -// Created by CSGY on 2025/11/25. +// Created by 澜声世纪 on 2025/11/25. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/View/SRPanModalContentView.swift b/SynthReel/Base/View/SRPanModalContentView.swift index 68bd137..1519595 100644 --- a/SynthReel/Base/View/SRPanModalContentView.swift +++ b/SynthReel/Base/View/SRPanModalContentView.swift @@ -2,7 +2,7 @@ // SRPanModalContentView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/View/SRScrollView.swift b/SynthReel/Base/View/SRScrollView.swift index 4d3470b..73d1fa7 100644 --- a/SynthReel/Base/View/SRScrollView.swift +++ b/SynthReel/Base/View/SRScrollView.swift @@ -2,7 +2,7 @@ // SRScrollView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/15. +// Created by 澜声世纪 on 2025/11/15. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/View/SRTableView.swift b/SynthReel/Base/View/SRTableView.swift index b1f62ba..6a82765 100644 --- a/SynthReel/Base/View/SRTableView.swift +++ b/SynthReel/Base/View/SRTableView.swift @@ -2,7 +2,7 @@ // SRTableView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/View/SRTableViewCell.swift b/SynthReel/Base/View/SRTableViewCell.swift index 87b0307..fe58e4a 100644 --- a/SynthReel/Base/View/SRTableViewCell.swift +++ b/SynthReel/Base/View/SRTableViewCell.swift @@ -2,7 +2,7 @@ // SRTableViewCell.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/ViewController/SRAppStartViewController.swift b/SynthReel/Base/ViewController/SRAppStartViewController.swift new file mode 100644 index 0000000..c9c7e37 --- /dev/null +++ b/SynthReel/Base/ViewController/SRAppStartViewController.swift @@ -0,0 +1,52 @@ +// +// SRAppStartViewController.swift +// SynthReel +// +// Created by 澜声世纪 on 2025/12/9. +// Copyright © 2025 SR. All rights reserved. +// + +import UIKit + +class SRAppStartViewController: SRViewController { + + var openAppBlock: (() -> Void)? + + private lazy var lanuchVC: UIViewController? = { + let vc = SRTool.lanuchViewController + return vc + }() + + private lazy var startButton: UIButton = { + let button = SRGradientbutton(type: .custom, primaryAction: UIAction(handler: { [weak self] _ in + guard let self = self else { return } + self.openAppBlock?() + })) + button.setBackgroundImage(.startButton, for: .normal) + button.setTitle("start", for: .normal) + button.setTitleColor(.white, for: .normal) + button.titleLabel?.font = .font(ofSize:16, weight: .semibold) + return button + }() + + override func viewDidLoad() { + super.viewDidLoad() + + if let vc = lanuchVC { + addChild(vc) + view.addSubview(vc.view) + } + + view.addSubview(startButton) + + startButton.snp.makeConstraints { make in + make.left.right.equalToSuperview().inset(48) + make.height.equalTo(50) + make.bottom.equalToSuperview().offset(-(UIScreen.safeBottom + 110)) + } + + + } + +} + diff --git a/SynthReel/Base/ViewController/SRNavigationController.swift b/SynthReel/Base/ViewController/SRNavigationController.swift index 337be98..f0e0cb2 100644 --- a/SynthReel/Base/ViewController/SRNavigationController.swift +++ b/SynthReel/Base/ViewController/SRNavigationController.swift @@ -2,7 +2,7 @@ // SRNavigationController.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/13. +// Created by 澜声世纪 on 2025/11/13. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/ViewController/SRTabBarController.swift b/SynthReel/Base/ViewController/SRTabBarController.swift index b9d65a4..f6d7faa 100644 --- a/SynthReel/Base/ViewController/SRTabBarController.swift +++ b/SynthReel/Base/ViewController/SRTabBarController.swift @@ -2,7 +2,7 @@ // SRTabBarController.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/13. +// Created by 澜声世纪 on 2025/11/13. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/ViewController/SRViewController.swift b/SynthReel/Base/ViewController/SRViewController.swift index 17d0c70..27e4b6d 100644 --- a/SynthReel/Base/ViewController/SRViewController.swift +++ b/SynthReel/Base/ViewController/SRViewController.swift @@ -2,7 +2,7 @@ // SRViewController.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/13. +// Created by 澜声世纪 on 2025/11/13. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/webview/SRAppWebViewController.swift b/SynthReel/Base/webview/SRAppWebViewController.swift index d8b267a..b1d8b2b 100644 --- a/SynthReel/Base/webview/SRAppWebViewController.swift +++ b/SynthReel/Base/webview/SRAppWebViewController.swift @@ -2,7 +2,7 @@ // SRAppWebViewController.swift // SynthReel // -// Created by CSGY on 2025/11/28. +// Created by 澜声世纪 on 2025/11/28. // Copyright © 2025 SR. All rights reserved. // @@ -52,7 +52,7 @@ extension SRAppWebViewController { DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [weak self] in guard let self = self else { return } var dic = [ - "token" : SRAccountManager.manager.token?.token ?? "", + "token" : SRLogin.manager.token?.token ?? "", "time_zone" : String.timeZone(), // "lang" : FALanguageManager.manager.currentLanguageKey, "lang" : "en", diff --git a/SynthReel/Base/webview/SRBaseWebViewController + Script.swift b/SynthReel/Base/webview/SRBaseWebViewController + Script.swift index 4f6f648..b867370 100644 --- a/SynthReel/Base/webview/SRBaseWebViewController + Script.swift +++ b/SynthReel/Base/webview/SRBaseWebViewController + Script.swift @@ -2,7 +2,7 @@ // SRBaseWebViewController + Script.swift // SynthReel // -// Created by CSGY on 2025/11/28. +// Created by 澜声世纪 on 2025/11/28. // Copyright © 2025 SR. All rights reserved. // @@ -75,7 +75,7 @@ extension SRBaseWebViewController { case kSRWebMessageAccountDeletionFinish: self.navigationController?.popToRootViewController(animated: true) -// NotificationCenter.default.post(name: FALogin.loginStatusChangeNotification, object: nil) + NotificationCenter.default.post(name: SRLogin.loginStatusChangeNotification, object: nil) default: break diff --git a/SynthReel/Base/webview/SRBaseWebViewController.swift b/SynthReel/Base/webview/SRBaseWebViewController.swift index eab2814..89752db 100644 --- a/SynthReel/Base/webview/SRBaseWebViewController.swift +++ b/SynthReel/Base/webview/SRBaseWebViewController.swift @@ -2,7 +2,7 @@ // SRBaseWebViewController.swift // SynthReel // -// Created by CSGY on 2025/11/28. +// Created by 澜声世纪 on 2025/11/28. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/webview/SRWebMessageModel.swift b/SynthReel/Base/webview/SRWebMessageModel.swift index aa9efc6..2302bde 100644 --- a/SynthReel/Base/webview/SRWebMessageModel.swift +++ b/SynthReel/Base/webview/SRWebMessageModel.swift @@ -2,7 +2,7 @@ // SRWebMessageModel.swift // SynthReel // -// Created by CSGY on 2025/11/28. +// Created by 澜声世纪 on 2025/11/28. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Base/webview/SRWebView.swift b/SynthReel/Base/webview/SRWebView.swift index 265a58a..acc29a9 100644 --- a/SynthReel/Base/webview/SRWebView.swift +++ b/SynthReel/Base/webview/SRWebView.swift @@ -2,7 +2,7 @@ // SRWebView.swift // SynthReel // -// Created by CSGY on 2025/11/28. +// Created by 澜声世纪 on 2025/11/28. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Coinpack/M/SRCoinPackCanReceiveModel.swift b/SynthReel/Class/Coinpack/M/SRCoinPackCanReceiveModel.swift new file mode 100644 index 0000000..f6132ae --- /dev/null +++ b/SynthReel/Class/Coinpack/M/SRCoinPackCanReceiveModel.swift @@ -0,0 +1,14 @@ +// +// SRCoinPackCanReceiveModel.swift +// SynthReel +// +// Created by 澜声世纪 on 2025/12/9. +// Copyright © 2025 SR. All rights reserved. +// + +import UIKit +import SmartCodable + +struct SRCoinPackCanReceiveModel: SmartCodable { + var coins: Int? +} diff --git a/SynthReel/Class/Coinpack/M/SRCoinsPackModel.swift b/SynthReel/Class/Coinpack/M/SRCoinsPackModel.swift index 4d5ef20..41c0a2f 100644 --- a/SynthReel/Class/Coinpack/M/SRCoinsPackModel.swift +++ b/SynthReel/Class/Coinpack/M/SRCoinsPackModel.swift @@ -2,7 +2,7 @@ // SRCoinsPackModel.swift // SynthReel // -// Created by CSGY on 2025/11/28. +// Created by 澜声世纪 on 2025/11/28. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Coinpack/M/SRCoinsPackReceiveModel.swift b/SynthReel/Class/Coinpack/M/SRCoinsPackReceiveModel.swift index a1ee997..ff202bb 100644 --- a/SynthReel/Class/Coinpack/M/SRCoinsPackReceiveModel.swift +++ b/SynthReel/Class/Coinpack/M/SRCoinsPackReceiveModel.swift @@ -2,7 +2,7 @@ // SRCoinsPackReceiveModel.swift // SynthReel // -// Created by CSGY on 2025/11/28. +// Created by 澜声世纪 on 2025/11/28. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Coinpack/VC/SRCoinPackController.swift b/SynthReel/Class/Coinpack/VC/SRCoinPackController.swift index 0d072e6..7319b56 100644 --- a/SynthReel/Class/Coinpack/VC/SRCoinPackController.swift +++ b/SynthReel/Class/Coinpack/VC/SRCoinPackController.swift @@ -2,7 +2,7 @@ // SRCoinPackController.swift // SynthReel // -// Created by CSGY on 2025/11/28. +// Created by 澜声世纪 on 2025/11/28. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Coinpack/view/SRCoinPackConfirmItem1View.swift b/SynthReel/Class/Coinpack/view/SRCoinPackConfirmItem1View.swift index f41ce7f..ccfb5f9 100644 --- a/SynthReel/Class/Coinpack/view/SRCoinPackConfirmItem1View.swift +++ b/SynthReel/Class/Coinpack/view/SRCoinPackConfirmItem1View.swift @@ -2,7 +2,7 @@ // SRCoinPackConfirmItem1View.swift // SynthReel // -// Created by CSGY on 2025/12/4. +// Created by 澜声世纪 on 2025/12/4. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Coinpack/view/SRCoinPackConfirmItem2View.swift b/SynthReel/Class/Coinpack/view/SRCoinPackConfirmItem2View.swift index f683c5e..73f9051 100644 --- a/SynthReel/Class/Coinpack/view/SRCoinPackConfirmItem2View.swift +++ b/SynthReel/Class/Coinpack/view/SRCoinPackConfirmItem2View.swift @@ -2,7 +2,7 @@ // SRCoinPackConfirmItem2View.swift // SynthReel // -// Created by CSGY on 2025/12/4. +// Created by 澜声世纪 on 2025/12/4. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Coinpack/view/SRCoinPackConfirmItemView.swift b/SynthReel/Class/Coinpack/view/SRCoinPackConfirmItemView.swift index 64cde3b..074ab51 100644 --- a/SynthReel/Class/Coinpack/view/SRCoinPackConfirmItemView.swift +++ b/SynthReel/Class/Coinpack/view/SRCoinPackConfirmItemView.swift @@ -2,7 +2,7 @@ // SRCoinPackConfirmItemView.swift // SynthReel // -// Created by CSGY on 2025/12/4. +// Created by 澜声世纪 on 2025/12/4. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Coinpack/view/SRCoinPackConfirmView.swift b/SynthReel/Class/Coinpack/view/SRCoinPackConfirmView.swift index ff8c96a..0ac0a4c 100644 --- a/SynthReel/Class/Coinpack/view/SRCoinPackConfirmView.swift +++ b/SynthReel/Class/Coinpack/view/SRCoinPackConfirmView.swift @@ -2,7 +2,7 @@ // SRCoinPackConfirmView.swift // SynthReel // -// Created by CSGY on 2025/12/4. +// Created by 澜声世纪 on 2025/12/4. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Coinpack/view/SRCoinPackHeaderView.swift b/SynthReel/Class/Coinpack/view/SRCoinPackHeaderView.swift index 8b5d033..f4c99cf 100644 --- a/SynthReel/Class/Coinpack/view/SRCoinPackHeaderView.swift +++ b/SynthReel/Class/Coinpack/view/SRCoinPackHeaderView.swift @@ -2,7 +2,7 @@ // SRCoinPackHeaderView.swift // SynthReel // -// Created by CSGY on 2025/11/28. +// Created by 澜声世纪 on 2025/11/28. // Copyright © 2025 SR. All rights reserved. // @@ -96,7 +96,7 @@ class SRCoinPackHeaderView: UIView { // 创建富文本标题 let coinImage = UIImage(named: "smallCoins")! let coinText = NSTextAttachment(image: coinImage) - coinText.bounds = CGRect(x: 0, y: -2.5, width: coinImage.size.width, height: coinImage.size.height) + coinText.bounds = CGRect(x: 0, y: -2.5, width: 13, height: 13) let coinAtt = AttributedString(NSAttributedString(attachment: coinText)) let textAtt = AttributedString("synthreel_claim_all".localized + " ", attributes: AttributeContainer([ diff --git a/SynthReel/Class/Coinpack/view/SRCoinsPackAlert.swift b/SynthReel/Class/Coinpack/view/SRCoinsPackAlert.swift new file mode 100644 index 0000000..906631f --- /dev/null +++ b/SynthReel/Class/Coinpack/view/SRCoinsPackAlert.swift @@ -0,0 +1,124 @@ +// +// SRCoinsPackAlert.swift +// SynthReel +// +// Created by 澜声世纪 on 2025/12/9. +// Copyright © 2025 SR. All rights reserved. +// + +import UIKit + +class SRCoinsPackAlert: SRBaseAlert { + + var claimButtonClick: (() -> Void)? + var coinsCount: Int? { + didSet { + + } + } + + private lazy var imageView = UIImageView(image: UIImage(named: "coinalertBg")) + + private lazy var titleLabel: UILabel = { + let label = UILabel() + label.font = .font(ofSize: 18, weight: .bold) + label.textColor = .white + label.textAlignment = .center + label.numberOfLines = 0 + label.text = "coins_pack_alert_title".localized + return label + }() + + private lazy var moreCoinimageView = UIImageView(image: UIImage(named: "moreCoins")) + + private lazy var coinLabel: SRLabel = { + let label = SRLabel() + label.textColors = [UIColor.F_1_FF_2_F.cgColor, UIColor.srBlue.cgColor] + label.textStartPoint = .init(x: 0, y: 0.5) + label.textEndPoint = .init(x: 1, y: 0.5) + label.font = .font(ofSize: 20, weight: .semibold) + return label + }() + + private lazy var claimButton: UIButton = { + let button = UIButton(type: .custom) + button.setTitle("synthreel_claim_now".localized, for: .normal) + button.setTitleColor(.black, for: .normal) + button.titleLabel?.font = .font(ofSize: 16, weight: .semibold) + button.setBackgroundImage(.cliamNowBg, for: .normal) + button.addTarget(self, action: #selector(claimButtonAciton), for: .touchUpInside) + return button + }() + + private lazy var laterButton: UIButton = { + let button = UIButton(type: .custom) + button.setTitle("synthreel_open_notification_later".localized, for: .normal) + button.setTitleColor(.FFFFFF_40, for: .normal) + button.titleLabel?.font = .font(ofSize: 14, weight: .regular) + button.addTarget(self, action: #selector(dismiss), for: .touchUpInside) + return button + }() + + override init(frame: CGRect) { + super.init(frame: frame) + + + fa_setupLayout() + } + + @MainActor required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + @objc func claimButtonAciton () { + self.claimButtonClick?() + } + +} + +extension SRCoinsPackAlert { + + private func fa_setupLayout() { + contentView.addSubview(imageView) + imageView.addSubview(titleLabel) + imageView.addSubview(moreCoinimageView) + imageView.addSubview(coinLabel) + imageView.addSubview(claimButton) + imageView.addSubview(laterButton) + + imageView.isUserInteractionEnabled = true + imageView.snp.makeConstraints { make in + make.edges.equalToSuperview() + } + + titleLabel.snp.makeConstraints { make in + make.left.equalTo(17) + make.right.lessThanOrEqualToSuperview().offset(-110) + make.top.equalTo(15) + } + + moreCoinimageView.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.top.equalTo(titleLabel.snp.bottom).offset(35) + } + + coinLabel.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.top.equalTo(moreCoinimageView.snp.bottom).offset(2) + } + + claimButton.snp.makeConstraints { make in + make.top.equalTo(coinLabel.snp.bottom).offset(35) + make.left.right.equalToSuperview().inset(17) + make.height.equalTo(48) + } + + laterButton.snp.makeConstraints { make in + make.left.right.height.equalTo(claimButton) + make.top.equalTo(claimButton.snp.bottom).offset(1) + make.bottom.equalToSuperview().offset(-13) + } + } + +} + diff --git a/SynthReel/Class/Coinpack/view/SRCoinsPackBuyView.swift b/SynthReel/Class/Coinpack/view/SRCoinsPackBuyView.swift index c40a000..8ba9111 100644 --- a/SynthReel/Class/Coinpack/view/SRCoinsPackBuyView.swift +++ b/SynthReel/Class/Coinpack/view/SRCoinsPackBuyView.swift @@ -2,7 +2,7 @@ // SRCoinsPackBuyView.swift // SynthReel // -// Created by CSGY on 2025/12/4. +// Created by 澜声世纪 on 2025/12/4. // Copyright © 2025 SR. All rights reserved. // @@ -104,7 +104,7 @@ extension SRCoinsPackBuyView: UICollectionViewDelegate, UICollectionViewDataSour view.buyFinishHandle = { [weak self] in guard let self = self else { return } Task { - await SRAccountManager.manager.updateUserInfo() + await SRLogin.manager.requestUserInfo(completer: nil) self.buyFinishHandle?() } } diff --git a/SynthReel/Class/Coinpack/view/SRCoinsPackClaimListCell.swift b/SynthReel/Class/Coinpack/view/SRCoinsPackClaimListCell.swift index 1027ccd..c9a6cdf 100644 --- a/SynthReel/Class/Coinpack/view/SRCoinsPackClaimListCell.swift +++ b/SynthReel/Class/Coinpack/view/SRCoinsPackClaimListCell.swift @@ -2,7 +2,7 @@ // SRCoinsPackClaimListCell.swift // SynthReel // -// Created by CSGY on 2025/12/4. +// Created by 澜声世纪 on 2025/12/4. // Copyright © 2025 SR. All rights reserved. // @@ -82,7 +82,7 @@ class SRCoinsPackClaimListCell: UICollectionViewCell { button.configuration?.background.image = UIImage(named: "coinStackBg") let coinImage = UIImage(named: "bigCoins")! let coinText = NSTextAttachment(image: coinImage) - coinText.bounds = .init(x: 0, y: -2.5, width: coinImage.size.width, height: coinImage.size.height) + coinText.bounds = .init(x: 0, y: -2.5, width: 13, height: 13) let coinAtt = AttributedString(NSAttributedString(attachment: coinText)) let countAtt = AttributedString(" \(self.model?.receive_coins ?? 0)", attributes: AttributeContainer([ .font : UIFont.font(ofSize: 12, weight: .bold), @@ -90,7 +90,7 @@ class SRCoinsPackClaimListCell: UICollectionViewCell { ])) - button.configuration?.attributedTitle = AttributedString("fableon_claim".localized, attributes: AttributeContainer([ + button.configuration?.attributedTitle = AttributedString("synthreel_claim".localized, attributes: AttributeContainer([ .font : UIFont.font(ofSize: 14, weight: .bold), .foregroundColor : UIColor.white ])) @@ -175,7 +175,7 @@ extension SRCoinsPackClaimListCell { coinsView1.snp.makeConstraints { make in make.left.equalToSuperview().offset(12) - make.bottom.equalToSuperview().offset(-18) + make.bottom.equalToSuperview().offset(-14) } lineView2.snp.makeConstraints { make in @@ -190,7 +190,7 @@ extension SRCoinsPackClaimListCell { claimButton.snp.makeConstraints { make in make.right.equalToSuperview().offset(-12) - make.centerY.equalTo(coinsView1) + make.bottom.equalTo(-14) make.height.equalTo(48) make.width.equalTo(120) } @@ -221,14 +221,12 @@ extension SRCoinsPackClaimListCell { return label }() - private lazy var iconImageView = UIImageView(image: UIImage(named: "coins_icon_03")) + private lazy var iconImageView = UIImageView(image: UIImage(named: "bigCoins")) private lazy var coinsLabel: UILabel = { let label = SRLabel() label.font = .font(ofSize: 14, weight: .bold) - label.textColors = [UIColor._4_CFFD_4.cgColor, UIColor._51_D_4_FF.cgColor] - label.textStartPoint = .init(x: 0.5, y: 0) - label.textEndPoint = .init(x: 0.5, y: 1) + label.textColor = .white label.text = "0" return label }() diff --git a/SynthReel/Class/Coinpack/view/SRCoinsPackClaimListView.swift b/SynthReel/Class/Coinpack/view/SRCoinsPackClaimListView.swift index f6726e2..b877bf3 100644 --- a/SynthReel/Class/Coinpack/view/SRCoinsPackClaimListView.swift +++ b/SynthReel/Class/Coinpack/view/SRCoinsPackClaimListView.swift @@ -2,7 +2,7 @@ // SRCoinsPackClaimListView.swift // SynthReel // -// Created by CSGY on 2025/12/4. +// Created by 澜声世纪 on 2025/12/4. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/M/SRCategoryModel.swift b/SynthReel/Class/Home/M/SRCategoryModel.swift index 5b2c67b..ead3721 100644 --- a/SynthReel/Class/Home/M/SRCategoryModel.swift +++ b/SynthReel/Class/Home/M/SRCategoryModel.swift @@ -2,7 +2,7 @@ // SRCategoryModel.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/14. +// Created by 澜声世纪 on 2025/11/14. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/M/SRHomeModuleItem.swift b/SynthReel/Class/Home/M/SRHomeModuleItem.swift index ecc123a..38422af 100644 --- a/SynthReel/Class/Home/M/SRHomeModuleItem.swift +++ b/SynthReel/Class/Home/M/SRHomeModuleItem.swift @@ -2,7 +2,7 @@ // SRHomeModuleItem.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/14. +// Created by 澜声世纪 on 2025/11/14. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeBannerCell.swift b/SynthReel/Class/Home/V/SRHomeBannerCell.swift index 2d8e9f0..d0141df 100644 --- a/SynthReel/Class/Home/V/SRHomeBannerCell.swift +++ b/SynthReel/Class/Home/V/SRHomeBannerCell.swift @@ -2,7 +2,7 @@ // SRHomeBannerCell.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/15. +// Created by 澜声世纪 on 2025/11/15. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeBannerMiniCell.swift b/SynthReel/Class/Home/V/SRHomeBannerMiniCell.swift index c8d56d3..55c3684 100644 --- a/SynthReel/Class/Home/V/SRHomeBannerMiniCell.swift +++ b/SynthReel/Class/Home/V/SRHomeBannerMiniCell.swift @@ -2,7 +2,7 @@ // SRHomeBannerMiniCell.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/17. +// Created by 澜声世纪 on 2025/11/17. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeBannerView.swift b/SynthReel/Class/Home/V/SRHomeBannerView.swift index 460c680..c6f1092 100644 --- a/SynthReel/Class/Home/V/SRHomeBannerView.swift +++ b/SynthReel/Class/Home/V/SRHomeBannerView.swift @@ -2,7 +2,7 @@ // SRHomeBannerView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/15. +// Created by 澜声世纪 on 2025/11/15. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeBingeWorthyCell.swift b/SynthReel/Class/Home/V/SRHomeBingeWorthyCell.swift index 5467fd4..c280002 100644 --- a/SynthReel/Class/Home/V/SRHomeBingeWorthyCell.swift +++ b/SynthReel/Class/Home/V/SRHomeBingeWorthyCell.swift @@ -2,7 +2,7 @@ // SRHomeBingeWorthyCell.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/17. +// Created by 澜声世纪 on 2025/11/17. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeBingeWorthyView.swift b/SynthReel/Class/Home/V/SRHomeBingeWorthyView.swift index 2c50343..c3ee3ee 100644 --- a/SynthReel/Class/Home/V/SRHomeBingeWorthyView.swift +++ b/SynthReel/Class/Home/V/SRHomeBingeWorthyView.swift @@ -2,7 +2,7 @@ // SRHomeBingeWorthyView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/17. +// Created by 澜声世纪 on 2025/11/17. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeChildCell.swift b/SynthReel/Class/Home/V/SRHomeChildCell.swift index cf707cb..b463745 100644 --- a/SynthReel/Class/Home/V/SRHomeChildCell.swift +++ b/SynthReel/Class/Home/V/SRHomeChildCell.swift @@ -2,7 +2,7 @@ // SRHomeChildCell.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/14. +// Created by 澜声世纪 on 2025/11/14. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeCoinsPackButton.swift b/SynthReel/Class/Home/V/SRHomeCoinsPackButton.swift new file mode 100644 index 0000000..8207c01 --- /dev/null +++ b/SynthReel/Class/Home/V/SRHomeCoinsPackButton.swift @@ -0,0 +1,50 @@ +// +// SRHomeCoinsPackButton.swift +// SynthReel +// +// Created by 澜声世纪 on 2025/12/9. +// Copyright © 2025 SR. All rights reserved. +// + +import UIKit + +class SRHomeCoinsPackButton: UIControl { + + private lazy var bgImageView = UIImageView(image: UIImage(named: "浮窗")) + private lazy var textBgImageView = UIImageView(image: UIImage(named: "Rectangle 1098")) + + private lazy var textLabel: UILabel = { + let label = UILabel() + label.font = .font(ofSize: 10, weight: .init(900)).withBoldItalic() + label.textColor = .white + label.text = "synthreel_daily_coins".localized + return label + }() + + override init(frame: CGRect) { + super.init(frame: frame) + + addSubview(bgImageView) + addSubview(textBgImageView) + textBgImageView.addSubview(textLabel) + + bgImageView.snp.makeConstraints { make in + make.left.right.top.equalToSuperview() + } + + textBgImageView.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.bottom.equalToSuperview() + make.top.equalToSuperview().offset(50) + } + + textLabel.snp.makeConstraints { make in + make.centerY.equalToSuperview() + make.centerX.equalToSuperview() + } + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} diff --git a/SynthReel/Class/Home/V/SRHomeHeaderView.swift b/SynthReel/Class/Home/V/SRHomeHeaderView.swift index c4a72f0..b0d16c1 100644 --- a/SynthReel/Class/Home/V/SRHomeHeaderView.swift +++ b/SynthReel/Class/Home/V/SRHomeHeaderView.swift @@ -2,7 +2,7 @@ // SRHomeHeaderView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/15. +// Created by 澜声世纪 on 2025/11/15. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeHistoryBottomView.swift b/SynthReel/Class/Home/V/SRHomeHistoryBottomView.swift index 539bc47..996da19 100644 --- a/SynthReel/Class/Home/V/SRHomeHistoryBottomView.swift +++ b/SynthReel/Class/Home/V/SRHomeHistoryBottomView.swift @@ -2,7 +2,7 @@ // SRHomeHistoryBottomView.swift // SynthReel // -// Created by CSGY on 2025/11/27. +// Created by 澜声世纪 on 2025/11/27. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeHotView.swift b/SynthReel/Class/Home/V/SRHomeHotView.swift index e0e6479..19e3aaf 100644 --- a/SynthReel/Class/Home/V/SRHomeHotView.swift +++ b/SynthReel/Class/Home/V/SRHomeHotView.swift @@ -2,7 +2,7 @@ // SRHomeHotView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/17. +// Created by 澜声世纪 on 2025/11/17. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeMenuCell.swift b/SynthReel/Class/Home/V/SRHomeMenuCell.swift index d052887..e683404 100644 --- a/SynthReel/Class/Home/V/SRHomeMenuCell.swift +++ b/SynthReel/Class/Home/V/SRHomeMenuCell.swift @@ -2,7 +2,7 @@ // SRHomeMenuCell.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/14. +// Created by 澜声世纪 on 2025/11/14. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeModuleView.swift b/SynthReel/Class/Home/V/SRHomeModuleView.swift index 274bca8..6a73e94 100644 --- a/SynthReel/Class/Home/V/SRHomeModuleView.swift +++ b/SynthReel/Class/Home/V/SRHomeModuleView.swift @@ -2,7 +2,7 @@ // SRHomeModuleView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/15. +// Created by 澜声世纪 on 2025/11/15. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomePremiereNowView.swift b/SynthReel/Class/Home/V/SRHomePremiereNowView.swift index f6942aa..c73f722 100644 --- a/SynthReel/Class/Home/V/SRHomePremiereNowView.swift +++ b/SynthReel/Class/Home/V/SRHomePremiereNowView.swift @@ -2,7 +2,7 @@ // SRHomePremiereNowView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/17. +// Created by 澜声世纪 on 2025/11/17. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeTopChartsContentView.swift b/SynthReel/Class/Home/V/SRHomeTopChartsContentView.swift index 229831e..3df91d2 100644 --- a/SynthReel/Class/Home/V/SRHomeTopChartsContentView.swift +++ b/SynthReel/Class/Home/V/SRHomeTopChartsContentView.swift @@ -2,7 +2,7 @@ // SRHomeTopChartsContentView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/17. +// Created by 澜声世纪 on 2025/11/17. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeTopChartsView.swift b/SynthReel/Class/Home/V/SRHomeTopChartsView.swift index 5e675de..4f89cdd 100644 --- a/SynthReel/Class/Home/V/SRHomeTopChartsView.swift +++ b/SynthReel/Class/Home/V/SRHomeTopChartsView.swift @@ -2,7 +2,7 @@ // SRHomeTopChartsView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/17. +// Created by 澜声世纪 on 2025/11/17. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeViralHitsCell.swift b/SynthReel/Class/Home/V/SRHomeViralHitsCell.swift index ea1ad2e..85909fb 100644 --- a/SynthReel/Class/Home/V/SRHomeViralHitsCell.swift +++ b/SynthReel/Class/Home/V/SRHomeViralHitsCell.swift @@ -2,7 +2,7 @@ // SRHomeViralHitsCell.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/17. +// Created by 澜声世纪 on 2025/11/17. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeViralHitsView.swift b/SynthReel/Class/Home/V/SRHomeViralHitsView.swift index c6e276c..5bad68d 100644 --- a/SynthReel/Class/Home/V/SRHomeViralHitsView.swift +++ b/SynthReel/Class/Home/V/SRHomeViralHitsView.swift @@ -2,7 +2,7 @@ // SRHomeViralHitsView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/17. +// Created by 澜声世纪 on 2025/11/17. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeYouLikeCell.swift b/SynthReel/Class/Home/V/SRHomeYouLikeCell.swift index 2ca2866..895752b 100644 --- a/SynthReel/Class/Home/V/SRHomeYouLikeCell.swift +++ b/SynthReel/Class/Home/V/SRHomeYouLikeCell.swift @@ -2,7 +2,7 @@ // SRHomeYouLikeCell.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/15. +// Created by 澜声世纪 on 2025/11/15. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHomeYouLikeView.swift b/SynthReel/Class/Home/V/SRHomeYouLikeView.swift index 33d894a..afe363b 100644 --- a/SynthReel/Class/Home/V/SRHomeYouLikeView.swift +++ b/SynthReel/Class/Home/V/SRHomeYouLikeView.swift @@ -2,7 +2,7 @@ // SRHomeYouLikeView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/15. +// Created by 澜声世纪 on 2025/11/15. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHotSearchCell.swift b/SynthReel/Class/Home/V/SRHotSearchCell.swift index 28713bf..1fbed68 100644 --- a/SynthReel/Class/Home/V/SRHotSearchCell.swift +++ b/SynthReel/Class/Home/V/SRHotSearchCell.swift @@ -2,7 +2,7 @@ // SRHotSearchCell.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRHotSearchView.swift b/SynthReel/Class/Home/V/SRHotSearchView.swift index 127a01c..3d83690 100644 --- a/SynthReel/Class/Home/V/SRHotSearchView.swift +++ b/SynthReel/Class/Home/V/SRHotSearchView.swift @@ -2,7 +2,7 @@ // SRHotSearchView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRSearchHomeView.swift b/SynthReel/Class/Home/V/SRSearchHomeView.swift index 9949bbe..c4eb949 100644 --- a/SynthReel/Class/Home/V/SRSearchHomeView.swift +++ b/SynthReel/Class/Home/V/SRSearchHomeView.swift @@ -2,7 +2,7 @@ // SRSearchHomeView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRSearchRecordCell.swift b/SynthReel/Class/Home/V/SRSearchRecordCell.swift index 2da3169..064cf6c 100644 --- a/SynthReel/Class/Home/V/SRSearchRecordCell.swift +++ b/SynthReel/Class/Home/V/SRSearchRecordCell.swift @@ -2,7 +2,7 @@ // SRSearchRecordCell.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRSearchRecordView.swift b/SynthReel/Class/Home/V/SRSearchRecordView.swift index b48cd4b..7a52d29 100644 --- a/SynthReel/Class/Home/V/SRSearchRecordView.swift +++ b/SynthReel/Class/Home/V/SRSearchRecordView.swift @@ -2,7 +2,7 @@ // SRSearchRecordView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRSearchResultCell.swift b/SynthReel/Class/Home/V/SRSearchResultCell.swift index 6278326..b8eea24 100644 --- a/SynthReel/Class/Home/V/SRSearchResultCell.swift +++ b/SynthReel/Class/Home/V/SRSearchResultCell.swift @@ -2,7 +2,7 @@ // SRSearchResultCell.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRSearchResultView.swift b/SynthReel/Class/Home/V/SRSearchResultView.swift index b53cbf7..c894fe5 100644 --- a/SynthReel/Class/Home/V/SRSearchResultView.swift +++ b/SynthReel/Class/Home/V/SRSearchResultView.swift @@ -2,7 +2,7 @@ // SRSearchResultView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRSearchTextView.swift b/SynthReel/Class/Home/V/SRSearchTextView.swift index c85262d..5ff56a3 100644 --- a/SynthReel/Class/Home/V/SRSearchTextView.swift +++ b/SynthReel/Class/Home/V/SRSearchTextView.swift @@ -2,7 +2,7 @@ // SRSearchTextView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRTopChartsCell.swift b/SynthReel/Class/Home/V/SRTopChartsCell.swift index 0948807..06ed89e 100644 --- a/SynthReel/Class/Home/V/SRTopChartsCell.swift +++ b/SynthReel/Class/Home/V/SRTopChartsCell.swift @@ -2,7 +2,7 @@ // SRTopChartsCell.swift // SynthReel // -// Created by CSGY on 2025/11/25. +// Created by 澜声世纪 on 2025/11/25. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRTopChartsHeaderView.swift b/SynthReel/Class/Home/V/SRTopChartsHeaderView.swift index 9a468d3..fcbbb43 100644 --- a/SynthReel/Class/Home/V/SRTopChartsHeaderView.swift +++ b/SynthReel/Class/Home/V/SRTopChartsHeaderView.swift @@ -2,7 +2,7 @@ // SRTopChartsHeaderView.swift // SynthReel // -// Created by CSGY on 2025/11/26. +// Created by 澜声世纪 on 2025/11/26. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/V/SRViralHitCell.swift b/SynthReel/Class/Home/V/SRViralHitCell.swift index e2b8e6b..5a6a592 100644 --- a/SynthReel/Class/Home/V/SRViralHitCell.swift +++ b/SynthReel/Class/Home/V/SRViralHitCell.swift @@ -2,7 +2,7 @@ // SRViralHitCell.swift // SynthReel // -// Created by CSGY on 2025/11/25. +// Created by 澜声世纪 on 2025/11/25. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/VC/SRHomeChildViewController.swift b/SynthReel/Class/Home/VC/SRHomeChildViewController.swift index 83984bd..962a85f 100644 --- a/SynthReel/Class/Home/VC/SRHomeChildViewController.swift +++ b/SynthReel/Class/Home/VC/SRHomeChildViewController.swift @@ -2,7 +2,7 @@ // SRHomeChildViewController.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/14. +// Created by 澜声世纪 on 2025/11/14. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/VC/SRHomeViewController.swift b/SynthReel/Class/Home/VC/SRHomeViewController.swift index 40c0d06..59b3e97 100644 --- a/SynthReel/Class/Home/VC/SRHomeViewController.swift +++ b/SynthReel/Class/Home/VC/SRHomeViewController.swift @@ -2,7 +2,7 @@ // SRHomeViewController.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/13. +// Created by 澜声世纪 on 2025/11/13. // Copyright © 2025 SR. All rights reserved. // @@ -117,6 +117,18 @@ class SRHomeViewController: SRViewController { return view }() + + private lazy var coinPackButton: SRHomeCoinsPackButton = { + let view = SRHomeCoinsPackButton() + view.addAction(UIAction(handler: { [weak self] _ in + guard let self = self else { return } + let vc = SRCoinPackController() + self.navigationController?.pushViewController(vc, animated: true) + + }), for: .touchUpInside) + return view + }() + deinit { srPrint(message: "销毁") } @@ -124,10 +136,11 @@ class SRHomeViewController: SRViewController { override func viewDidLoad() { super.viewDidLoad() sr_setupUI() - print("authorization =", SRAccountManager.manager.token?.token ?? "") + print("authorization =", SRLogin.manager.token?.token ?? "") Task { await requestModuleList() + requestCoinsPackData() } } @@ -163,7 +176,7 @@ extension SRHomeViewController { moreButton.addSubview(moreTitleLabel) view.addSubview(playHistoryView) // moreButton.addSubview(moreIconImageView) - + view.addSubview(coinPackButton) menuView.listContainer = pageView.listContainerView searchButton.snp.makeConstraints { make in @@ -215,6 +228,11 @@ extension SRHomeViewController { // make.centerY.equalToSuperview() // make.right.equalToSuperview() // } + + coinPackButton.snp.makeConstraints { make in + make.right.equalToSuperview().offset(-2) + make.bottom.equalTo(playHistoryView.snp.top).offset(-100) + } } } @@ -300,5 +318,23 @@ extension SRHomeViewController { self.playHistoryView.isHidden = true } } + + func requestCoinsPackData() { + Task { + let model = await SRStoreAPI.requestCoinBagCanReceiveInfo() + guard let model = model else { return } + let coins = model.coins ?? 0 + if coins > 0 { + let view = SRCoinsPackAlert() + view.coinsCount = coins + view.show(in: self.view) + view.claimButtonClick = { [weak self] in + let vc = SRCoinPackController() + self?.navigationController?.pushViewController(vc, animated: true) + } + } + } + + } } diff --git a/SynthReel/Class/Home/VC/SRSearchViewController.swift b/SynthReel/Class/Home/VC/SRSearchViewController.swift index cf877cc..6244a11 100644 --- a/SynthReel/Class/Home/VC/SRSearchViewController.swift +++ b/SynthReel/Class/Home/VC/SRSearchViewController.swift @@ -2,7 +2,7 @@ // SRSearchViewController.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/VC/SRTopChartsViewController.swift b/SynthReel/Class/Home/VC/SRTopChartsViewController.swift index 48f2d51..71098c9 100644 --- a/SynthReel/Class/Home/VC/SRTopChartsViewController.swift +++ b/SynthReel/Class/Home/VC/SRTopChartsViewController.swift @@ -2,7 +2,7 @@ // SRTopChartsViewController.swift // SynthReel // -// Created by CSGY on 2025/11/25. +// Created by 澜声世纪 on 2025/11/25. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/VC/SRViralHitController.swift b/SynthReel/Class/Home/VC/SRViralHitController.swift index e81a7a9..697656b 100644 --- a/SynthReel/Class/Home/VC/SRViralHitController.swift +++ b/SynthReel/Class/Home/VC/SRViralHitController.swift @@ -2,7 +2,7 @@ // SRViralHitController.swift // SynthReel // -// Created by CSGY on 2025/11/25. +// Created by 澜声世纪 on 2025/11/25. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/VM/SRHomeMenuDataSource.swift b/SynthReel/Class/Home/VM/SRHomeMenuDataSource.swift index 51bb545..a42b403 100644 --- a/SynthReel/Class/Home/VM/SRHomeMenuDataSource.swift +++ b/SynthReel/Class/Home/VM/SRHomeMenuDataSource.swift @@ -2,7 +2,7 @@ // SRHomeMenuDataSource.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/14. +// Created by 澜声世纪 on 2025/11/14. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/VM/SRHomeViewModel.swift b/SynthReel/Class/Home/VM/SRHomeViewModel.swift index 00307c1..1d8a8bd 100644 --- a/SynthReel/Class/Home/VM/SRHomeViewModel.swift +++ b/SynthReel/Class/Home/VM/SRHomeViewModel.swift @@ -2,7 +2,7 @@ // SRHomeViewModel.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/14. +// Created by 澜声世纪 on 2025/11/14. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Home/VM/SRSearchViewModel.swift b/SynthReel/Class/Home/VM/SRSearchViewModel.swift index 68b837a..9f5e4e7 100644 --- a/SynthReel/Class/Home/VM/SRSearchViewModel.swift +++ b/SynthReel/Class/Home/VM/SRSearchViewModel.swift @@ -2,7 +2,7 @@ // SRSearchViewModel.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Login/VC/SRLoginController.swift b/SynthReel/Class/Login/VC/SRLoginController.swift index e5f3a7f..faf8d54 100644 --- a/SynthReel/Class/Login/VC/SRLoginController.swift +++ b/SynthReel/Class/Login/VC/SRLoginController.swift @@ -2,7 +2,7 @@ // SRLoginController.swift // SynthReel // -// Created by CSGY on 2025/11/29. +// Created by 澜声世纪 on 2025/11/29. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/MyShort/V/SRFavoritesCell.swift b/SynthReel/Class/MyShort/V/SRFavoritesCell.swift index 7a821db..3c6560f 100644 --- a/SynthReel/Class/MyShort/V/SRFavoritesCell.swift +++ b/SynthReel/Class/MyShort/V/SRFavoritesCell.swift @@ -2,7 +2,7 @@ // SRFavoritesCell.swift // SynthReel // -// Created by CSGY on 2025/11/24. +// Created by 澜声世纪 on 2025/11/24. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/MyShort/V/SRHistoryCell.swift b/SynthReel/Class/MyShort/V/SRHistoryCell.swift index b973ed7..c8a174c 100644 --- a/SynthReel/Class/MyShort/V/SRHistoryCell.swift +++ b/SynthReel/Class/MyShort/V/SRHistoryCell.swift @@ -2,7 +2,7 @@ // SRHistoryCell.swift // SynthReel // -// Created by CSGY on 2025/11/24. +// Created by 澜声世纪 on 2025/11/24. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/MyShort/V/SRListMenuCell.swift b/SynthReel/Class/MyShort/V/SRListMenuCell.swift index 6f4692b..09414d5 100644 --- a/SynthReel/Class/MyShort/V/SRListMenuCell.swift +++ b/SynthReel/Class/MyShort/V/SRListMenuCell.swift @@ -2,7 +2,7 @@ // SRListMenuCell.swift // SynthReel // -// Created by CSGY on 2025/11/24. +// Created by 澜声世纪 on 2025/11/24. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/MyShort/V/SRShortHeaderView.swift b/SynthReel/Class/MyShort/V/SRShortHeaderView.swift index f5c338a..0f45a64 100644 --- a/SynthReel/Class/MyShort/V/SRShortHeaderView.swift +++ b/SynthReel/Class/MyShort/V/SRShortHeaderView.swift @@ -2,7 +2,7 @@ // SRShortHeaderView.swift // SynthReel // -// Created by CSGY on 2025/11/20. +// Created by 澜声世纪 on 2025/11/20. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/MyShort/VC/SRFavoritesViewController.swift b/SynthReel/Class/MyShort/VC/SRFavoritesViewController.swift index 9feb099..e22bb8e 100644 --- a/SynthReel/Class/MyShort/VC/SRFavoritesViewController.swift +++ b/SynthReel/Class/MyShort/VC/SRFavoritesViewController.swift @@ -2,7 +2,7 @@ // SRFavoritesViewController.swift // SynthReel // -// Created by CSGY on 2025/11/21. +// Created by 澜声世纪 on 2025/11/21. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/MyShort/VC/SRHistoryViewController.swift b/SynthReel/Class/MyShort/VC/SRHistoryViewController.swift index af40622..2f9e7b8 100644 --- a/SynthReel/Class/MyShort/VC/SRHistoryViewController.swift +++ b/SynthReel/Class/MyShort/VC/SRHistoryViewController.swift @@ -2,7 +2,7 @@ // SRHistoryViewController.swift // SynthReel // -// Created by CSGY on 2025/11/21. +// Created by 澜声世纪 on 2025/11/21. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/MyShort/VC/SRMyShortViewController.swift b/SynthReel/Class/MyShort/VC/SRMyShortViewController.swift index 582ed05..89a0fa4 100644 --- a/SynthReel/Class/MyShort/VC/SRMyShortViewController.swift +++ b/SynthReel/Class/MyShort/VC/SRMyShortViewController.swift @@ -2,7 +2,7 @@ // SRMyShortViewController.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/20. +// Created by 澜声世纪 on 2025/11/20. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/MyShort/VM/SRListMenuDataSource.swift b/SynthReel/Class/MyShort/VM/SRListMenuDataSource.swift index 43681ad..1810e45 100644 --- a/SynthReel/Class/MyShort/VM/SRListMenuDataSource.swift +++ b/SynthReel/Class/MyShort/VM/SRListMenuDataSource.swift @@ -2,7 +2,7 @@ // SRListMenuDataSource.swift // SynthReel // -// Created by CSGY on 2025/11/24. +// Created by 澜声世纪 on 2025/11/24. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/M/SRShortDetailModel.swift b/SynthReel/Class/Player/M/SRShortDetailModel.swift index 25a3606..f998962 100644 --- a/SynthReel/Class/Player/M/SRShortDetailModel.swift +++ b/SynthReel/Class/Player/M/SRShortDetailModel.swift @@ -2,7 +2,7 @@ // SRShortDetailModel.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/M/SRShortModel.swift b/SynthReel/Class/Player/M/SRShortModel.swift index 868cdcd..3d56b64 100644 --- a/SynthReel/Class/Player/M/SRShortModel.swift +++ b/SynthReel/Class/Player/M/SRShortModel.swift @@ -2,7 +2,7 @@ // SRShortModel.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/14. +// Created by 澜声世纪 on 2025/11/14. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/M/SRVideoUnlockResult.swift b/SynthReel/Class/Player/M/SRVideoUnlockResult.swift index a9850c3..70b40a7 100644 --- a/SynthReel/Class/Player/M/SRVideoUnlockResult.swift +++ b/SynthReel/Class/Player/M/SRVideoUnlockResult.swift @@ -2,7 +2,7 @@ // SRVideoUnlockResult.swift // SynthReel // -// Created by CSGY on 2025/12/1. +// Created by 澜声世纪 on 2025/12/1. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/V/SRDetailRecommendCell.swift b/SynthReel/Class/Player/V/SRDetailRecommendCell.swift index 4fdd924..56ff099 100644 --- a/SynthReel/Class/Player/V/SRDetailRecommendCell.swift +++ b/SynthReel/Class/Player/V/SRDetailRecommendCell.swift @@ -2,7 +2,7 @@ // SRDetailRecommendCell.swift // SynthReel // -// Created by CSGY on 2025/11/27. +// Created by 澜声世纪 on 2025/11/27. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/V/SRDetailRecommendview.swift b/SynthReel/Class/Player/V/SRDetailRecommendview.swift index 31eac76..f8a292b 100644 --- a/SynthReel/Class/Player/V/SRDetailRecommendview.swift +++ b/SynthReel/Class/Player/V/SRDetailRecommendview.swift @@ -2,7 +2,7 @@ // SRDetailRecommendview.swift // SynthReel // -// Created by CSGY on 2025/11/27. +// Created by 澜声世纪 on 2025/11/27. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/V/SREpSelectorCell.swift b/SynthReel/Class/Player/V/SREpSelectorCell.swift index bb17e5f..2b90c71 100644 --- a/SynthReel/Class/Player/V/SREpSelectorCell.swift +++ b/SynthReel/Class/Player/V/SREpSelectorCell.swift @@ -2,7 +2,7 @@ // SREpSelectorCell.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/19. +// Created by 澜声世纪 on 2025/11/19. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/V/SREpSelectorView.swift b/SynthReel/Class/Player/V/SREpSelectorView.swift index 5ca7123..a0bb56c 100644 --- a/SynthReel/Class/Player/V/SREpSelectorView.swift +++ b/SynthReel/Class/Player/V/SREpSelectorView.swift @@ -2,7 +2,7 @@ // SREpSelectorView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/V/SRProgressView.swift b/SynthReel/Class/Player/V/SRProgressView.swift index 6e9976b..fd87395 100644 --- a/SynthReel/Class/Player/V/SRProgressView.swift +++ b/SynthReel/Class/Player/V/SRProgressView.swift @@ -2,7 +2,7 @@ // SRProgressView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/V/SRRecommendPlayerCell.swift b/SynthReel/Class/Player/V/SRRecommendPlayerCell.swift index 3b77847..5f85de8 100644 --- a/SynthReel/Class/Player/V/SRRecommendPlayerCell.swift +++ b/SynthReel/Class/Player/V/SRRecommendPlayerCell.swift @@ -2,7 +2,7 @@ // SRRecommendPlayerCell.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/20. +// Created by 澜声世纪 on 2025/11/20. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/V/SRRecommendPlayerControlView.swift b/SynthReel/Class/Player/V/SRRecommendPlayerControlView.swift index 3eec91e..55ae5ca 100644 --- a/SynthReel/Class/Player/V/SRRecommendPlayerControlView.swift +++ b/SynthReel/Class/Player/V/SRRecommendPlayerControlView.swift @@ -2,7 +2,7 @@ // SRRecommendPlayerControlView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/20. +// Created by 澜声世纪 on 2025/11/20. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/V/SRShortDetailControlView.swift b/SynthReel/Class/Player/V/SRShortDetailControlView.swift index d2f0f9b..4543a3f 100644 --- a/SynthReel/Class/Player/V/SRShortDetailControlView.swift +++ b/SynthReel/Class/Player/V/SRShortDetailControlView.swift @@ -2,7 +2,7 @@ // SRShortDetailControlView.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/V/SRShortDetailPlayerCell.swift b/SynthReel/Class/Player/V/SRShortDetailPlayerCell.swift index c9e553e..a4a1d51 100644 --- a/SynthReel/Class/Player/V/SRShortDetailPlayerCell.swift +++ b/SynthReel/Class/Player/V/SRShortDetailPlayerCell.swift @@ -2,7 +2,7 @@ // SRShortDetailPlayerCell.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/V/SRVideoLockView.swift b/SynthReel/Class/Player/V/SRVideoLockView.swift index c90f6d2..83a48e8 100644 --- a/SynthReel/Class/Player/V/SRVideoLockView.swift +++ b/SynthReel/Class/Player/V/SRVideoLockView.swift @@ -2,7 +2,7 @@ // SRVideoLockView.swift // SynthReel // -// Created by CSGY on 2025/12/1. +// Created by 澜声世纪 on 2025/12/1. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/V/SRVideoRechargeView.swift b/SynthReel/Class/Player/V/SRVideoRechargeView.swift index 9730eb9..de31484 100644 --- a/SynthReel/Class/Player/V/SRVideoRechargeView.swift +++ b/SynthReel/Class/Player/V/SRVideoRechargeView.swift @@ -2,7 +2,7 @@ // SRVideoRechargeView.swift // SynthReel // -// Created by CSGY on 2025/12/5. +// Created by 澜声世纪 on 2025/12/5. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/V/SRVipRetainAlert.swift b/SynthReel/Class/Player/V/SRVipRetainAlert.swift index bb4dd67..7da3498 100644 --- a/SynthReel/Class/Player/V/SRVipRetainAlert.swift +++ b/SynthReel/Class/Player/V/SRVipRetainAlert.swift @@ -28,8 +28,8 @@ class SRVipRetainAlert: SRBaseAlert { label.font = .font(ofSize: 24, weight: .init(900)) label.text = "synthreel_weekly_refill".localized.uppercased() label.textColors = [UIColor._4_CFFD_4.cgColor,UIColor.white.cgColor, UIColor._51_D_4_FF.cgColor] - label.textStartPoint = .init(x: 0.5, y: 0) - label.textEndPoint = .init(x: 0.5, y: 1) + label.textStartPoint = .init(x: 0, y: 0.5) + label.textEndPoint = .init(x: 1, y: 0.5) return label }() @@ -56,7 +56,7 @@ class SRVipRetainAlert: SRBaseAlert { guard let self = self else { return } if finish { Task { - await SRAccountManager.manager.updateUserInfo() + await SRLogin.manager.requestUserInfo(completer: nil) self.dismiss() self.buyFinishHandle?() } @@ -76,7 +76,6 @@ class SRVipRetainAlert: SRBaseAlert { super.init(frame: frame) contentWidth = UIScreen.width - 55 contentView.backgroundColor = .clear - closeButton.isHidden = false fa_setupLayout() } @@ -115,7 +114,7 @@ extension SRVipRetainAlert { make.centerX.equalToSuperview() make.top.equalTo(textLabel.snp.bottom).offset(12) make.height.equalTo(50) -// make.bottom.equalToSuperview() + make.bottom.equalToSuperview() } } diff --git a/SynthReel/Class/Player/VC/SRDetailPlayerViewController.swift b/SynthReel/Class/Player/VC/SRDetailPlayerViewController.swift index 4382948..48330ca 100644 --- a/SynthReel/Class/Player/VC/SRDetailPlayerViewController.swift +++ b/SynthReel/Class/Player/VC/SRDetailPlayerViewController.swift @@ -2,7 +2,7 @@ // SRDetailPlayerViewController.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/17. +// Created by 澜声世纪 on 2025/11/17. // Copyright © 2025 SR. All rights reserved. // @@ -79,7 +79,7 @@ class SRDetailPlayerViewController: JXPlayerListViewController { return } self.pause() - let myCoins = SRAccountManager.manager.userInfo?.totalCoins ?? 0 + let myCoins = SRLogin.manager.userInfo?.totalCoins ?? 0 let lockCoins = videoInfo?.coins ?? 0 if myCoins < lockCoins, (self.sr_viewModel.currentCell as? SRShortDetailPlayerCell)?.hasLastEpisodeUnlocked != true { diff --git a/SynthReel/Class/Player/VC/SRRecommendPlayerViewController.swift b/SynthReel/Class/Player/VC/SRRecommendPlayerViewController.swift index fe88aab..77840ff 100644 --- a/SynthReel/Class/Player/VC/SRRecommendPlayerViewController.swift +++ b/SynthReel/Class/Player/VC/SRRecommendPlayerViewController.swift @@ -2,7 +2,7 @@ // SRRecommendPlayerViewController.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/20. +// Created by 澜声世纪 on 2025/11/20. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/VM/SRRecommendPlayerViewModel.swift b/SynthReel/Class/Player/VM/SRRecommendPlayerViewModel.swift index 3a1f449..61e4e11 100644 --- a/SynthReel/Class/Player/VM/SRRecommendPlayerViewModel.swift +++ b/SynthReel/Class/Player/VM/SRRecommendPlayerViewModel.swift @@ -2,7 +2,7 @@ // SRRecommendPlayerViewModel.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/20. +// Created by 澜声世纪 on 2025/11/20. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Player/VM/SRShortPlayerViewModel.swift b/SynthReel/Class/Player/VM/SRShortPlayerViewModel.swift index c8ad3e7..06944e1 100644 --- a/SynthReel/Class/Player/VM/SRShortPlayerViewModel.swift +++ b/SynthReel/Class/Player/VM/SRShortPlayerViewModel.swift @@ -2,7 +2,7 @@ // SRShortPlayerViewModel.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/18. +// Created by 澜声世纪 on 2025/11/18. // Copyright © 2025 SR. All rights reserved. // @@ -98,7 +98,7 @@ class SRShortPlayerViewModel: JXPlayerListViewModel { if model.status == .success { Task { - await SRAccountManager.manager.updateUserInfo() + await SRLogin.manager.requestUserInfo(completer: nil) videoInfo.is_lock = false completer?(true) } diff --git a/SynthReel/Class/Store/Model/SRIapVerifyModel.swift b/SynthReel/Class/Store/Model/SRIapVerifyModel.swift index 57faacf..e25583c 100644 --- a/SynthReel/Class/Store/Model/SRIapVerifyModel.swift +++ b/SynthReel/Class/Store/Model/SRIapVerifyModel.swift @@ -2,7 +2,7 @@ // SRIapVerifyModel.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Store/Model/SRPayAlertModel.swift b/SynthReel/Class/Store/Model/SRPayAlertModel.swift index 7d2b2ee..89f2ac2 100644 --- a/SynthReel/Class/Store/Model/SRPayAlertModel.swift +++ b/SynthReel/Class/Store/Model/SRPayAlertModel.swift @@ -2,7 +2,7 @@ // SRPayAlertModel.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Store/Model/SRPayDateModel.swift b/SynthReel/Class/Store/Model/SRPayDateModel.swift index d8abe2d..a7533c5 100644 --- a/SynthReel/Class/Store/Model/SRPayDateModel.swift +++ b/SynthReel/Class/Store/Model/SRPayDateModel.swift @@ -2,7 +2,7 @@ // SRPayDateModel.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Store/VC/SRStoreController.swift b/SynthReel/Class/Store/VC/SRStoreController.swift index 9c60e56..706a1cf 100644 --- a/SynthReel/Class/Store/VC/SRStoreController.swift +++ b/SynthReel/Class/Store/VC/SRStoreController.swift @@ -2,7 +2,7 @@ // SRStoreController.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // @@ -99,7 +99,7 @@ class SRStoreController: SRViewController { SRIapManager.manager.restore(isLoding: false) { [weak self] isFinish, buyType in if isFinish { Task{ - await SRAccountManager.manager.updateUserInfo() + await SRLogin.manager.requestUserInfo(completer: nil) self?.buyFinish() } } @@ -120,7 +120,7 @@ class SRStoreController: SRViewController { SRIapManager.manager.restore { [weak self] isFinish, buyType in if isFinish { Task{ - await SRAccountManager.manager.updateUserInfo() + await SRLogin.manager.requestUserInfo(completer: nil) self?.buyFinish() } } diff --git a/SynthReel/Class/Store/Views/SRBigCoinViewCell.swift b/SynthReel/Class/Store/Views/SRBigCoinViewCell.swift index 066bd5d..cfef7aa 100644 --- a/SynthReel/Class/Store/Views/SRBigCoinViewCell.swift +++ b/SynthReel/Class/Store/Views/SRBigCoinViewCell.swift @@ -2,7 +2,7 @@ // SRBigCoinViewCell.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Store/Views/SRPackCoinViewCell.swift b/SynthReel/Class/Store/Views/SRPackCoinViewCell.swift index ae749de..0dc2b0c 100644 --- a/SynthReel/Class/Store/Views/SRPackCoinViewCell.swift +++ b/SynthReel/Class/Store/Views/SRPackCoinViewCell.swift @@ -2,7 +2,7 @@ // SRPackCoinViewCell.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Store/Views/SRSmallCoinViewCell.swift b/SynthReel/Class/Store/Views/SRSmallCoinViewCell.swift index d9ff645..fd5e507 100644 --- a/SynthReel/Class/Store/Views/SRSmallCoinViewCell.swift +++ b/SynthReel/Class/Store/Views/SRSmallCoinViewCell.swift @@ -2,7 +2,7 @@ // SRSmallCoinViewCell.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Store/Views/SRStoreCoinsCell.swift b/SynthReel/Class/Store/Views/SRStoreCoinsCell.swift index a453046..7100afa 100644 --- a/SynthReel/Class/Store/Views/SRStoreCoinsCell.swift +++ b/SynthReel/Class/Store/Views/SRStoreCoinsCell.swift @@ -2,7 +2,7 @@ // SRStoreCoinsCell.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Store/Views/SRStoreCoinsView.swift b/SynthReel/Class/Store/Views/SRStoreCoinsView.swift index 967bec0..0ecb7bf 100644 --- a/SynthReel/Class/Store/Views/SRStoreCoinsView.swift +++ b/SynthReel/Class/Store/Views/SRStoreCoinsView.swift @@ -2,7 +2,7 @@ // SRStoreCoinsView.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // @@ -210,7 +210,7 @@ extension SRStoreCoinsView: UICollectionViewDelegate, UICollectionViewDataSource view.buyFinishHandle = { [weak self] in guard let self = self else { return } Task { - await SRAccountManager.manager.updateUserInfo() + await SRLogin.manager.requestUserInfo(completer: nil) self.buyFinishHandle?() } } @@ -220,7 +220,7 @@ extension SRStoreCoinsView: UICollectionViewDelegate, UICollectionViewDataSource guard let self = self else { return } if finish { Task { - await SRAccountManager.manager.updateUserInfo() + await SRLogin.manager.requestUserInfo(completer: nil) self.buyFinishHandle?() } diff --git a/SynthReel/Class/Store/Views/SRStoreVipCell.swift b/SynthReel/Class/Store/Views/SRStoreVipCell.swift index f916a95..7890da1 100644 --- a/SynthReel/Class/Store/Views/SRStoreVipCell.swift +++ b/SynthReel/Class/Store/Views/SRStoreVipCell.swift @@ -2,7 +2,7 @@ // SRStoreVipCell.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/Store/Views/SRStoreVipView.swift b/SynthReel/Class/Store/Views/SRStoreVipView.swift index 1af557f..1390b51 100644 --- a/SynthReel/Class/Store/Views/SRStoreVipView.swift +++ b/SynthReel/Class/Store/Views/SRStoreVipView.swift @@ -2,7 +2,7 @@ // SRStoreVipView.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // @@ -124,7 +124,7 @@ extension SRStoreVipView: UICollectionViewDelegate, UICollectionViewDataSource { guard let self = self else { return } if finish { Task { - await SRAccountManager.manager.updateUserInfo() + await SRLogin.manager.requestUserInfo(completer: nil) self.buyFinishHandle?() } } diff --git a/SynthReel/Class/User/VC/SRAboutUsController.swift b/SynthReel/Class/User/VC/SRAboutUsController.swift index 4faade7..fc575dc 100644 --- a/SynthReel/Class/User/VC/SRAboutUsController.swift +++ b/SynthReel/Class/User/VC/SRAboutUsController.swift @@ -2,7 +2,7 @@ // SRAboutUsController.swift // SynthReel // -// Created by CSGY on 2025/11/25. +// Created by 澜声世纪 on 2025/11/25. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/User/VC/SRFeedBackController.swift b/SynthReel/Class/User/VC/SRFeedBackController.swift index b74a835..20fc0ec 100644 --- a/SynthReel/Class/User/VC/SRFeedBackController.swift +++ b/SynthReel/Class/User/VC/SRFeedBackController.swift @@ -2,7 +2,7 @@ // SRFeedBackController.swift // SynthReel // -// Created by CSGY on 2025/11/28. +// Created by 澜声世纪 on 2025/11/28. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/User/VC/SRHelpCenterController.swift b/SynthReel/Class/User/VC/SRHelpCenterController.swift index 54c7e6c..c45d10b 100644 --- a/SynthReel/Class/User/VC/SRHelpCenterController.swift +++ b/SynthReel/Class/User/VC/SRHelpCenterController.swift @@ -2,7 +2,7 @@ // SRHelpCenterController.swift // SynthReel // -// Created by CSGY on 2025/11/25. +// Created by 澜声世纪 on 2025/11/25. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/User/VC/SRPrivacyController.swift b/SynthReel/Class/User/VC/SRPrivacyController.swift index 81e0ec5..5cc5d72 100644 --- a/SynthReel/Class/User/VC/SRPrivacyController.swift +++ b/SynthReel/Class/User/VC/SRPrivacyController.swift @@ -2,7 +2,7 @@ // SRPrivacyController.swift // SynthReel // -// Created by CSGY on 2025/11/25. +// Created by 澜声世纪 on 2025/11/25. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/User/VC/SRRewardController.swift b/SynthReel/Class/User/VC/SRRewardController.swift index 83a3463..1aaba06 100644 --- a/SynthReel/Class/User/VC/SRRewardController.swift +++ b/SynthReel/Class/User/VC/SRRewardController.swift @@ -2,7 +2,7 @@ // SRRewardController.swift // SynthReel // -// Created by CSGY on 2025/11/28. +// Created by 澜声世纪 on 2025/11/28. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/User/VC/SRUserListViewController.swift b/SynthReel/Class/User/VC/SRUserListViewController.swift index c96f5ad..ac30b4b 100644 --- a/SynthReel/Class/User/VC/SRUserListViewController.swift +++ b/SynthReel/Class/User/VC/SRUserListViewController.swift @@ -2,7 +2,7 @@ // SRUserListViewController.swift // SynthReel // -// Created by CSGY on 2025/12/02. +// Created by 澜声世纪 on 2025/12/02. // Copyright © 2025 SR. All rights reserved. // @@ -39,10 +39,12 @@ class SRUserListViewController: SRViewController { make.bottom.top.equalTo(self.tableView) make.left.right.equalToSuperview().inset(15) } - - setDataArr() } + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + setDataArr() + } // override func listScrollView() -> UIScrollView { // return self.tableView // } @@ -66,14 +68,18 @@ extension SRUserListViewController { } private func setDataArr() { - let arr = [ + var arr = [ SRUserSettingModel(type: .feedback, name: "synthreel_feedback".localized, icon: UIImage(named: "icon_feedback")), - SRUserSettingModel(type: .login, name: "synthreel_login".localized, icon: UIImage(named: "icon_login")), SRUserSettingModel(type: .deleteAccount, name: "synthreel_delet_account".localized, icon: UIImage(named: "icon_delet")), SRUserSettingModel(type: .about, name: "synthreel_about_us".localized, icon: UIImage(named: "icon_about")), SRUserSettingModel(type: .privacyPolicy, name: "synthreel_privacy_policy".localized, icon: UIImage(named: "icon_privacy")), - SRUserSettingModel(type: .userAgreement, name: "synthreel_user_agreement".localized, icon: UIImage(named: "icon_user")), + SRUserSettingModel(type: .userAgreement, name: "synthreel_user_agreement".localized, icon: UIImage(named: "icon_user")), ] + if SRLogin.manager.isLogin { + arr.insert(SRUserSettingModel(type: .logout, name: "synthreel_logout".localized, icon: UIImage(named: "icon_logout")), at: 1) + } else { + arr.insert(SRUserSettingModel(type: .login, name: "synthreel_login".localized, icon: UIImage(named: "icon_login")), at: 1) + } self.dataArr = arr self.tableView.reloadData() } @@ -107,6 +113,12 @@ extension SRUserListViewController: UITableViewDelegate, UITableViewDataSource { let loginview = SRUserLoginView() loginview.present(in: nil) break + case .logout: + logout() + break + case .deleteAccount: + deleteAccount() + break case .feedback: let vc = SRFeedBackController() self.navigationController?.pushViewController(vc, animated: true) @@ -124,4 +136,17 @@ extension SRUserListViewController: UITableViewDelegate, UITableViewDataSource { default: break } } + + func logout(){ + Task{ + await SRLogin.manager.logout(completer: nil) + } + } + + func deleteAccount() { + let vc = SRAppWebViewController() + vc.webUrl = kSRLogoutWebUrl + vc.theme = "theme_11" + self.navigationController?.pushViewController(vc, animated: true) + } } diff --git a/SynthReel/Class/User/VC/SRUserViewController.swift b/SynthReel/Class/User/VC/SRUserViewController.swift index f3c7b4c..a347c5b 100644 --- a/SynthReel/Class/User/VC/SRUserViewController.swift +++ b/SynthReel/Class/User/VC/SRUserViewController.swift @@ -2,7 +2,7 @@ // SRUserViewController.swift // SynthReel // -// Created by CSGY on 2025/11/24. +// Created by 澜声世纪 on 2025/11/24. // Copyright © 2025 SR. All rights reserved. // @@ -49,6 +49,7 @@ class SRUserViewController: SRViewController { vc.theme = "theme_15" self?.navigationController?.pushViewController(vc, animated: true) } + NotificationCenter.default.addObserver(self, selector: #selector(userChange), name: SRLogin.userInfoUpdateNotification, object: nil) // Do any additional setup after loading the view. } @@ -57,21 +58,27 @@ class SRUserViewController: SRViewController { self.navigationController?.setNavigationBarHidden(true, animated: true) } + @MainActor override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) Task { - await SRAccountManager.manager.updateUserInfo() - self.headerView.updateUserInfo() + await SRLogin.manager.requestUserInfo(completer: nil) } } func handleHeaderRefresh() { Task { - await SRAccountManager.manager.updateUserInfo() + await SRLogin.manager.requestUserInfo(completer: nil) self.headerView.updateUserInfo() self.pagingView.mainTableView.sr_endHeaderRefreshing() } } + + @MainActor + @objc func userChange() { + self.pagingView.reloadData() + self.headerView.updateUserInfo() + } } extension SRUserViewController { diff --git a/SynthReel/Class/User/model/SRUserInfoModel.swift b/SynthReel/Class/User/model/SRUserInfoModel.swift index 718c846..daaa17d 100644 --- a/SynthReel/Class/User/model/SRUserInfoModel.swift +++ b/SynthReel/Class/User/model/SRUserInfoModel.swift @@ -2,7 +2,7 @@ // SRUserInfoModel.swift // SynthReel // -// Created by CSGY on 2025/11/24. +// Created by 澜声世纪 on 2025/11/24. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/User/model/SRUserSettingModel.swift b/SynthReel/Class/User/model/SRUserSettingModel.swift index c002139..7e615d1 100644 --- a/SynthReel/Class/User/model/SRUserSettingModel.swift +++ b/SynthReel/Class/User/model/SRUserSettingModel.swift @@ -2,7 +2,7 @@ // SRUserSettingModel.swift // SynthReel // -// Created by CSGY on 2025/11/24. +// Created by 澜声世纪 on 2025/11/24. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/User/view/SRAboutCell.swift b/SynthReel/Class/User/view/SRAboutCell.swift index 379bb18..d1d4295 100644 --- a/SynthReel/Class/User/view/SRAboutCell.swift +++ b/SynthReel/Class/User/view/SRAboutCell.swift @@ -2,7 +2,7 @@ // SRAboutCell.swift // SynthReel // -// Created by CSGY on 2025/11/25. +// Created by 澜声世纪 on 2025/11/25. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/User/view/SRAboutHeaderVIew.swift b/SynthReel/Class/User/view/SRAboutHeaderVIew.swift index e2c439b..9cb785c 100644 --- a/SynthReel/Class/User/view/SRAboutHeaderVIew.swift +++ b/SynthReel/Class/User/view/SRAboutHeaderVIew.swift @@ -2,7 +2,7 @@ // SRAboutHeaderVIew.swift // SynthReel // -// Created by CSGY on 2025/11/25. +// Created by 澜声世纪 on 2025/11/25. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/User/view/SRCoinPackCell.swift b/SynthReel/Class/User/view/SRCoinPackCell.swift index 97b9272..ab3f290 100644 --- a/SynthReel/Class/User/view/SRCoinPackCell.swift +++ b/SynthReel/Class/User/view/SRCoinPackCell.swift @@ -2,7 +2,7 @@ // SRCoinPackCell.swift // SynthReel // -// Created by CSGY on 2025/11/28. +// Created by 澜声世纪 on 2025/11/28. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/User/view/SRLoginButtonView.swift b/SynthReel/Class/User/view/SRLoginButtonView.swift index 9d762b9..3fbdbd5 100644 --- a/SynthReel/Class/User/view/SRLoginButtonView.swift +++ b/SynthReel/Class/User/view/SRLoginButtonView.swift @@ -2,7 +2,7 @@ // SRLoginButtonView.swift // SynthReel // -// Created by CSGY on 2025/12/1. +// Created by 澜声世纪 on 2025/12/1. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/User/view/SRUserHeaderView.swift b/SynthReel/Class/User/view/SRUserHeaderView.swift index 1076820..197651e 100644 --- a/SynthReel/Class/User/view/SRUserHeaderView.swift +++ b/SynthReel/Class/User/view/SRUserHeaderView.swift @@ -2,7 +2,7 @@ // SRUserHeaderView.swift // SynthReel // -// Created by CSGY on 2025/12/02. +// Created by 澜声世纪 on 2025/12/02. // Copyright © 2025 SR. All rights reserved. // @@ -32,7 +32,7 @@ class SRUserHeaderView: UIView { let label = UILabel() label.textColor = UIColor.AAEAFF_0_5 label.font = .font(ofSize: 13, weight: .regular) - label.text = SRAccountManager.manager.userInfo?.customer_id + label.text = SRLogin.manager.userInfo?.customer_id return label }() @@ -85,7 +85,7 @@ class SRUserHeaderView: UIView { lazy var vipView = SRUserVIPView() lazy var rewardView = SRRewardView() - var contentHeight: CGFloat = 580 + var contentHeight: CGFloat = 500 var clickCallback: (() -> Void)? // Kept for backward compatibility or remove if unused var coinPackClickCallback: (() -> Void)? var vipClickCallback: (() -> Void)? @@ -132,9 +132,9 @@ class SRUserHeaderView: UIView { } func updateUserInfo() { - self.userId.text = SRAccountManager.manager.userInfo?.customer_id - self.coinValueLabel.text = "\(SRAccountManager.manager.userInfo?.totalCoins ?? 0)" - self.donateValueLabel.text = "\(SRAccountManager.manager.userInfo?.totalCoins ?? 0)" // Using same value for now as placeholder + self.userId.text = SRLogin.manager.userInfo?.customer_id + self.coinValueLabel.text = "\(SRLogin.manager.userInfo?.totalCoins ?? 0)" + self.donateValueLabel.text = "\(SRLogin.manager.userInfo?.totalCoins ?? 0)" // Using same value for now as placeholder } } @@ -157,7 +157,7 @@ extension SRUserHeaderView { addSubview(vipView) addSubview(coinPackView) - addSubview(rewardView) +// addSubview(rewardView) topImageView.snp.makeConstraints { make in make.left.right.top.equalToSuperview() @@ -232,11 +232,11 @@ extension SRUserHeaderView { make.top.equalTo(sendCoinImageView.snp.bottom).offset(20) } - rewardView.snp.makeConstraints { make in - make.left.right.equalToSuperview().inset(15) - make.height.equalTo(72) - make.top.equalTo(coinPackView.snp.bottom).offset(20) - } +// rewardView.snp.makeConstraints { make in +// make.left.right.equalToSuperview().inset(15) +// make.height.equalTo(72) +// make.top.equalTo(coinPackView.snp.bottom).offset(20) +// } } } diff --git a/SynthReel/Class/User/view/SRUserListHeaderView.swift b/SynthReel/Class/User/view/SRUserListHeaderView.swift index 49908bb..c6952ab 100644 --- a/SynthReel/Class/User/view/SRUserListHeaderView.swift +++ b/SynthReel/Class/User/view/SRUserListHeaderView.swift @@ -2,7 +2,7 @@ // SRUserListHeaderView.swift // SynthReel // -// Created by CSGY on 2025/12/02. +// Created by 澜声世纪 on 2025/12/02. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/User/view/SRUserLoginView.swift b/SynthReel/Class/User/view/SRUserLoginView.swift index 622a98b..dbb167d 100644 --- a/SynthReel/Class/User/view/SRUserLoginView.swift +++ b/SynthReel/Class/User/view/SRUserLoginView.swift @@ -2,7 +2,7 @@ // SRUserLoginView.swift // SynthReel // -// Created by CSGY on 2025/12/1. +// Created by 澜声世纪 on 2025/12/1. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/User/view/SRUserRewardCell.swift b/SynthReel/Class/User/view/SRUserRewardCell.swift index 57591cd..174cea0 100644 --- a/SynthReel/Class/User/view/SRUserRewardCell.swift +++ b/SynthReel/Class/User/view/SRUserRewardCell.swift @@ -2,7 +2,7 @@ // SRUserRewardCell.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/User/view/SRUserSettingCell.swift b/SynthReel/Class/User/view/SRUserSettingCell.swift index 5464278..b4f3f2d 100644 --- a/SynthReel/Class/User/view/SRUserSettingCell.swift +++ b/SynthReel/Class/User/view/SRUserSettingCell.swift @@ -2,7 +2,7 @@ // SRUserSettingCell.swift // SynthReel // -// Created by CSGY on 2025/11/24. +// Created by 澜声世纪 on 2025/11/24. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Class/User/view/SRUserTopCell.swift b/SynthReel/Class/User/view/SRUserTopCell.swift index c5b595c..a92b7fe 100644 --- a/SynthReel/Class/User/view/SRUserTopCell.swift +++ b/SynthReel/Class/User/view/SRUserTopCell.swift @@ -2,7 +2,7 @@ // SRUserTopCell.swift // SynthReel // -// Created by CSGY on 2025/11/24. +// Created by 澜声世纪 on 2025/11/24. // Copyright © 2025 SR. All rights reserved. // @@ -30,7 +30,7 @@ class SRUserTopCell: UICollectionViewCell { let label = UILabel() label.textColor = UIColor.AAEAFF_0_5 label.font = .font(ofSize: 13, weight: .regular) - label.text = SRAccountManager.manager.userInfo?.customer_id + label.text = SRLogin.manager.userInfo?.customer_id return label }() diff --git a/SynthReel/Delegate/AppDelegate+Config.swift b/SynthReel/Delegate/AppDelegate+Config.swift index bbcace4..5fc069b 100644 --- a/SynthReel/Delegate/AppDelegate+Config.swift +++ b/SynthReel/Delegate/AppDelegate+Config.swift @@ -2,7 +2,7 @@ // AppDelegate+Config.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/13. +// Created by 澜声世纪 on 2025/11/13. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Delegate/AppDelegate+SRAPNS.swift b/SynthReel/Delegate/AppDelegate+SRAPNS.swift new file mode 100644 index 0000000..7029b14 --- /dev/null +++ b/SynthReel/Delegate/AppDelegate+SRAPNS.swift @@ -0,0 +1,129 @@ +// +// AppDelegate+SRAPNS.swift +// SynthReel +// +// Created by 澜声世纪 on 2025/12/9. +// Copyright © 2025 SR. All rights reserved. +// + +import UIKit +import FirebaseMessaging +import SmartCodable +import FirebaseCore + +extension SceneDelegate { + func requestFirebase() { + FirebaseApp.configure() + Messaging.messaging().delegate = self + } + + func requestApns() { + let center = UNUserNotificationCenter.current() + center.delegate = self + + center.requestAuthorization(options: [.badge, .sound, .alert]) { grant, error in + if !grant { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { + self.showApnsAlert() + } + } else { + adjustManger.manager.apnsFinish() + + } + + + + SRStatAPI.uploadApnsAuthorizationStatus() + } + UIApplication.shared.registerForRemoteNotifications() + } + + + + func setBadgeCount(_ count: Int) { + if #available(iOS 16.0, *) { + UNUserNotificationCenter.current().setBadgeCount(count) + } else { + UIApplication.shared.applicationIconBadgeNumber = count + } + } + + private func showApnsAlert() { + guard let date = UserDefaults.standard.object(forKey: kSRApnsAlertDefaultsKey) as? Date else { + UserDefaults.standard.set(Date(), forKey: kSRApnsAlertDefaultsKey) + return + } +// #if !DEBUG +// if date.fa_isToday { return } +// UserDefaults.standard.set(Date(), forKey: kFAApnsAlertDefaultsKey) +// #endif + +// let view = SRApnsAlert() +// view.show() + } + } + + extension AppDelegate { + func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { + Messaging.messaging().apnsToken = deviceToken + } + + func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: any Error) { + + } + } + + //MARK: -------------- UNUserNotificationCenterDelegate -------------- + extension SceneDelegate: UNUserNotificationCenterDelegate { + + ///APP处于前台是接收通知消息 + func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { + completionHandler([.badge, .banner]) + } + + ///点击通知消息进入app + func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { + setBadgeCount(0) + + guard let userInfo: [String : Any] = response.notification.request.content.userInfo as? [String : Any] else { + completionHandler() + return + } + + guard let model = SROpenAppModel.deserialize(from: userInfo) else { + completionHandler() + return + } + + Task { + await SRUserApi.requestStatApnsClick(id: model.message_id ?? "", title: response.notification.request.content.title) + } + + if model.path == .videoDetail, let shortPlayId = model.short_play_id { + let vc = SRDetailPlayerViewController() + vc.shortId = shortPlayId + SRTool.topViewController?.navigationController?.pushViewController(vc, animated: true) + + } else if model.path == .feedback { + let vc = SRAppWebViewController() + vc.webUrl = kSRFeedBackListWebUrl + SRTool.topViewController?.navigationController?.pushViewController(vc, animated: true) + } + + completionHandler() + } + + + } + + //MARK: MessagingDelegate + extension SceneDelegate: MessagingDelegate { + func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) { + if let token = fcmToken { + Task { + await SRUserApi.requestUploadApnsDeviceToken(token: token) + } + + } + } + } diff --git a/SynthReel/Delegate/AppDelegate+adjust.swift b/SynthReel/Delegate/AppDelegate+adjust.swift new file mode 100644 index 0000000..2b94c8e --- /dev/null +++ b/SynthReel/Delegate/AppDelegate+adjust.swift @@ -0,0 +1,148 @@ +// +// AppDelegate+adjust.swift +// SynthReel +// +// Created by 澜声世纪 on 2025/12/9. +// Copyright © 2025 SR. All rights reserved. +// + +import AdjustSdk +import SmartCodable +#if canImport(FacebookCore) +import FacebookCore +#endif + +extension AppDelegate { + + func registerAdjust() { +#if DEBUG + let config = ADJConfig(appToken: "zyp26mbr3yf4", environment: ADJEnvironmentSandbox) + config?.logLevel = .verbose +#else + let config = ADJConfig(appToken: "zyp26mbr3yf4", environment: ADJEnvironmentProduction) +#endif + + config?.delegate = self + Adjust.initSdk(config) + } + +} + +//MARK: AdjustDelegate +extension AppDelegate: AdjustDelegate { + func adjustDeferredDeeplinkReceived(_ deeplink: URL?) -> Bool { + return true + } +} + + +extension SceneDelegate { + func handleOpenAppMessage(webpageURL: URL?) { + let manager = adjustManger.manager + guard manager.allowOpenMessage else { return } + + guard SRNetworkReachableManager.manager.isReachable == true, + manager.isOpenApp, + manager.idfaAuthorizationFinish, //idfa授权完成 + manager.upgradeAlertFinish + else { + if let webpageURL = webpageURL { + manager.webpageURL = webpageURL + } + manager.isNeedRetry = true + return + } + manager.isNeedRetry = false + manager.webpageURL = nil + + + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { + self._handleOpenAppMessage(webpageURL: webpageURL) + } + } + + + private func _handleOpenAppMessage(webpageURL: URL?) { + + guard adjustManger.manager.allowOpenMessage else { return } + adjustManger.manager.allowOpenMessage = false + + //统计用URL + var statUrlStr: String? = webpageURL?.absoluteString + var data: [String : Any]? = webpageURL?.query?.urlQuryToDictionary() + + if statUrlStr == nil, let pasteStr = UIPasteboard.general.string, pasteStr.contains("fableon") { + let tempArr = pasteStr.components(separatedBy: "?") + let query = tempArr.last + + let tempData = query?.urlQuryToDictionary() + if tempData?["short_play_id"] != nil { + data = tempData + statUrlStr = pasteStr + } + } + UIPasteboard.general.string = nil + + if let urlStr = statUrlStr {//上报结果 + Task { + await SRUserApi.requestUploadW2a(data: urlStr) + } + } + + + + guard let data = data else { return } + guard let model = SROpenAppModel.deserialize(from: data) else { return } + guard let shortPlayId = model.short_play_id, shortPlayId.count > 0 else { return } + + + let vc = SRDetailPlayerViewController() + vc.shortId = shortPlayId + SRTool.topViewController?.navigationController?.pushViewController(vc, animated: true) + } + + + ///重试 + func retryHandleOpenAppMessage() { + guard adjustManger.manager.isNeedRetry else { return } + handleOpenAppMessage(webpageURL: adjustManger.manager.webpageURL) + } +} + + +extension SceneDelegate { + + ///URL打开APP + func scene(_ scene: UIScene, openURLContexts URLContexts: Set) { + guard let url = URLContexts.first?.url else { + return + } + var result = false + +#if canImport(FacebookCore) + result = ApplicationDelegate.shared.application(UIApplication.shared, open: url, sourceApplication: nil, annotation: [UIApplication.OpenURLOptionsKey.annotation]) +#endif + if !result { + if let link = ADJDeeplink(deeplink: url) { + Adjust.processDeeplink(link) + } + handleOpenAppMessage(webpageURL: url) + } + + } + + ///UniversalLink 打开app + func scene(_ scene: UIScene, continue userActivity: NSUserActivity) { + guard let webpageURL = userActivity.webpageURL else { return } + var result = false + +#if canImport(FacebookCore) + result = ApplicationDelegate.shared.application(UIApplication.shared, continue: userActivity) +#endif + + if !result { + handleOpenAppMessage(webpageURL: webpageURL) + } + } + +} diff --git a/SynthReel/Delegate/AppDelegate.swift b/SynthReel/Delegate/AppDelegate.swift index 3f061ed..e86aca0 100644 --- a/SynthReel/Delegate/AppDelegate.swift +++ b/SynthReel/Delegate/AppDelegate.swift @@ -2,7 +2,7 @@ // AppDelegate.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/12. +// Created by 澜声世纪 on 2025/11/12. // import UIKit @@ -18,13 +18,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate { SRNetworkReachableManager.manager.startMonitoring() sr_registThirdparty(application, didFinishLaunchingWithOptions: launchOptions) self.setConfig() + NotificationCenter.default.addObserver(self, selector: #selector(networkStatusDidChangeNotification), name: SRNetworkReachableManager.networkStatusDidChangeNotification, object: nil) - - Task { - await SRAccountManager.manager.updateUserInfo() + DispatchQueue.main.asyncAfter(wallDeadline: .now() + 0.2) { + if SRNetworkReachableManager.manager.isReachable == true { + Task { + await SRLogin.manager.requestUserInfo(completer: nil) + } + } } - return true } @@ -43,6 +46,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } - + @objc private func networkStatusDidChangeNotification() { + + if SRNetworkReachableManager.manager.isReachable == true { + Task { + await SRLogin.manager.requestUserInfo(completer: nil) + } + } + + } } diff --git a/SynthReel/Delegate/SceneDelegate.swift b/SynthReel/Delegate/SceneDelegate.swift index eda41b8..23863f3 100644 --- a/SynthReel/Delegate/SceneDelegate.swift +++ b/SynthReel/Delegate/SceneDelegate.swift @@ -2,7 +2,7 @@ // SceneDelegate.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/12. +// Created by 澜声世纪 on 2025/11/12. // import UIKit @@ -19,12 +19,15 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { window = UIWindow(windowScene: windowScene) - window?.rootViewController = SRTabBarController() - window?.makeKeyAndVisible() +// window?.rootViewController = SRTabBarController() +// window?.makeKeyAndVisible() + startApp() UINavigationBar.uv_applyGlobalAppearance() + requestFirebase() + requestApns() - + NotificationCenter.default.addObserver(self, selector: #selector(networkStatusDidChangeNotification), name: SRNetworkReachableManager.networkStatusDidChangeNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(abcd), name: NSNotification.Name(rawValue: "abcd"), object: nil) } @@ -34,33 +37,146 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { } func sceneDidDisconnect(_ scene: UIScene) { - // Called as the scene is being released by the system. - // This occurs shortly after the scene enters the background, or when its session is discarded. - // Release any resources associated with this scene that can be re-created the next time the scene connects. - // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). - } + + } - func sceneDidBecomeActive(_ scene: UIScene) { - // Called when the scene has moved from an inactive state to an active state. - // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. - } + func sceneDidBecomeActive(_ scene: UIScene) { + self.handleOnLine() + Task { + await SRUserApi.requestEnterApp() + } + self.setBadgeCount(0) + } - func sceneWillResignActive(_ scene: UIScene) { - // Called when the scene will move from an active state to an inactive state. - // This may occur due to temporary interruptions (ex. an incoming phone call). - } + func sceneWillResignActive(_ scene: UIScene) { + Task { + await SRUserApi.requestLeave() + } + } - func sceneWillEnterForeground(_ scene: UIScene) { - // Called as the scene transitions from the background to the foreground. - // Use this method to undo the changes made on entering the background. - } + func sceneWillEnterForeground(_ scene: UIScene) { + SRStatAPI.uploadApnsAuthorizationStatus() + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { + self.handleOpenAppMessage(webpageURL: nil) + } + } - func sceneDidEnterBackground(_ scene: UIScene) { - // Called as the scene transitions from the foreground to the background. - // Use this method to save data, release shared resources, and store enough scene-specific state information - // to restore the scene back to its current state. - } + func sceneDidEnterBackground(_ scene: UIScene) { + adjustManger.manager.allowOpenMessage = true + if #available(iOS 16.1, *) { +// startWidgeLiveActivity() + } + } } +extension SceneDelegate { + + private func startApp() { + setRootVC() +// let languageManager = FALanguageManager.manager +// +// if languageManager.languageDataLanguageKey != languageManager.currentLanguageKey { +// let vc = FATool.getLanuchViewController() +// window?.rootViewController = vc +// window?.makeKeyAndVisible() +// +// languageManager.updateLanguageData { [weak self] finish in +// guard let self = self else { return } +// self.setRootVC() +// } +// } else { +// languageManager.updateLanguageData(completer: nil) +// setRootVC() +// } + } + + private func setRootVC() { + ///是否首次开启过 + let hasOpenApp = UserDefaults.standard.object(forKey: kSRHasBeenOpenedAPPDefaultsKey) as? Bool + + if hasOpenApp != true { + let vc = SRAppStartViewController() + vc.openAppBlock = { [weak self] in + guard let self = self else { return } + UserDefaults.standard.set(true, forKey: kSRHasBeenOpenedAPPDefaultsKey) + self.setTabBarController() + self.retryHandleOpenAppMessage() + } + window?.rootViewController = vc + window?.makeKeyAndVisible() + } else { + self.setTabBarController() + self.retryHandleOpenAppMessage() + } + } + + private func setTabBarController() { + adjustManger.manager.isOpenApp = true + + window?.rootViewController = SRTabBarController() + window?.makeKeyAndVisible() + } +} + +extension SceneDelegate { + + @objc private func handleOnLine() { + Task { + await SRUserApi.requestStatOnLine() + } + } + + @objc private func networkStatusDidChangeNotification() { +// let localizedData = FALanguageManager.manager.languageData ?? [:] + + if SRNetworkReachableManager.manager.isReachable == true { + handleOnLine() + SRTool.requestIDFAAuthorization(nil) + self.retryHandleOpenAppMessage() + SRIapManager.manager.preloadingProducts() + + ///缺少语言数据,重新获取语言数据 +// if localizedData.isEmpty { +// self.startApp() +// } + } + } +// +// @objc private func languageDidChange() { +// MJRefreshConfig.default.languageCode = FALanguageManager.manager.mjLanguageKey +// setTabBarController() +// } + +// @available(iOS 16.1, *) +// private func startWidgeLiveActivity() { +// +// guard let model = SRTool.widgetLiveActivityModel, let imageUrl = URL(string: model.image_url ?? "") else { return } +// +// KingfisherManager.shared.retrieveImage(with: imageUrl) { result in +// switch result { +// case .success(let imageResult): +// let image = imageResult.image +// +// guard let data = image.compressImageSize(toByte: 9 * 1024) else { return } +// guard let filePath = FAActivityManager.coverFileUrl else { return } +// +// do { +// try data.write(to: filePath, options: .atomic) +// +// FAActivityManager.liveActivity(with: model.name ?? "", +// videoId: model.short_play_id ?? "", +// videoEpisode: model.current_episode ?? "") +// } catch { +// +// } +// +// default: +// break +// } +// } +// +// +// } +} diff --git a/SynthReel/Libs/Alert/SRApnsAlert.swift b/SynthReel/Libs/Alert/SRApnsAlert.swift new file mode 100644 index 0000000..9d41b82 --- /dev/null +++ b/SynthReel/Libs/Alert/SRApnsAlert.swift @@ -0,0 +1,111 @@ +// +// SRApnsAlert.swift +// SynthReel +// +// Created by 澜声世纪 on 2025/12/9. +// Copyright © 2025 SR. All rights reserved. +// + +import UIKit + +class SRApnsAlert: SRBaseAlert { + + private lazy var imageView = UIImageView(image: UIImage(named: "alertBg")) + + private lazy var titleLabel: UILabel = { + let label = UILabel() + label.textAlignment = .center + label.numberOfLines = 0 + label.font = .font(ofSize: 18, weight: .semibold) + label.textColor = .white + label.text = "apns_alert_title".localized + return label + }() + + private lazy var textLabel: UILabel = { + let label = UILabel() + label.textAlignment = .center + label.numberOfLines = 0 + label.font = .font(ofSize: 12, weight: .regular) + label.textColor = .white + label.text = "apns_alert_text".localized + return label + }() + + private lazy var laterButton: UIButton = { + let button = UIButton(type: .custom) + button.layer.cornerRadius = 18 + button.layer.masksToBounds = true + button.layer.borderWidth = 1 + button.layer.borderColor = UIColor.white.cgColor + button.setTitle("fableon_open_notification_later".localized, for: .normal) + button.setTitleColor(.white, for: .normal) + button.titleLabel?.font = .font(ofSize: 14, weight: .semibold) + button.addTarget(self, action: #selector(dismiss), for: .touchUpInside) + return button + }() + + override init(frame: CGRect) { + super.init(frame: frame) + highlightButton.setTitle("fableon_open".localized, for: .normal) + + fa_setupLayout() + } + + @MainActor required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func handleHighlightButton() { + super.handleHighlightButton() + SRTool.openApnsSetting() + adjustManger.manager.apnsFinish() + } + + override func dismiss() { + super.dismiss() + adjustManger.manager.apnsFinish() + } + +} + +extension SRApnsAlert { + + private func fa_setupLayout() { + containerView.addSubview(imageView) + imageView.addSubview(titleLabel) + imageView.addSubview(textLabel) + imageView.addSubview(laterButton) + imageView.addSubview(highlightButton) + + imageView.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.top.equalToSuperview().offset(-62) + } + + titleLabel.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.right.lessThanOrEqualToSuperview().offset(-10) + make.top.equalTo(imageView.snp.bottom).offset(10) + } + + textLabel.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.right.lessThanOrEqualToSuperview().offset(-20) + make.top.equalTo(titleLabel.snp.bottom).offset(12) + } + + laterButton.snp.makeConstraints { make in + make.left.equalToSuperview().offset(23) + make.top.equalTo(textLabel.snp.bottom).offset(21) + make.bottom.equalToSuperview().offset(-20) + make.height.equalTo(36) + } + + highlightButton.snp.makeConstraints { make in + make.width.height.top.equalTo(laterButton) + make.left.equalTo(laterButton.snp.right).offset(11) + make.right.equalToSuperview().offset(-23) + } + } +} diff --git a/SynthReel/Libs/Alert/SRBaseAlert.swift b/SynthReel/Libs/Alert/SRBaseAlert.swift index 21fb69b..1849294 100644 --- a/SynthReel/Libs/Alert/SRBaseAlert.swift +++ b/SynthReel/Libs/Alert/SRBaseAlert.swift @@ -2,7 +2,7 @@ // SRBaseAlert.swift // SynthReel // -// Created by CSGY on 2025/11/27. +// Created by 澜声世纪 on 2025/11/27. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/Empty/SREmpty.swift b/SynthReel/Libs/Empty/SREmpty.swift index ffa1e75..caf836a 100644 --- a/SynthReel/Libs/Empty/SREmpty.swift +++ b/SynthReel/Libs/Empty/SREmpty.swift @@ -2,7 +2,7 @@ // SREmpty.swift // SynthReel // -// Created by CSGY on 2025/11/26. +// Created by 澜声世纪 on 2025/11/26. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/FSPagerView/SRPagerViewTransformer.swift b/SynthReel/Libs/FSPagerView/SRPagerViewTransformer.swift index aba3073..30da7d4 100644 --- a/SynthReel/Libs/FSPagerView/SRPagerViewTransformer.swift +++ b/SynthReel/Libs/FSPagerView/SRPagerViewTransformer.swift @@ -2,7 +2,7 @@ // SRPagerViewTransformer.swift // SynthReel // -// Created by CSGY on 2025/11/27. +// Created by 澜声世纪 on 2025/11/27. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/SRAccount/SRAccountManager.swift b/SynthReel/Libs/SRAccount/SRAccountManager.swift index 65cea8d..1d80dc2 100644 --- a/SynthReel/Libs/SRAccount/SRAccountManager.swift +++ b/SynthReel/Libs/SRAccount/SRAccountManager.swift @@ -2,7 +2,7 @@ // SRAccountManager.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/12. +// Created by 澜声世纪 on 2025/11/12. // Copyright © 2025 SR. All rights reserved. // @@ -11,39 +11,39 @@ import UIKit class SRAccountManager: NSObject { - static let manager = SRAccountManager() - - private(set) var token = UserDefaults.sr_object(forKey: kSRAccountTokenDefaultsKey, as: SRAccountToken.self) - private(set) var userInfo = UserDefaults.sr_object(forKey: kSRUserInfoDefaultsKey, as: SRUserInfo.self) - - - func setAccountToken(_ token: SRAccountToken?) { - self.token = token - UserDefaults.sr_setObject(token, forKey: kSRAccountTokenDefaultsKey) - } - - - ///更新用户信息 - func updateUserInfo() async { -// Task { -// completer?() +// static let manager = SRAccountManager() +// +// private(set) var token = UserDefaults.sr_object(forKey: kSRAccountTokenDefaultsKey, as: SRAccountToken.self) +// private(set) var userInfo = UserDefaults.sr_object(forKey: kSRUserInfoDefaultsKey, as: SRUserInfo.self) +// +// +// func setAccountToken(_ token: SRAccountToken?) { +// self.token = token +// UserDefaults.sr_setObject(token, forKey: kSRAccountTokenDefaultsKey) +// } +// +// var isLogin: Bool { +// return !(userInfo?.is_tourist ?? true) +// } +// +// ///更新用户信息 +// func updateUserInfo() async { +// if let userInfo = await SRUserApi.requestUserInfo() { +// self.userInfo = userInfo +// UserDefaults.sr_setObject(userInfo, forKey: kSRUserInfoDefaultsKey) +// await MainActor.run { +// NotificationCenter.default.post(name: SRAccountManager.userInfoUpdateNotification, object: nil) +// } // } - if let userInfo = await SRUserApi.requestUserInfo() { - self.userInfo = userInfo - UserDefaults.sr_setObject(userInfo, forKey: kSRUserInfoDefaultsKey) - NotificationCenter.default.post(name: SRAccountManager.userInfoUpdateNotification, object: nil) - } - - - } - +// } +// } extension SRAccountManager { - ///用户信息更新 - @objc static let userInfoUpdateNotification = NSNotification.Name(rawValue: "SRAccountManager.userInfoUpdateNotification") - ///登录状态发生变化 - @objc static let loginStatusChangeNotification = NSNotification.Name(rawValue: "SRAccountManager.loginStatusChangeNotification") +// ///用户信息更新 +// @objc static let userInfoUpdateNotification = NSNotification.Name(rawValue: "SRAccountManager.userInfoUpdateNotification") +// ///登录状态发生变化 +// @objc static let loginStatusChangeNotification = NSNotification.Name(rawValue: "SRAccountManager.loginStatusChangeNotification") } diff --git a/SynthReel/Libs/SRAccount/SRAccountToken.swift b/SynthReel/Libs/SRAccount/SRAccountToken.swift index fb2fd0b..dee7900 100644 --- a/SynthReel/Libs/SRAccount/SRAccountToken.swift +++ b/SynthReel/Libs/SRAccount/SRAccountToken.swift @@ -2,7 +2,7 @@ // SRAccountToken.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/12. +// Created by 澜声世纪 on 2025/11/12. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/SRAccount/SRUserInfo.swift b/SynthReel/Libs/SRAccount/SRUserInfo.swift index c14c694..38a4074 100644 --- a/SynthReel/Libs/SRAccount/SRUserInfo.swift +++ b/SynthReel/Libs/SRAccount/SRUserInfo.swift @@ -2,7 +2,7 @@ // SRUserInfo.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/12. +// Created by 澜声世纪 on 2025/11/12. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/SRAppstore/SRIapManager.swift b/SynthReel/Libs/SRAppstore/SRIapManager.swift index 9d1b1c4..1816904 100644 --- a/SynthReel/Libs/SRAppstore/SRIapManager.swift +++ b/SynthReel/Libs/SRAppstore/SRIapManager.swift @@ -2,7 +2,7 @@ // SRIapManager.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/SRAppstore/SRIapOrderModel.swift b/SynthReel/Libs/SRAppstore/SRIapOrderModel.swift index 8d92977..cad1a59 100644 --- a/SynthReel/Libs/SRAppstore/SRIapOrderModel.swift +++ b/SynthReel/Libs/SRAppstore/SRIapOrderModel.swift @@ -2,7 +2,7 @@ // SRIapOrderModel.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/SRAppstore/SRPayDataRequest.swift b/SynthReel/Libs/SRAppstore/SRPayDataRequest.swift index 411ca8b..3fef101 100644 --- a/SynthReel/Libs/SRAppstore/SRPayDataRequest.swift +++ b/SynthReel/Libs/SRAppstore/SRPayDataRequest.swift @@ -2,7 +2,7 @@ // SRPayDataRequest.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/SRAppstore/SRWaitRestoreModel.swift b/SynthReel/Libs/SRAppstore/SRWaitRestoreModel.swift index dc02227..9f4a9f1 100644 --- a/SynthReel/Libs/SRAppstore/SRWaitRestoreModel.swift +++ b/SynthReel/Libs/SRAppstore/SRWaitRestoreModel.swift @@ -2,7 +2,7 @@ // SRWaitRestoreModel.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/SRDeviceID/SRDeviceId.swift b/SynthReel/Libs/SRDeviceID/SRDeviceId.swift index 76ccd84..0637f37 100644 --- a/SynthReel/Libs/SRDeviceID/SRDeviceId.swift +++ b/SynthReel/Libs/SRDeviceID/SRDeviceId.swift @@ -2,7 +2,7 @@ // SRDeviceId.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/12. +// Created by 澜声世纪 on 2025/11/12. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/SRDeviceID/SRKeychain.swift b/SynthReel/Libs/SRDeviceID/SRKeychain.swift index 5b95e09..b94cfe9 100644 --- a/SynthReel/Libs/SRDeviceID/SRKeychain.swift +++ b/SynthReel/Libs/SRDeviceID/SRKeychain.swift @@ -2,7 +2,7 @@ // SRKeychain.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/12. +// Created by 澜声世纪 on 2025/11/12. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/SRHud/SRHud.swift b/SynthReel/Libs/SRHud/SRHud.swift index cd0212c..6b60fd0 100644 --- a/SynthReel/Libs/SRHud/SRHud.swift +++ b/SynthReel/Libs/SRHud/SRHud.swift @@ -2,7 +2,7 @@ // SRHud.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/13. +// Created by 澜声世纪 on 2025/11/13. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/SRHud/SRToast.swift b/SynthReel/Libs/SRHud/SRToast.swift index 0eaba30..965bbba 100644 --- a/SynthReel/Libs/SRHud/SRToast.swift +++ b/SynthReel/Libs/SRHud/SRToast.swift @@ -2,7 +2,7 @@ // SRToast.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/13. +// Created by 澜声世纪 on 2025/11/13. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/SRLogin/SRLogin+FB.swift b/SynthReel/Libs/SRLogin/SRLogin+FB.swift index 82c0f61..746d00a 100644 --- a/SynthReel/Libs/SRLogin/SRLogin+FB.swift +++ b/SynthReel/Libs/SRLogin/SRLogin+FB.swift @@ -2,7 +2,7 @@ // SRLogin+FB.swift // SynthReel // -// Created by CSGY on 2025/12/1. +// Created by 澜声世纪 on 2025/12/1. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/SRLogin/SRLogin+apple.swift b/SynthReel/Libs/SRLogin/SRLogin+apple.swift index ec3fcf7..fd007c1 100644 --- a/SynthReel/Libs/SRLogin/SRLogin+apple.swift +++ b/SynthReel/Libs/SRLogin/SRLogin+apple.swift @@ -2,7 +2,7 @@ // SRLogin+third.swift // SynthReel // -// Created by CSGY on 2025/12/1. +// Created by 澜声世纪 on 2025/12/1. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/SRLogin/SRLogin.swift b/SynthReel/Libs/SRLogin/SRLogin.swift index 43bd9bb..261ab0b 100644 --- a/SynthReel/Libs/SRLogin/SRLogin.swift +++ b/SynthReel/Libs/SRLogin/SRLogin.swift @@ -2,7 +2,7 @@ // SRLogin.swift // SynthReel // -// Created by CSGY on 2025/12/1. +// Created by 澜声世纪 on 2025/12/1. // Copyright © 2025 SR. All rights reserved. // @@ -37,6 +37,10 @@ class SRLogin: NSObject { UserDefaults.sr_setObject(userInfo, forKey: kSRUserInfoDefaultsKey) } + func loginSuccessSaveToken(_ token: SRTokenModel?) { + setToken(token) + } + ///第三方登录 func thirdLogin(type: LoginType, presentingViewController: UIViewController?, completer: ((_ isFinish: Bool) -> Void)?) { switch type { @@ -119,7 +123,10 @@ extension SRLogin { self.setToken(token) } completer?() - NotificationCenter.default.post(name: Self.userInfoUpdateNotification, object: nil) + await MainActor.run { + NotificationCenter.default.post(name: Self.userInfoUpdateNotification, object: nil) + } + } } diff --git a/SynthReel/Libs/SRLogin/SRThirdModel.swift b/SynthReel/Libs/SRLogin/SRThirdModel.swift index 731f5aa..337e926 100644 --- a/SynthReel/Libs/SRLogin/SRThirdModel.swift +++ b/SynthReel/Libs/SRLogin/SRThirdModel.swift @@ -2,7 +2,7 @@ // SRThirdModel.swift // SynthReel // -// Created by CSGY on 2025/12/1. +// Created by 澜声世纪 on 2025/12/1. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/SRLogin/SRTokenModel.swift b/SynthReel/Libs/SRLogin/SRTokenModel.swift index 721fecf..c71b79a 100644 --- a/SynthReel/Libs/SRLogin/SRTokenModel.swift +++ b/SynthReel/Libs/SRLogin/SRTokenModel.swift @@ -2,7 +2,7 @@ // SRTokenModel.swift // SynthReel // -// Created by CSGY on 2025/12/1. +// Created by 澜声世纪 on 2025/12/1. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Libs/Tool/SRTool.swift b/SynthReel/Libs/Tool/SRTool.swift index 1b36a0c..36b192a 100644 --- a/SynthReel/Libs/Tool/SRTool.swift +++ b/SynthReel/Libs/Tool/SRTool.swift @@ -2,11 +2,13 @@ // SRTool.swift // SynthReel // -// Created by 湖北秦九 on 2025/11/13. +// Created by 澜声世纪 on 2025/11/13. // Copyright © 2025 SR. All rights reserved. // import UIKit +import AppTrackingTransparency +import AdSupport #if DEBUG func debugLog(_ msg: Any, file: String = #file, function: String = #function, line: Int = #line) { @@ -32,6 +34,8 @@ class SRTool { return keyWindow?.rootViewController } + + ///获得启动图 static var lanuchViewController: UIViewController? { let storyboard = UIStoryboard(name: "LaunchScreen", bundle: nil) @@ -62,3 +66,37 @@ class SRTool { } } } + +extension SRTool { + ///打开消息通知设置页面 + static func openApnsSetting() { + if #available(iOS 16.0, *) { + if let url = URL(string: UIApplication.openNotificationSettingsURLString) { + UIApplication.shared.open(url) + } + } else { + if let url = URL(string: UIApplication.openSettingsURLString) { + UIApplication.shared.open(url) + } + } + } + + static func requestIDFAAuthorization(_ completion: ((String?) -> Void)? = nil) { + if adjustManger.manager.idfaAuthorizationFinish { + completion?(ASIdentifierManager.shared().advertisingIdentifier.uuidString) + return + } + guard SRNetworkReachableManager.manager.isReachable == true, adjustManger.manager.apnsAuthorizationFinish else { + return + } + + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { + ATTrackingManager.requestTrackingAuthorization { status in + adjustManger.manager.idfaAuthorizationFinish = true + let idfa = ASIdentifierManager.shared().advertisingIdentifier.uuidString + SRTool.sceneDelegate?.retryHandleOpenAppMessage() + completion?(idfa) + } + } + } +} diff --git a/SynthReel/Libs/adjust/adjustManger.swift b/SynthReel/Libs/adjust/adjustManger.swift new file mode 100644 index 0000000..0a2e319 --- /dev/null +++ b/SynthReel/Libs/adjust/adjustManger.swift @@ -0,0 +1,36 @@ +// +// adjustManger.swift +// SynthReel +// +// Created by 澜声世纪 on 2025/12/9. +// Copyright © 2025 SR. All rights reserved. +// + +import UIKit + +class adjustManger { + + static let manager = adjustManger() + + var allowOpenMessage = true + + var webpageURL: URL? + ///是否需要重试 + var isNeedRetry = false + + var isOpenApp = false + + var idfaAuthorizationFinish = false + + private(set) var apnsAuthorizationFinish = false + + var upgradeAlertFinish = false + + + func apnsFinish() { + self.apnsAuthorizationFinish = true + SRTool.sceneDelegate?.retryHandleOpenAppMessage() + SRTool.requestIDFAAuthorization(nil) + } + +} diff --git a/SynthReel/Libs/payManger/SRPayManger.swift b/SynthReel/Libs/payManger/SRPayManger.swift index 08bc773..f943838 100644 --- a/SynthReel/Libs/payManger/SRPayManger.swift +++ b/SynthReel/Libs/payManger/SRPayManger.swift @@ -2,7 +2,7 @@ // SRPayManger.swift // SynthReel // -// Created by CSGY on 2025/12/2. +// Created by 澜声世纪 on 2025/12/2. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Source/Assets.xcassets/Color/F1FF2F.colorset/Contents.json b/SynthReel/Source/Assets.xcassets/Color/F1FF2F.colorset/Contents.json new file mode 100644 index 0000000..8dff13d --- /dev/null +++ b/SynthReel/Source/Assets.xcassets/Color/F1FF2F.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x2F", + "green" : "0xFF", + "red" : "0xF1" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SynthReel/Source/Assets.xcassets/Image/alertBg.imageset/Contents.json b/SynthReel/Source/Assets.xcassets/Image/alertBg.imageset/Contents.json new file mode 100644 index 0000000..fe9e53e --- /dev/null +++ b/SynthReel/Source/Assets.xcassets/Image/alertBg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "alertBg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "alertBg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SynthReel/Source/Assets.xcassets/Image/alertBg.imageset/alertBg@2x.png b/SynthReel/Source/Assets.xcassets/Image/alertBg.imageset/alertBg@2x.png new file mode 100644 index 0000000..5b976f7 Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/Image/alertBg.imageset/alertBg@2x.png differ diff --git a/SynthReel/Source/Assets.xcassets/Image/alertBg.imageset/alertBg@3x.png b/SynthReel/Source/Assets.xcassets/Image/alertBg.imageset/alertBg@3x.png new file mode 100644 index 0000000..6362523 Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/Image/alertBg.imageset/alertBg@3x.png differ diff --git a/SynthReel/Source/Assets.xcassets/coin/Rectangle 1098.imageset/Contents.json b/SynthReel/Source/Assets.xcassets/coin/Rectangle 1098.imageset/Contents.json new file mode 100644 index 0000000..1b6c802 --- /dev/null +++ b/SynthReel/Source/Assets.xcassets/coin/Rectangle 1098.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Rectangle 1098@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Rectangle 1098@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SynthReel/Source/Assets.xcassets/coin/Rectangle 1098.imageset/Rectangle 1098@2x.png b/SynthReel/Source/Assets.xcassets/coin/Rectangle 1098.imageset/Rectangle 1098@2x.png new file mode 100644 index 0000000..52f5220 Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/coin/Rectangle 1098.imageset/Rectangle 1098@2x.png differ diff --git a/SynthReel/Source/Assets.xcassets/coin/Rectangle 1098.imageset/Rectangle 1098@3x.png b/SynthReel/Source/Assets.xcassets/coin/Rectangle 1098.imageset/Rectangle 1098@3x.png new file mode 100644 index 0000000..224436d Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/coin/Rectangle 1098.imageset/Rectangle 1098@3x.png differ diff --git a/SynthReel/Source/Assets.xcassets/coin/cliamNowBg.imageset/Contents.json b/SynthReel/Source/Assets.xcassets/coin/cliamNowBg.imageset/Contents.json new file mode 100644 index 0000000..3e78964 --- /dev/null +++ b/SynthReel/Source/Assets.xcassets/coin/cliamNowBg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "cliamNowBg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "cliamNowBg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SynthReel/Source/Assets.xcassets/coin/cliamNowBg.imageset/cliamNowBg@2x.png b/SynthReel/Source/Assets.xcassets/coin/cliamNowBg.imageset/cliamNowBg@2x.png new file mode 100644 index 0000000..683dfb3 Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/coin/cliamNowBg.imageset/cliamNowBg@2x.png differ diff --git a/SynthReel/Source/Assets.xcassets/coin/cliamNowBg.imageset/cliamNowBg@3x.png b/SynthReel/Source/Assets.xcassets/coin/cliamNowBg.imageset/cliamNowBg@3x.png new file mode 100644 index 0000000..15fab63 Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/coin/cliamNowBg.imageset/cliamNowBg@3x.png differ diff --git a/SynthReel/Source/Assets.xcassets/coin/浮窗.imageset/Contents.json b/SynthReel/Source/Assets.xcassets/coin/浮窗.imageset/Contents.json new file mode 100644 index 0000000..c1a10a0 --- /dev/null +++ b/SynthReel/Source/Assets.xcassets/coin/浮窗.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "浮窗@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "浮窗@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SynthReel/Source/Assets.xcassets/coin/浮窗.imageset/浮窗@2x.png b/SynthReel/Source/Assets.xcassets/coin/浮窗.imageset/浮窗@2x.png new file mode 100644 index 0000000..efac418 Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/coin/浮窗.imageset/浮窗@2x.png differ diff --git a/SynthReel/Source/Assets.xcassets/coin/浮窗.imageset/浮窗@3x.png b/SynthReel/Source/Assets.xcassets/coin/浮窗.imageset/浮窗@3x.png new file mode 100644 index 0000000..8ba0bac Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/coin/浮窗.imageset/浮窗@3x.png differ diff --git a/SynthReel/Source/Assets.xcassets/myShort/icon_logout.imageset/Contents.json b/SynthReel/Source/Assets.xcassets/myShort/icon_logout.imageset/Contents.json new file mode 100644 index 0000000..c918d58 --- /dev/null +++ b/SynthReel/Source/Assets.xcassets/myShort/icon_logout.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_logout@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_logout@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SynthReel/Source/Assets.xcassets/myShort/icon_logout.imageset/icon_logout@2x.png b/SynthReel/Source/Assets.xcassets/myShort/icon_logout.imageset/icon_logout@2x.png new file mode 100644 index 0000000..baf563d Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/myShort/icon_logout.imageset/icon_logout@2x.png differ diff --git a/SynthReel/Source/Assets.xcassets/myShort/icon_logout.imageset/icon_logout@3x.png b/SynthReel/Source/Assets.xcassets/myShort/icon_logout.imageset/icon_logout@3x.png new file mode 100644 index 0000000..969055e Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/myShort/icon_logout.imageset/icon_logout@3x.png differ diff --git a/SynthReel/Source/Assets.xcassets/normal/Contents.json b/SynthReel/Source/Assets.xcassets/normal/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/SynthReel/Source/Assets.xcassets/normal/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SynthReel/Source/Assets.xcassets/normal/升级.imageset/Contents.json b/SynthReel/Source/Assets.xcassets/normal/升级.imageset/Contents.json new file mode 100644 index 0000000..c6a51a7 --- /dev/null +++ b/SynthReel/Source/Assets.xcassets/normal/升级.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "升级@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "升级@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SynthReel/Source/Assets.xcassets/normal/升级.imageset/升级@2x.png b/SynthReel/Source/Assets.xcassets/normal/升级.imageset/升级@2x.png new file mode 100644 index 0000000..7283e1e Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/normal/升级.imageset/升级@2x.png differ diff --git a/SynthReel/Source/Assets.xcassets/normal/升级.imageset/升级@3x.png b/SynthReel/Source/Assets.xcassets/normal/升级.imageset/升级@3x.png new file mode 100644 index 0000000..4e44168 Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/normal/升级.imageset/升级@3x.png differ diff --git a/SynthReel/Source/Assets.xcassets/normal/弹窗按钮背景.imageset/Contents.json b/SynthReel/Source/Assets.xcassets/normal/弹窗按钮背景.imageset/Contents.json new file mode 100644 index 0000000..4a269be --- /dev/null +++ b/SynthReel/Source/Assets.xcassets/normal/弹窗按钮背景.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "弹窗按钮背景@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "弹窗按钮背景@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SynthReel/Source/Assets.xcassets/normal/弹窗按钮背景.imageset/弹窗按钮背景@2x.png b/SynthReel/Source/Assets.xcassets/normal/弹窗按钮背景.imageset/弹窗按钮背景@2x.png new file mode 100644 index 0000000..6817494 Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/normal/弹窗按钮背景.imageset/弹窗按钮背景@2x.png differ diff --git a/SynthReel/Source/Assets.xcassets/normal/弹窗按钮背景.imageset/弹窗按钮背景@3x.png b/SynthReel/Source/Assets.xcassets/normal/弹窗按钮背景.imageset/弹窗按钮背景@3x.png new file mode 100644 index 0000000..ee60f71 Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/normal/弹窗按钮背景.imageset/弹窗按钮背景@3x.png differ diff --git a/SynthReel/Source/Assets.xcassets/normal/登出.imageset/Contents.json b/SynthReel/Source/Assets.xcassets/normal/登出.imageset/Contents.json new file mode 100644 index 0000000..819b7fb --- /dev/null +++ b/SynthReel/Source/Assets.xcassets/normal/登出.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "登出@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "登出@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SynthReel/Source/Assets.xcassets/normal/登出.imageset/登出@2x.png b/SynthReel/Source/Assets.xcassets/normal/登出.imageset/登出@2x.png new file mode 100644 index 0000000..9f079ee Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/normal/登出.imageset/登出@2x.png differ diff --git a/SynthReel/Source/Assets.xcassets/normal/登出.imageset/登出@3x.png b/SynthReel/Source/Assets.xcassets/normal/登出.imageset/登出@3x.png new file mode 100644 index 0000000..6c710d1 Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/normal/登出.imageset/登出@3x.png differ diff --git a/SynthReel/Source/Assets.xcassets/normal/通知.imageset/Contents.json b/SynthReel/Source/Assets.xcassets/normal/通知.imageset/Contents.json new file mode 100644 index 0000000..8cc1ccd --- /dev/null +++ b/SynthReel/Source/Assets.xcassets/normal/通知.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "通知@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "通知@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SynthReel/Source/Assets.xcassets/normal/通知.imageset/通知@2x.png b/SynthReel/Source/Assets.xcassets/normal/通知.imageset/通知@2x.png new file mode 100644 index 0000000..db432e2 Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/normal/通知.imageset/通知@2x.png differ diff --git a/SynthReel/Source/Assets.xcassets/normal/通知.imageset/通知@3x.png b/SynthReel/Source/Assets.xcassets/normal/通知.imageset/通知@3x.png new file mode 100644 index 0000000..0fe2852 Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/normal/通知.imageset/通知@3x.png differ diff --git a/SynthReel/Source/Assets.xcassets/store/coinalertBg.imageset/Contents.json b/SynthReel/Source/Assets.xcassets/store/coinalertBg.imageset/Contents.json new file mode 100644 index 0000000..b92b4f1 --- /dev/null +++ b/SynthReel/Source/Assets.xcassets/store/coinalertBg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "coinalertBg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "coinalertBg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SynthReel/Source/Assets.xcassets/store/coinalertBg.imageset/coinalertBg@2x.png b/SynthReel/Source/Assets.xcassets/store/coinalertBg.imageset/coinalertBg@2x.png new file mode 100644 index 0000000..66d0afc Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/store/coinalertBg.imageset/coinalertBg@2x.png differ diff --git a/SynthReel/Source/Assets.xcassets/store/coinalertBg.imageset/coinalertBg@3x.png b/SynthReel/Source/Assets.xcassets/store/coinalertBg.imageset/coinalertBg@3x.png new file mode 100644 index 0000000..97359dd Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/store/coinalertBg.imageset/coinalertBg@3x.png differ diff --git a/SynthReel/Source/Assets.xcassets/store/dailyIocn.imageset/Contents.json b/SynthReel/Source/Assets.xcassets/store/dailyIocn.imageset/Contents.json new file mode 100644 index 0000000..b110740 --- /dev/null +++ b/SynthReel/Source/Assets.xcassets/store/dailyIocn.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "dailyIocn@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "dailyIocn@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SynthReel/Source/Assets.xcassets/store/dailyIocn.imageset/dailyIocn@2x.png b/SynthReel/Source/Assets.xcassets/store/dailyIocn.imageset/dailyIocn@2x.png new file mode 100644 index 0000000..6bf3655 Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/store/dailyIocn.imageset/dailyIocn@2x.png differ diff --git a/SynthReel/Source/Assets.xcassets/store/dailyIocn.imageset/dailyIocn@3x.png b/SynthReel/Source/Assets.xcassets/store/dailyIocn.imageset/dailyIocn@3x.png new file mode 100644 index 0000000..c32699d Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/store/dailyIocn.imageset/dailyIocn@3x.png differ diff --git a/SynthReel/Source/Assets.xcassets/store/startButton.imageset/Contents.json b/SynthReel/Source/Assets.xcassets/store/startButton.imageset/Contents.json new file mode 100644 index 0000000..fa23d94 --- /dev/null +++ b/SynthReel/Source/Assets.xcassets/store/startButton.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "startButton@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "startButton@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SynthReel/Source/Assets.xcassets/store/startButton.imageset/startButton@2x.png b/SynthReel/Source/Assets.xcassets/store/startButton.imageset/startButton@2x.png new file mode 100644 index 0000000..b9232b1 Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/store/startButton.imageset/startButton@2x.png differ diff --git a/SynthReel/Source/Assets.xcassets/store/startButton.imageset/startButton@3x.png b/SynthReel/Source/Assets.xcassets/store/startButton.imageset/startButton@3x.png new file mode 100644 index 0000000..ff77684 Binary files /dev/null and b/SynthReel/Source/Assets.xcassets/store/startButton.imageset/startButton@3x.png differ diff --git a/SynthReel/Source/Bridging-Header.h b/SynthReel/Source/Bridging-Header.h index 817be0f..29379f8 100644 --- a/SynthReel/Source/Bridging-Header.h +++ b/SynthReel/Source/Bridging-Header.h @@ -2,7 +2,7 @@ // Bridging-Header.h // SynthReel // -// Created by 湖北秦九 on 2025/11/14. +// Created by 澜声世纪 on 2025/11/14. // Copyright © 2025 SR. All rights reserved. // diff --git a/SynthReel/Source/GoogleService-Info.plist b/SynthReel/Source/GoogleService-Info.plist index 8ecae5c..a399307 100644 --- a/SynthReel/Source/GoogleService-Info.plist +++ b/SynthReel/Source/GoogleService-Info.plist @@ -9,7 +9,7 @@ PLIST_VERSION 1 BUNDLE_ID - com.hbqinjiu.SynthReel + com.SynthReel.Tv.lssj PROJECT_ID synthreel STORAGE_BUCKET @@ -25,6 +25,6 @@ IS_SIGNIN_ENABLED GOOGLE_APP_ID - 1:803478191528:ios:c0cbb2e33d8a01ee1a719d + 1:803478191528:ios:d10eff859ab28ab61a719d \ No newline at end of file diff --git a/SynthReel/Source/Info.plist b/SynthReel/Source/Info.plist index 4fa068d..8bacbe1 100644 --- a/SynthReel/Source/Info.plist +++ b/SynthReel/Source/Info.plist @@ -23,6 +23,8 @@ FacebookAppID 1203129771732470 + NSUserTrackingUsageDescription + We will use your advertising identifier (IDFA) to provide a personalized advertising experience. FacebookClientToken 3e671125d76ef8555893cd453337ccfc UIApplicationSceneManifest @@ -44,10 +46,14 @@ UIBackgroundModes - fetch remote-notification + fetch UIDesignRequiresCompatibility + NSCameraUsageDescription + The APP needs to access your album to provide screenshots for feedback. + NSPhotoLibraryUsageDescription + The APP needs to access your album to provide screenshots for feedback. diff --git a/SynthReel/Source/en.lproj/Localizable.strings b/SynthReel/Source/en.lproj/Localizable.strings index 8eaad28..22dbb52 100644 --- a/SynthReel/Source/en.lproj/Localizable.strings +++ b/SynthReel/Source/en.lproj/Localizable.strings @@ -2,7 +2,7 @@ Localizable.strings SynthReel - Created by 湖北秦九 on 2025/11/13. + Created by 澜声世纪 on 2025/11/13. Copyright © 2025 SR. All rights reserved. */ @@ -71,7 +71,7 @@ "synthreel_weekly_total" = "Weekly Total"; "synthreel_claimable_coins" = "Claimable Coins"; "synthreel_active_refills" = "Active Refills"; -"synthreel_claim_all" = "synthreel_claim_all"; +"synthreel_claim_all" = "Claim All"; "synthreel_get_refill_button_text" = "Get a Refill to Claim"; "coins_pack_tips_title" = "Subscription Rules"; "synthreel_total_reward" = "Total Reward"; @@ -86,7 +86,7 @@ "synthreel_continue" = "Claim Now"; "vip_retain_alert_text" = "Unlock every show you love!"; "vip_tip_01" = "Unlimited access to all series"; - +"synthreel_d" = "Day"; "coins_pack_tips" = "1.Coins are delivered instantly upon purchase.
2.Daily bonus coins available from the next day.
3.All coins will be revoked when the subscription expires, including both initial and daily coins."; "synthreel_price" = "price"; @@ -100,3 +100,9 @@ "pay_error_4" = "Purchase Failed"; "pay_error_5" = "There are no recoverable in-app purchases."; "pay_error_6" = "You have unfinished in-app purchases, please restore them first."; + +"synthreel_open_notification_later" = "later"; +"coins_pack_alert_title" = "Daily Reward is waiting!"; +"synthreel_claim_now" = "Claim Now"; +"synthreel_daily_coins" = "Daily Coins"; +"apns_alert_title" = "Don’t miss updates!"; diff --git a/SynthReel/Thirdparty/tokenizedHrtf 2/en.lproj/Localizable.strings b/SynthReel/Thirdparty/tokenizedHrtf 2/en.lproj/Localizable.strings index 1ea3d54..d66073e 100644 --- a/SynthReel/Thirdparty/tokenizedHrtf 2/en.lproj/Localizable.strings +++ b/SynthReel/Thirdparty/tokenizedHrtf 2/en.lproj/Localizable.strings @@ -2,7 +2,7 @@ Localizable.strings SynthReel - Created by 湖北秦九 on 2025/11/13. + Created by 澜声世纪 on 2025/11/13. Copyright © 2025 SR. All rights reserved. */