kln hace 1 semana
padre
commit
7735af8403

+ 4 - 2
AIPlayRingtones.xcodeproj/project.pbxproj

@@ -859,10 +859,11 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 4;
+				CURRENT_PROJECT_VERSION = 6;
 				DEVELOPMENT_TEAM = HR2R5NZ2MG;
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = AIPlayRingtones/Info.plist;
+				INFOPLIST_KEY_CFBundleDisplayName = "AI Ringtones";
 				INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
 				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
 				INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
@@ -896,10 +897,11 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 4;
+				CURRENT_PROJECT_VERSION = 6;
 				DEVELOPMENT_TEAM = HR2R5NZ2MG;
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = AIPlayRingtones/Info.plist;
+				INFOPLIST_KEY_CFBundleDisplayName = "AI Ringtones";
 				INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
 				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
 				INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;

+ 5 - 1
AIPlayRingtones/AppPage/APAudioToRingVC/APAudioToRingVC.swift

@@ -100,7 +100,11 @@ extension APAudioToRingVC {
             creatBtnView.loading = false
         } else {
             creatBtnView.setBtnEnabled(isEnabled: false)
-            creatBtnView.loading = !isAvailability
+            
+            let loading = !isAvailability
+            if creatBtnView.loading != loading {
+                creatBtnView.loading = loading
+            }
         }
     }
     

+ 4 - 4
AIPlayRingtones/AppPage/APAudioToRingVC/View/ASRTRFileView.swift

@@ -24,10 +24,10 @@ class ASRTRFileUploadView: TSBaseView {
     
     lazy var btn: UIButton = {
         let imageView = UIButton.createButton(image: .uploadFileAdd)
-//        { [weak self]  in
-//            guard let self = self else { return }
-//            clickComplete?()
-//        }
+        { [weak self]  in
+            guard let self = self else { return }
+            clickComplete?()
+        }
         return imageView
     }()
     

+ 11 - 11
AIPlayRingtones/AppPage/APLaunchVC/APLaunchVC.swift

@@ -30,24 +30,24 @@ class ASLaunchVC: UIViewController {
         }else {
             self.enterApp()
         }
-
         
-        startTimer()
         addNotifiy()
     }
 
     func addNotifiy() {
-//        TSNetworkTool.shared.startListenNetStatus { status, manager in
-//            switch status {
-//            case .reachable:
+        let networkManager = NetworkReachabilityManager.default
+        // 开始监听网络状态
+        networkManager?.startListening { status in
+            switch status {
+            case .reachable:
 //                PurchaseManager.default.requestProducts()
-//                manager?.stopListening()
-//                break
-//            default:
+                networkManager?.stopListening()
+                break
+            default:
 //                PurchaseManager.default.requestProducts()
-//                break
-//            }
-//        }
+                break
+            }
+        }
     }
 
     func enterApp() {

+ 2 - 0
AIPlayRingtones/AppPage/APMyRingVC/ASMyRingCell.swift

@@ -206,6 +206,8 @@ extension ASMyRingCell {
             
             if playSelf {
                 self.changePlayerState(state: playerState)
+            }else{
+                self.changePlayerState(state: .stop)
             }
 
         }

+ 26 - 7
AIPlayRingtones/AppPage/APMyRingVC/ASMyRingVC.swift

@@ -167,6 +167,16 @@ extension APMyRingVC{
     var dbHistory:ASDBHistory{
         return ASRMShared.ringDBHistory
     }
+    
+    
+    func modleOperation(model:ASActionInfoModel)->ASGenerateBaseOperation?{
+        if model.modelType == .ttr {
+            return ASGenerateTextToRingOperationQueue.shared.findOperation(uuid: model.uuid)
+        }else if model.modelType == .rtr {
+            return ASGenerateRingToRingOperationQueue.shared.findOperation(uuid: model.uuid)
+        }
+        return nil
+    }
 }
 
 extension APMyRingVC: SwipeCollectionViewCellDelegate {
@@ -179,13 +189,13 @@ extension APMyRingVC: SwipeCollectionViewCellDelegate {
         }
         
 
-        if let model = listModelArray.safeObj(At: indexPath.item) {
-            switch model.actionStatus {
-            case .pending,.running:
-                return nil
-            default:break
-            }
-        }
+//        if let model = listModelArray.safeObj(At: indexPath.item) {
+//            switch model.actionStatus {
+//            case .pending,.running:
+//                return nil
+//            default:break
+//            }
+//        }
         
         // 删除操作
         let deleteAction = SwipeAction(style: .destructive, title: nil) {[weak self] action, indexPath in
@@ -193,6 +203,15 @@ extension APMyRingVC: SwipeCollectionViewCellDelegate {
             showCustomAlert(message: "Are you sure to delete".localized, deleteHandler:  { [weak self]  in
                 guard let self = self else { return }
                 if let model = listModelArray.safeObj(At: indexPath.item) {
+                    
+                    switch model.actionStatus {
+                    case .pending,.running:
+                        if let operation = modleOperation(model: model) {
+                            operation.cancel()
+                        }
+                    default:break
+                    }
+
                     dbHistory.deleteListModel(id: model.id)
                     updateListView()
                     TSBusinessAudioPlayer.shared.stop()

+ 2 - 2
AIPlayRingtones/AppPage/ASBusinessWebVC/ASBusinessWebVC.swift

@@ -11,8 +11,8 @@ import WebKit
 class ASBusinessWebVC: TSBaseVC , WKNavigationDelegate {
     
     enum UrlType:String {
-        case privacy = "http://100yearslater.com/Privacy.html"
-        case terms = "https://doc-hosting.flycricket.io/hahaemoji-terms-of-use/7488c423-9bb6-480e-9a38-f52fba511335/terms"
+        case privacy = "https://doc-hosting.flycricket.io/ai-ringtones-privacy-policy/ad14f989-96c0-4f31-a711-8db8b288d0e2/privacy"
+        case terms = "https://doc-hosting.flycricket.io/ai-ringtones-terms-of-use/4f89d174-1559-453f-b12c-47a85e21cc01/terms"
 
         func getTitle() -> String {
             switch self {

+ 1 - 2
AIPlayRingtones/AppPage/ASRingGeneratorVC/ASRingGeneratorVC+load.swift

@@ -9,8 +9,7 @@ extension ASRingGeneratorVC {
     
     func createGeneratorView() -> ASGeneratorView{
         let generateInView = ASGeneratorView()
-        generateInView.animationView.setText(time: String(format: "~ %d min".localized, 2), info: "Lots of people are creating ringtones right now, so this might take a bit.".localized)
-        
+        generateInView.animationView.setText(time: String(format: "~ %d min".localized, 2), info: "It may take up a few minutes for you to receive an AI-generated ringtones. You can find your ringtones in ”Mine“ tab.".localized)
         generateInView.clickClosePage = { [weak self] in
             guard let self = self else { return }
             closePage()

+ 1 - 1
AIPlayRingtones/AppPage/ASRingGeneratorVC/ASRingGeneratorVC.swift

@@ -71,7 +71,7 @@ class ASRingGeneratorVC: ASRingGeneratorBaseVC {
         }else{
             TSCustomAlertController.show(in: self, config: TSCustomAlertController.AlertConfig(
                 message: "As you leave, your generation will be interrupted and no result.".localized,
-                messageColor: .white.withAlphaComponent(0.6),
+                messageColor: .white,
                 messageFont: .systemFont(ofSize: 16),
                 
                 cancelTitle: "Leave".localized,

+ 2 - 2
AIPlayRingtones/Data/ASDBHistoryManager.swift

@@ -166,8 +166,8 @@ extension ASRealmManager {
         if ptpHistory.listModels.count == 0,UserDefaults.standard.string(forKey: "insertRingExampleData") == nil {
             let id = Date.timestampInt
             ptpHistory.updateDatas([
-                createExampleModel(id:id,title: "DanceRingtoneExample" ,musicName: "DanceRingtoneExample.mp3",duration: 29),
-                createExampleModel(id:id+1,title: "GentleRingtoneExample" ,musicName: "GentleRingtoneExample.mp3",duration: 42)
+                createExampleModel(id:id,title: "Dance" ,musicName: "Dance.mp3",duration: 29),
+                createExampleModel(id:id+1,title: "Gentle" ,musicName: "Gentle.mp3",duration: 42)
             ])
             UserDefaults.standard.set("1", forKey: "insertRingExampleData")
             UserDefaults.standard.synchronize()