Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Pull request to update for supporting LCP #68

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

drminside
Copy link

Dear Readium SDK people.

I send a pull request for SDKLanucher-iOS for supporting LCP.

Following are summary for changed files:

  1. Classes/ContainerController.m
    We added 'drmInitialize.h' file for DRM initialization.
    And we also added containerRegisterContentModules to invoke Drminitialize, which is currently disabled by definition FALSE.
    Because if it is in the compiled code, link error will be occurred due to no LCP library.
    So if user wants to include the DRM feature into the Launcher, he has to make READIUM_DRM definition as TRUE and include the Readium DRM submodule into the Launcher project,
  2. Classes/ContainerListController.m
    We have changed the way of opening EPUB by processing in separate thread.
    Because LCP needs to popup pass-phrase dialog-box waiting user input in the Readium SDK, which does not work in the same thread.
  3. Classes/drmInitialize.h
    It is added for drmInitialize() prototype whose .m code is in Readium DRM submodule
  4. SDKLauncher-iOS.xcodeproj/project.pbxproj
    Project has changed to add classes/drmIntialize.h file

This pull request does not include Readium DRM submodule, which is necessary to activate DrmInitialize() in change 1.

I think this is one of the best ways to maintain DRM feature separately against Launcher and not to shake existing project structure much.

If anyone has a better idea, please suggest us.

if (c != nil) {
[self.navigationController pushViewController:c animated:YES];
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering whether a thread is necessary here. For example, the UIAlertView dialogs for the ReadiumSDK error handler messages is handled with a much finer-grained callback, see:

dispatch_async(dispatch_get_main_queue(), ^{
});

See popErrorMessage in:

https://github.com/readium/SDKLauncher-iOS/blob/develop/Classes/ContainerController.m#L68

Note that I am not familiar with navigationController so I do not really have a good grasp of the risk of regression bugs because of the introduction of a new thread.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separate thread is necessary for core SDK to access passphrase from UI thread.
However it could be changed using dispatch_async() function as you explained.

So we have updated the PR as you recommended.

@rkwright
Copy link
Contributor

Need to figure out how this folds into the ongoing work to integrate LCP with Readium.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants