How do you add built-in library block to app inventor 2?

I checked the documentation at How to Add a Built-In Library Block
but it is written that documentation is only for App Inventor Classic and not for Ai2. Is there any such document for AI2?


Some of the things still match -

and -

@Devarsh_Mavani, It is quite a big answer and it also depends upon what exactly you want to implement, but here are some common steps to add built-in blocks...

  1. Create block definitions using blockly dev tools then add them into the blocks/ folder as @Aarush_Kumar mentation in his post.
  2. Creat a code generator for your blocks and add it to the generator/yail/ folder.
  3. Add file path into ploverConfig.js.
  4. We need to add an entry for the new blocks category in the block selector panel in the appengine/ folder.
  5. We need to write Kawa Schemes for the new blocks and add them into the buildserver/ folder.

Actually currently we do not have any written documentation for adding built-in blocks in App Inventor so I gave you a brief idea if you have more questions then feel free to ask, I will try to solve your question.

4 Likes