Extension Licensing catch 22?

How do I insert calls to licensing and test that they work before submitting my extension to Trimble?

@Bryceosaurus or @ChrisFullmer - can you clarify this one?

Hi Barry

As part of the moderation process, we have to create a test license to run your extension for testing. If there are any problems we’ll let you know. If you wanted to test sooner, I think we could send you an expiring license to test with. If you want to do that, send me your email via private message.

Cheers!
~Bryce

1 Like

I’m quite confused of how the licensing system works.

Does the licensing system require the extension to be certified? If I’ve understood the certification system correctly it’s a hash of the extension inside the extension’s folder that proves the extension is identical to how it was when being certified. I’ve assumed the license is somehow tied to this certification but maybe it is not.

Do I understand it correctly that you, @Bryceosaurus, could make up a test license associated with my user account, enter it to the licensing server and send me an extension ID associated with that license that I would then manually put inside the extension_info.txt file and as argument to License#get_extension_license to test how licensing works in a plugin I’m working on?

You have every right to be confused. In the 2 years since I originally posted this topic there has been no progress. Here are my thoughts at this point:

  1. Involving the API in license verification was a blunder. Verification should be done by SketchUp itself when it tries to load the extension. No calls from the API should be necessary.
  2. It’s impossible for an extension developer to test his licensing code adequately, even with a temporary test license. She has to keep 2 copies of his code: one for his own use and further development that omits the licensing calls, and another for upload to the warehouse will the calls. As versions evolve and you insert the calls in multiple places as you should, this leads to errors.
  3. It is unacceptable for any API to require code that is in principle untestable. This situation does not exist anywhere else that I am aware.
  4. Trimble/Google understood so little about what they were doing that the only method shown for verifying a license in the Licensing Tutorial (which no longer exists on the API documenattion) was a method that any experiences Ruby programmer could hack from the ruby console.
  5. As I discovered in another series of posts to this forum, there are extensions which can and do subvert the licensing system so that the terms of the trial are materially different from the terms that automatically appear on the extension warehouse page.

I felt these matters were serious enough that I made a personal call to Chris Fulmer almost a year ago to discuss. Since then the only thing that has changed is that the tutorial has been deleted.

1 Like

@ChrisFullmer can you weigh in on the certification requirements? I’m don’t know the latest policy.

I don’t even know what the extension_info.txt file is actually doing but if it’s technically possible it would be incredible useful with a few documented test plugin-IDs that developers can use with License#get_extension_license to test how their extensions behave when there is a license, when the license is expired, when there’s a trial or when the trial is expired.

That would have made sense. If you for some reason want additional liceinsing info, e.g. the number of days remaining, there could be an instance method on the Extension class for that. <rant>I have still no idea whether I should do anything with the days remaining info or if SketchUp already exposes that, e.g. in the Extension Manager </rant>.