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

Any plan to add BGHealthResearchTaskRequest? #16

Open
gajjartejas opened this issue May 2, 2024 · 1 comment
Open

Any plan to add BGHealthResearchTaskRequest? #16

gajjartejas opened this issue May 2, 2024 · 1 comment

Comments

@gajjartejas
Copy link

We can now utilize BGHealthResearchTaskRequest starting from iOS 17. However, in the code, it appears to be commented out.

We can employ a similar approach for protectionTypeOfRequiredData by using NSFileProtectionType as its type:

More detail:
https://developer.apple.com/documentation/foundation/nsfileprotectiontype

/// A String indicating file protection availability required for processing.
@property (assign) NSFileProtectionType protectionTypeOfRequiredData;

Here is commented code:

    if (@available (ios 17.0, *)) {
        BGHealthResearchTaskRequest *request = [[BGHealthResearchTaskRequest alloc] initWithIdentifier:_identifier];
        request.protectionTypeOfRequiredData = NSFileProtectionNone; // pass it from js code
        return request;
    }

I attempted to build TSBackgroundFetch.xcframework, and I noticed that within the Run Script of the build target, some code paths and codesign entries are hard-coded. Consequently, I need to remove certain code fragments to facilitate the build process.

@christocracy
Copy link
Member

Yes, I started implementing this but i had issues.

and I noticed that within the Run Script of the build target, some code paths and codesign entries are hard-coded. Consequently, I need to remove certain code fragments to facilitate the build process.

Yes, the build-script is primarily designed for my own personal usage. Almost nobody has any interest in making their own custom build of the framework.

The build-script is necessarily complex because TSBackgroundFetch.xcframework is exported to five different projects.

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

No branches or pull requests

2 participants