3FFB77C22F179F3100EF9A60 /* DeepChordsSdk.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0D54E0EF2F0A61E600A80EE7 /* DeepChordsSdk.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
644D1BB5EDD3EA1D77C57786 /* Pods_DeepChordsSdk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 248D8B53B5A178ACA5867275 /* Pods_DeepChordsSdk.framework */; };
7A6613B4B617D6E71D34944C /* Pods_ShenYin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90FF0C8B0D4D6AE0933FA672 /* Pods_ShenYin.framework */; };
- 817510A595D00CAD05E3772C /* BuildFile in Frameworks */ = {isa = PBXBuildFile; };
- F2E449CAD5874BE652A69B50 /* BuildFile in Frameworks */ = {isa = PBXBuildFile; };
+ 817510A595D00CAD05E3772C /* (null) in Frameworks */ = {isa = PBXBuildFile; };
+ F2E449CAD5874BE652A69B50 /* (null) in Frameworks */ = {isa = PBXBuildFile; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
3F8F58282EBCA2B800FFC00B /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
3FD1A2912F0BC9D800A62733 /* JLAudioUnitKit.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = JLAudioUnitKit.xcframework; path = framework/JLAudioUnitKit.xcframework; sourceTree = "<group>"; };
3FD1DFF42F0E00BF00A62733 /* playboy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = playboy.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 3FFB818B2F18912400EF9A60 /* playboy copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "playboy copy-Info.plist"; path = "/Users/yaozuopan/Documents/code/ShenYin/ShenYin/playboy copy-Info.plist"; sourceTree = "<absolute>"; };
5A92F7DC2CB6E6E69D2AB23E /* Pods-DeepChordsSdk.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DeepChordsSdk.debug.xcconfig"; path = "Target Support Files/Pods-DeepChordsSdk/Pods-DeepChordsSdk.debug.xcconfig"; sourceTree = "<group>"; };
5F5DE5910965D53C2B3405B0 /* Pods-ShenYin.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ShenYin.debug.xcconfig"; path = "Target Support Files/Pods-ShenYin/Pods-ShenYin.debug.xcconfig"; sourceTree = "<group>"; };
90FF0C8B0D4D6AE0933FA672 /* Pods_ShenYin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ShenYin.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3F887BAE2E38D8DD00C98658 /* Exceptions for "ShenYin" folder in "ShenYin" target */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
+ Info.plist,
playboy.storyboard,
playboy.xcassets,
+ Sdk/CCDevice.swift,
Sdk/JoySdk/JoyCallRecord.swift,
Sdk/JoySdk/JoyChat.swift,
Sdk/JoySdk/JoyChinse2English.swift,
"/Localized: LaunchScreen.storyboard",
Assets.xcassets,
Info.plist,
+ Sdk/JoySdk/CCDevice.swift,
Sdk/JoySdk/JoyCallRecord.swift,
Sdk/JoySdk/JoyChat.swift,
Sdk/JoySdk/JoyChinse2English.swift,
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
/* Begin PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet section */
- 3FFB77C62F17A11100EF9A60 /* Exceptions for "DeepChordsSdk" folder in "Embed Frameworks" build phase */ = {
+ 3FFB77C62F17A11100EF9A60 /* Exceptions for "DeepChordsSdk" folder in "Embed Frameworks" phase from "DeepChordsSdk" target */ = {
isa = PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet;
+ attributesByRelativePath = {
+ StarburstSdk.framework = (CodeSignOnCopy, RemoveHeadersOnCopy, );
+ };
buildPhase = 3FFB77C52F17A11100EF9A60 /* Embed Frameworks */;
membershipExceptions = (
StarburstSdk.framework,
0D54E0F02F0A61E600A80EE7 /* DeepChordsSdk */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
- 3FFB77C62F17A11100EF9A60 /* Exceptions for "DeepChordsSdk" folder in "Embed Frameworks" build phase */,
+ 3FFB77C62F17A11100EF9A60 /* Exceptions for "DeepChordsSdk" folder in "Embed Frameworks" phase from "DeepChordsSdk" target */,
3FFB77C82F17A14C00EF9A60 /* Exceptions for "DeepChordsSdk" folder in "playboy" target */,
);
path = DeepChordsSdk;
buildActionMask = 2147483647;
files = (
3F469CB12F0B539600121DBD /* DeepChordsSdk.framework in Frameworks */,
- F2E449CAD5874BE652A69B50 /* BuildFile in Frameworks */,
+ F2E449CAD5874BE652A69B50 /* (null) in Frameworks */,
3FD1A2952F0BCACB00A62733 /* JLAudioUnitKit.xcframework in Frameworks */,
7A6613B4B617D6E71D34944C /* Pods_ShenYin.framework in Frameworks */,
);
files = (
3FD1DFEB2F0E00BF00A62733 /* JLAudioUnitKit.xcframework in Frameworks */,
3FFB77C12F179F3100EF9A60 /* DeepChordsSdk.framework in Frameworks */,
- 817510A595D00CAD05E3772C /* BuildFile in Frameworks */,
+ 817510A595D00CAD05E3772C /* (null) in Frameworks */,
30B13DEF1AA0E4C54D873276 /* Pods_playboy.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
3F887B9D2E38D8DC00C98658 /* Products */,
34A14A83ECF09370871C891F /* Pods */,
676B86A4BA2639E8694D56B4 /* Frameworks */,
- 3FFB818B2F18912400EF9A60 /* playboy copy-Info.plist */,
);
sourceTree = "<group>";
};
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-playboy/Pods-playboy-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
+ inputPaths = (
+ );
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-playboy/Pods-playboy-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
+ outputPaths = (
+ );
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-playboy/Pods-playboy-frameworks.sh\"\n";
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ShenYin/Pods-ShenYin-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
+ inputPaths = (
+ );
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ShenYin/Pods-ShenYin-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
+ outputPaths = (
+ );
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ShenYin/Pods-ShenYin-frameworks.sh\"\n";
--- /dev/null
+//
+// Device.swift
+// ShenYin
+//
+// Created by liangshi on 2025/12/25.
+//
+import JoyGemAI
+import DeepChordsSdk
+class CCDevice{
+ static var isJoy = true
+ static func initSdk(){
+ if CCDevice.isJoy {
+ JoySdkManager.shared.setupSdk()
+ }
+ else{
+ DcSdkManager.shared.initSdk()
+ }
+ }
+ static func translate(text:String,from:String,to:String,finished:@escaping ((stream:String,finish:Bool)?)->Void){
+ if isJoy {
+ JoyGemAIManager.shared().cancelTranslateRequest()
+ JoyGemAIManager.shared().translate(text, from: from, to: to) { result, finish in
+ finished((result,finish))
+ } error: { error in
+ finished(nil)
+ }
+ }
+ else{
+ DCText.cancelTranslateByTextWithSplit()
+ DCText.translate(text: text, from: from, to: to) { result in
+ finished(result)
+ }
+ }
+ }
+ static func summary(text:String,finished:@escaping ((stream:String,finish:Bool)?)->Void){
+ if isJoy {
+ JoyGemAIManager.shared().cancelSummaryRequest()
+ JoyGemAIManager.shared().summary(text) { text, finish in
+ finished((text,finish))
+ } error: { error in
+ finished(nil)
+ }
+ }
+ else{
+ DCText.cancelSummaryByTextWithSplit()
+ DCText.sumary(text: text) { result in
+ finished(result)
+ }
+ }
+ }
+}
+extension CCDevice{
+ static func findHeadphone(_ mode:FindType){
+ if CCDevice.isJoy {
+ var value:JoyGemFindHeadphoneMode = .all
+ switch mode {
+ case .left:
+ value = .left
+ case .right:
+ value = .right
+ case .cancel:
+ value = .cancel
+ case .all:
+ value = .all
+ }
+ JoyGemAIManager.shared().device.findHeadphone(value) { err in
+ Logger.debug("findHeadphone:\(err)");
+ }
+ }
+ else{
+ let value:UInt8 = mode == .cancel ? 0:1
+ DCDevice.shared.findDevice(state: value) { result in
+ }
+ }
+ }
+ static func getEQMode(finished:@escaping (ModeEffectsType?)->Void){
+ if CCDevice.isJoy {
+ JoyGemAIManager.shared().device.getEQMode { mode in
+ var value:ModeEffectsType = .normal
+ switch mode {
+ case .normal:
+ value = .normal
+ case .pop:
+ value = .pop
+ case .classic:
+ value = .classic
+ case .rock:
+ value = .rock
+ case .jazz:
+ value = .jazz
+ case .custom:
+ value = .custom
+ }
+ finished(value)
+ } error: { err in
+ Logger.debug("getEQMode:\(err)");
+ finished(nil)
+ }
+ }
+ else{
+ /// type, 0x00(正常模式)
+ // 0x01(流行)
+ // 0x02(经典)
+ // 0x03(爵士)
+ // 0x04(摇滚)
+ // 0x05(自定义)
+ DCDevice.shared.getEQ { (arg0,result) in
+ guard let (type,list) = arg0 else{
+ finished(nil)
+ return
+ }
+ switch type{
+ case 0:
+ finished(.normal)
+ case 1:
+ finished(.pop)
+ case 2:
+ finished(.classic)
+ case 3:
+ finished(.jazz)
+ case 4:
+ finished(.rock)
+ case 5:
+ finished(.custom)
+ default:
+ finished(nil)
+ }
+ }
+ }
+ }
+ static func setEQMode(_ type:ModeEffectsType){
+ if CCDevice.isJoy {
+ var value:JoyGemEQMode = .normal
+ switch type {
+ case .normal:
+ value = .normal
+ case .pop:
+ value = .pop
+ case .classic:
+ value = .classic
+ case .rock:
+ value = .rock
+ case .jazz:
+ value = .jazz
+ case .custom:
+ value = .custom
+ }
+
+ JoyGemAIManager.shared().device.setEQMode(value) { err in
+ Logger.debug("setEQMode:\(err)");
+ }
+ }else{
+ let value:UInt8 = UInt8(type.rawValue)
+ DCDevice.shared.setEQ(type: value) { success in
+
+ }
+ }
+ }
+
+
+ static func getCustomEQ(finished:@escaping ([NSNumber]?)->Void){
+ if CCDevice.isJoy {
+ JoyGemAIManager.shared().device.getCustomEQ { eq in
+ Logger.debug("getCustomEQ:\(eq)");
+ finished(eq.bands)
+ } error: { err in
+ Logger.debug("getCustomEQ:\(err)");
+ finished(nil)
+ }
+ }
+ else{
+ DCDevice.shared.getEQ { (arg0,result) in
+ guard let (type,list) = arg0 else{
+ finished(nil)
+ return
+ }
+ if type == 5{
+ let nums = list.map { NSNumber(value: $0) }
+ finished(nums)
+ }
+ else{
+ finished(nil)
+ }
+ }
+ }
+ }
+ static func resetCustomEQ(){
+ if CCDevice.isJoy {
+ JoyGemAIManager.shared().device.resetCustomEQ { err in
+ Logger.debug("resetCustomEQ:\(err)");
+ }
+ }
+ else{
+ let list = [
+ 0,0,0,0,0,0,0,0,0,0,0,0
+ ]
+ let dispatchGroup = DispatchGroup()
+ for (index,item) in list.enumerated() {
+ dispatchGroup.enter()
+ DCDevice.shared.setCustomEQ(index: UInt8(index), value: item) {result in
+ dispatchGroup.leave()
+ }
+ }
+ dispatchGroup.notify(queue:.main) {
+ DCDevice.shared.setEQ(type: 0x05) {result in
+ }
+ }
+ }
+ }
+ static func setCustomEQ(index:Int,value:Int){
+ if CCDevice.isJoy {
+ JoyGemAIManager.shared().device.setCustomEQ(UInt(index), withGain: value) { err in
+ Logger.debug("setCustomEQ:\(err)");
+ }
+ }
+ else{
+ DCDevice.shared.setCustomEQ(index: UInt8(index), value: value) {result in
+ }
+ }
+ }
+}
+extension CCDevice{
+// static func getMac(finished:@escaping ((_ mac:String?)->Void)) {
+// if CCDevice.isJoy {
+// JoyGemAIManager.shared().device.macAddress { edr, ble in
+// Logger.debug("edr:\(edr),ble:\(ble)");
+// finished(edr.uppercased())
+// } error: { error in
+// Logger.debug("\(error!.localizedDescription)")
+// finished(nil)
+// }
+// }
+// else{
+//// DCDevice.shared.getSoftVersion {result in
+//// finished(result)
+//// }
+// }
+// }
+ static func getDN(finished:@escaping ((_ mac:String?)->Void)) {
+ if CCDevice.isJoy {
+ JoyGemAIManager.shared().device.getDN { deviceName in
+ finished(deviceName)
+ } error: { error in
+ Logger.debug("获取dn失败","\(error!.localizedDescription)")
+ finished(nil)
+ }
+ }
+ else{
+ let dn = DCText.getDeviceName()
+ finished(dn)
+ }
+ }
+ static func getVersion(finished:@escaping ((_ version:String?)->Void)) {
+ if CCDevice.isJoy {
+ JoyGemAIManager.shared().device.software { version in
+ finished(version)
+ } error: { error in
+ Logger.debug("\(error!.localizedDescription)");
+ finished(nil)
+ }
+ }
+ else{
+ DCDevice.shared.getSoftVersion {result in
+ finished(result)
+ }
+ }
+ }
+}
m.centerY.equalTo(agreeBtn)
}
agreeValue.snp.makeConstraints { (m) in
- m.left.equalTo(agreeTitle.snp.right)
+ m.left.equalTo(agreeTitle.snp.right).offset(2)
m.centerY.equalTo(agreeBtn)
}
andlabel.snp.makeConstraints { (m) in
{
"images" : [
{
- "filename" : "server_qr.png",
+ "filename" : "20260117-094528.png",
"idiom" : "universal",
"scale" : "1x"
},
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleURLTypes</key>
- <array>
- <dict>
- <key>CFBundleTypeRole</key>
- <string>Editor</string>
- <key>CFBundleURLName</key>
- <string>weixin</string>
- <key>CFBundleURLSchemes</key>
- <array>
- <string>wxf19317f23b00d8ab</string>
- </array>
- </dict>
- </array>
- <key>LSApplicationQueriesSchemes</key>
- <array>
- <string>weixin</string>
- <string>weixinURLParamsAPI</string>
- <string>weixinULAPI</string>
- </array>
- <key>NSAppTransportSecurity</key>
- <dict>
- <key>NSAllowsArbitraryLoads</key>
- <true/>
- </dict>
- <key>UIApplicationSceneManifest</key>
- <dict>
- <key>UIApplicationSupportsMultipleScenes</key>
- <false/>
- <key>UISceneConfigurations</key>
- <dict>
- <key>UIWindowSceneSessionRoleApplication</key>
- <array>
- <dict>
- <key>UISceneConfigurationName</key>
- <string>Default Configuration</string>
- <key>UISceneDelegateClassName</key>
- <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
- <key>UISceneStoryboardFile</key>
- <string>Main</string>
- </dict>
- </array>
- </dict>
- </dict>
- <key>UIBackgroundModes</key>
- <array>
- <string>bluetooth-peripheral</string>
- <string>bluetooth-central</string>
- <string>audio</string>
- </array>
-</dict>
-</plist>