2

When I try to match audio signature with ShazamKit, it works without a problem in my iOS app, because I was able to add ShazamKit to my app identifier on the developer website.

Now, I am trying to do the same thing within my vapor server:

session = SHSession()       
session?.delegate = self        
session?.match(signature!)

but I am getting this error:

[core] Fired XPC service interruption handler <SHShazamKitServiceConnection: 0x600000c157d0>

I believe I should create an id(e.g app id, service identifier, media id) for my server and register it on the developer website. Whatever id I should create, I don know how to add it to my server. In the end I want to be able to make a shazam call from my Swift server app.

For my Swift vapor server, my package file looks like this:

import PackageDescription
import AppleProductTypes

let package = Package(
    name: "SwiftServer",
    platforms: [
        .macOS("12.0")
    ],
    products: [
        .executable(
            name: "SwiftServer",
            targets: ["SwiftServer"]
        )
    ],
    dependencies: [
        .package(url: "https://github.com/vapor/vapor", "4.0.0"..<"5.0.0")
    ],
    targets: [
        .executableTarget(
            name: "SwiftServer",
            dependencies: [
                .product(name: "Vapor", package: "vapor")
            ],
            resources: [
                .process("Resources")
            ]
        ),
        .testTarget(
            name: "SwiftServerTests",
            dependencies: [
                "SwiftServer"
            ]
        )
    ]
)

Appreciate any ideas.

Timmy
  • 4,098
  • 2
  • 14
  • 34
tonder
  • 324
  • 3
  • 15

1 Answers1

4

ShazamKit is not available on Linux so you might want to try looking for a different solution

0xTim
  • 5,146
  • 11
  • 23
  • Hey Tim, would you know if this is the case for time being and if there is a possibility that it could be available in the future? I am guessing there should be more services than shazam kit in a similar situation – tonder Nov 17 '22 at 04:03
  • 2
    It's a private Apple framework - it's unlikely ever to come to Linux – 0xTim Nov 17 '22 at 12:08