Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added shazamkit frameworks #1302

Merged
merged 4 commits into from
Aug 22, 2023
Merged

added shazamkit frameworks #1302

merged 4 commits into from
Aug 22, 2023

Conversation

vadd98
Copy link
Contributor

@vadd98 vadd98 commented Feb 9, 2023

Started importing ShazamKit frameworks. Stubs have been generated from an x64 Ventura Mac.
Still needs to fix all dependencies references.

@CuriousTommy
Copy link
Contributor

Adding the import line you suggested actually works, but now I'm struggling with other error references and I'm trying to fix all of them. Do you have any modus-operandi to suggest in order to speed up the referencing process?

At the moment, each time I add a reference I have to to rebuild in order to get the next missing reference.

The only files that would need manual modifications are the categories/extensions. Those files normally have a + in the middle. All other files should work as is (provided that you follow the instructions from the docs).

Also, don't forget to run cmake .. -DREGENERATE_SDK=ON. This command with generate symbolic links in the include and SDK folders. I don't see those symbol links in your commit.

@vadd98
Copy link
Contributor Author

vadd98 commented Feb 10, 2023

I committed the missing files. Now I'm still fixing references

@vadd98
Copy link
Contributor Author

vadd98 commented Feb 11, 2023

I'm stuck on a missing reference.
I need to import UTRefCounting but I can't find it anywhere.
This is the error I'm getting now:

In file included from /home/vinc/Desktop/darling/src/frameworks/ShazamKit/src/UTType+SHShazamAdditions.m:20:
/home/vinc/Desktop/darling/framework-include/ShazamKit/UTType+SHShazamAdditions.h:22:12: error: cannot find interface declaration for 'UTType'
@interface UTType (SHShazamAdditions)
           ^
In file included from /home/vinc/Desktop/darling/src/frameworks/ShazamKit/src/UTType+SHShazamAdditions.m:21:
In file included from /home/vinc/Desktop/darling/framework-include/UniformTypeIdentifiers/UniformTypeIdentifiers.h:25:
/home/vinc/Desktop/darling/framework-include/UniformTypeIdentifiers/NSItemProvider+UTType.h:22:12: error: cannot find interface declaration for 'NSItemProvider'
@interface NSItemProvider (UTType)
           ^
In file included from /home/vinc/Desktop/darling/src/frameworks/ShazamKit/src/UTType+SHShazamAdditions.m:21:
In file included from /home/vinc/Desktop/darling/framework-include/UniformTypeIdentifiers/UniformTypeIdentifiers.h:30:
/home/vinc/Desktop/darling/framework-include/UniformTypeIdentifiers/_UTCoreType+UTRefCounting.h:22:12: error: cannot find interface declaration for '_UTCoreType'
@interface _UTCoreType (UTRefCounting)

Any idea?

@CuriousTommy
Copy link
Contributor

CuriousTommy commented Feb 11, 2023

In the future, I recommend using code blocks (```) instead of quote blocks (>) when commenting code, so that you don't accidentally ping people.

Edit: Fixed your comment.


UTRefCounting is just a category name. What you need to look for is where the _UTCoreType class is declared in.

@interface ClassName ( CategoryName )

Looks like _UTCoreType lives in UniformTypeIdentifiers/_UTCoreType.h.

I recommend reading Apple's documentation on Objective-C categories if you want to get a better understanding on how categories works.

@vadd98
Copy link
Contributor Author

vadd98 commented Feb 11, 2023

Ah sorry about the quote block, didn't tought about that.
Anyway thanks for the support!
I fixed 2 of the missing references, but I'm still having troubles with NSItemProvider. I can see that there is a NSItemProvider.h located in framework-include/Foundation, but eventhough I try to import it with #import <Foundation/NSItemProvider.h> in NSItemsProvider+UTType.h I still get the error

@CuriousTommy
Copy link
Contributor

Weird, what you did seems correct... Push what you currently have and I'll take a look at it when I have the chance.

@vadd98
Copy link
Contributor Author

vadd98 commented Feb 12, 2023

Just pushed. Thanks again for the support!
Meanwhile I'll try again to build and fix the error, in case I solve it I'll let you know

@facekapow
Copy link
Member

Hey, just wanted to ask if you're still interested in fixing up this PR. If not, I'd be happy to fix it myself.

@vadd98
Copy link
Contributor Author

vadd98 commented Aug 18, 2023

I didn't succedded to solve the issue I had and I put everything on standby.
If you'd like to try to fix it up you are more than welcome!

vadd98 and others added 4 commits August 21, 2023 10:16
The previously generated stubs were including static/local symbols that
we don't need (since we only care about the external interface).
@facekapow facekapow merged commit 04cacae into darlinghq:master Aug 22, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants