Open anivaros opened 8 years ago
Hello? Anybody here? 🕸
Hi Vasily,
This project is meant to provide the complement UI for the RMS SDK for iOS. It is not the repository for the actual RMS SDK. Currently we do not support Office files natively within the RMS SDK. It is up to the application to abstract out the RMS artifacts (license, rights etc) and embed it into those files.
If you are looking for ECMA-376 support as a new feature, or any other RMS related questions, please contact us at: AskIPTeam@microsoft.com describing your needs.
Thanks Shyam
Thank you! I'll write on email, that you provided.
Can you help me with another question (about sample app)? Sample work fine when I pass simple files like pjpg or ptxt via "Open In", but whey I trying open that file from apps Documents directory, method "+[MSProtectedData protectedDataWithProtectedFile:..." returns error "ERROR: main thread: An error occurred: There was an unexpected error when connecting to the Rights Management service. Contact the application support for further assistance.". How properly I should pass path to method's parameter?
Error Domain=RMSDomain Code=-1000 "There was an unexpected error when connecting to the Rights Management service. Contact the application support for further assistance." UserInfo={NSLocalizedFailureReason=( 0 RMSSampleApp 0x000e950e +[ErrorFactory createErrorWithLocalizedMsg:englishMsg:code:contextLogger:] + 298 1 RMSSampleApp 0x000e93ad +[ErrorFactory createErrorWithDict:code:contextLogger:] + 173 2 RMSSampleApp 0x000e9263 +[ErrorFactory createErrorWithCode:contextLogger:] + 666 3 RMSSampleApp 0x000c2d0a +[MSProtectedData completeWithInputInvalidError:completionBlock:] + 78 4 RMSSampleApp 0x000c18f5 __120+[MSProtectedData protectedDataWithProtectedFile:userId:authenticationCallback:consentCallback:options:completionBlock:]_block_invoke + 37
@anivaros I am seeing the same issue when running [MSProtectedData protectedDataWithProtection..] Error Domain=RMSDomain Code=-1000 "There was an unexpected error when connecting to the Rights Management service. Contact the application support for further assistance." Did you have a resolution when you closed this? Thanks, Kari
@kariohlsen solution is not call SDK's methods in "didFinishLaunchingWithOptions". It's looks like SDK needs more time to start. Try in "didBecomeActive" or somewhere else.
@anivaros Thanks. Also wondering did you ever get answer on MSRightsManagement SDK support of docx, xlsx, pptx files? I sent them query but haven't heard back.
The SDK on iOS just like Android works on streams. Whether the file is Docx, pptx does not impact the it ability to open a document.
@kariohlsen : This question has been answered above in this thread
The RMS SDK does not know about file structures (other than PFiles). So the application is responsible to extract the serialized publishing license and send it to the SDK to get the decryption keys (MSUserPolicy). Then you need to send in the buffer/stream that you want to decrypt using that MSUserPolicy object. We do not own the file format for Office files, so you will need to parse the format to extract the encrypted data yourself.
Hope this helps. If you have any other RMS related questions, please contact us at: AskIPTeam@microsoft.com describing your needs.
Thanks Shyam
Thanks @shiswara for the above information. I have treated the docx file as a custom protected file, extracting the PL and ended with the below error while instantiating the MSUserPolicy object with the extracted PL data. @shiswara /@kkanakas Could you please confirm if files such as docx, pptx, xslx and pdf can be as treated as custom protected files ? Below is console log
'Printing description of error: Error Domain=RMSDomain Code=-7 "The publishing license for the protected content has not been set correctly. Contact the application support for further assistance." UserInfo={NSLocalizedDescription=The publishing license for the protected content has not been set correctly. Contact the application support for further assistance., NSScenarioId=3998EB25-743B-4EEB-ADBC-910DC5158532, NSLogsPath=/var/mobile/Containers/Data/Application/0CA876D0-D65F-47DB-85FE-2D4D609963AE/Library/Application Support/MSProtection_LOG.txt, NSEnglishDescriptionKey=The publishing license for the protected content has not been set correctly. Contact the application support for further assistance., NSLocalizedFailureReason=( 0 Core 0x000000010c709700 +[ErrorFactory createErrorWithLocalizedMsg:englishMsg:code:contextLogger:] + 292 1 Core 0x000000010c709598 +[ErrorFactory createErrorWithDict:code:contextLogger:] + 180 2 Core 0x000000010c709450 +[ErrorFactory createErrorWithCode:contextLogger:] + 1064 3 Core 0x000000010c6ca628 __93+[MSAuthInfo authInfoWithPublishLicense:userId:asyncControl:consentCallback:completionBlock:]_block_invoke + 100 4 libdispatch.dylib 0x000000010d8c51dc _dispatch_call_block_and_release + 24 5 libdispatch.dylib 0x000000010d8c519c _dispatch_client_callout + 16 6 libdispatch.dylib 0x000000010d8d1200 _dispatch_queue_override_invoke + 968 7 libdispatch.dylib 0x000000010d8d67c8 _dispatch_root_queue_drain + 604 8 libdispatch.dylib 0x000000010d8d6500 _dispatch_worker_thread3 + 136 9 libsystem_pthread.dylib 0x000000018438bfac _pthread_wqthread + 1176 10 libsystem_pthread.dylib 0x000000018438bb08 start_wqthread + 4 )}`
Please, add ability to work with ECMA-376 files like .docx