Plugin Visibility Issues on macOS for Fusion360

Plugin Visibility Issues on macOS for Fusion360

pts.user2
Contributor Contributor
886 Views
7 Replies
Message 1 of 8

Plugin Visibility Issues on macOS for Fusion360

pts.user2
Contributor
Contributor

I am having trouble getting a newly created plugin to work properly on macOS.
Initially, I created a Sample plugin directly from Fusion360 using the "Scripts and Add-Ins" option from the Utilities tab, and then integrated my code into it and built it using XCode. The plugin was visible and functioning properly in Fusion 360.

However, when I tried to create a proper folder structure with a Content folder and .xml file, and added the newly created dylib in it, the plugin became invisible.
I then tried creating a bundle by renaming the main folder and appending it with ".bundle" (Sample.bundle) and added the bundle to "/Users/{Username}/Library/Containers/com.autodesk.mas.fusion360/Data/Library/Application Support/Autodesk/ApplicationPlugins," but it is still not visible.

 

Sample.bundle

      |- PackageContents.xml

      |- Contents

              |- SampleBundle.dylib
              |- SampleBundle.manifest

              |- Docs

                     |- Sample.html
              |- Resources

                     |- SampleBundle.dwg

                     |- SampleBundle.ico

                     |-SampleBundle.html

 

sample.manifest file
{
	"autodeskProduct":	"Fusion360",
	"type":	"addin",
	"author":	"Sample",
	"description":	{
		"":	"Sample plugin for Fusion360"
	},
	"supportedOS":	"windows|mac",
	"id":	"B63D7B4D-CE4C-4C42-91C3-B709104AD3C9",
	"version":	"1.0.3",
	"runOnStartup":	true,
	"sourcewindows":	"Sample.vcxproj",
	"sourcemac":	"Sample.xcodeproj"
}

 

PackageContents.xml file
<?xml version="1.0" encoding="utf-8"?>
<ApplicationPackage SchemaVersion="1.0"
	ProductType="Application"
	AutodeskProduct="Fusion360"
	Name="Sample"
	Description="Sample plugin for Autodesk Fusion 360"
	AppVersion="1.0.3"
	Author="Sample"
	AppNameSpace="appstore.exchange.autodesk.com"
	HelpFile= "./Contents/Docs/Sample.html" 
	ProductCode="*"
	UpgradeCode="{86CC427C-5A94-41AD-BCC1-53C7C687ECB4}" >
	<CompanyDetails Name="ABC Company"
		Phone=" "
		Url="https://google.com/" 
		email="abc@gmail.com"  />

		<RuntimeRequirements SupportPath="./Contents/Docs" OS="win64|mac" Platform="Fusion360" SeriesMin=""  />

	<Components>
		<RuntimeRequirements SupportPath="./Contents/Docs" OS="win64|mac" Platform="Fusion360" SeriesMin="" />
<ComponentEntry AppName="Sample" Version="1.0.3" ModuleName="./Contents/Sample.manifest" AppDescription="Sample" />
	</Components>
	
</ApplicationPackage>

 

Can someone assist me in identifying what I am doing wrong or if I am missing anything? I am attempting to provide support for a plugin on macOS.

0 Likes
Accepted solutions (1)
887 Views
7 Replies
Replies (7)
Message 2 of 8

BrianEkins
Mentor
Mentor

I played with this a bit and narrowed it down to the bare minimum you need. In my case, here is the folder structure

 

ApplicationPlugins

     |- MyTest.bundle

          | - PackageContents.xml

          | - Contents

               | - MyTest.manifest

               | - MyTest.py

               | - Resources

 

The ApplicationPlugin folder exists to support apps from the Autodesk App Store, and they are the ones that have defined the folder structure. Fusion is also assuming that apps that are there came from the store and are following the store rules. This means a folder with the .bundle extension that contains a PackageContents.xml and a Contents folder that contains the add-in files.

 

This is also a useful location to install other add-ins because it's a consistent location, but we need to play by the store rules for Fusion to recognize the add-in. Here's the minimum I found that work where "MyTest" is the name of my add-in.

 

  • Create a MyTest.bundle folder.
  • Create a PackageContents.xml file that contains the code below. It needs to be identified as an app for Fusion360 and the manifest needs to be specified.
<?xml version="1.0" encoding="utf-8"?>
<ApplicationPackage AutodeskProduct="Fusion360">
	<Components>
		<ComponentEntry ModuleName="./Contents/MyTest.manifest"/>
	</Components>
</ApplicationPackage>

 

  • Create a "Contents" folder that contains the add-in file (.dll, .pylib, or .py), the manifest file. These two files should have the same name as the bundle folder. In my case the bundle folder is Mytest.bundle and the files are MyTest.manifest and MyTest. py

I think the problem in your case is that your mixing the names "Sample" and "SampleBundle". The only place to use bundle is the folder name.

 

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 3 of 8

pts.user2
Contributor
Contributor

Hi Brian,

Thanks for the reply.
I tried as you suggested but still the plugin is not visible.
For more reference I am attaching a Sample Project.zip which contains:
1. Source code folder
2. Sample.bundle folder: Created according to the recommended structure which is not visible
3. Sample folder : This is not according to the recommended structure but is visible if we load it from the Fusion360 directly from the ADD-INS option in Utilities tab in Design Workspace and plugin will be visible in the Utilites tab with name as "SAMPLE PLUGIN".

Can you please refer this and tell if what exactly I'm missing.

0 Likes
Message 4 of 8

BrianEkins
Mentor
Mentor

Without making any changes to your code, I copied your .bundle folder to my ApplicationPlugins folder and then ran the "Scripts and Add-Ins" command and looked on the Add-Ins tab and it is there, so Fusion is finding it.

 

BrianEkins_0-1682015890410.png

 

However, when I try to run it, I get the error below.

 

BrianEkins_1-1682016007608.png

 

I found this that was able to let me override the security and load it and it runs as expected.

https://support.apple.com/guide/mac-help/apple-cant-check-app-for-malicious-software-mchleab3a043/ma...

 

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 5 of 8

pts.user2
Contributor
Contributor

I tested the bundle on my Mac as well as another Mac, however on both machines I am unable to view the plugin in Fusion360.
Just wanted to confirm the location of the bundle at the address listed below.

/Users/{UserName}/Library/Containers/com.autodesk.mas.fusion360/Data/Library/Application Support/Autodesk/ApplicationPlugins/Autodesk/ApplicationPlugins
Please let me know if the above address location is correct and if there is any other possible reason why the plugin is not accessible.

0 Likes
Message 6 of 8

BrianEkins
Mentor
Mentor
Accepted solution

That explains the most recent problems. The correct location to install the add-in is:

 

/Users/{UserName}/Library/Application Support/Autodesk/ApplicationPlugins

 

The location you're using is an old one from when Fusion was installed from the Mac App Store, which it no longer is.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 7 of 8

pts.user2
Contributor
Contributor

Thanks Brian, it was the location issue because of which the add-in was not visible.

Now the add-in is visible in the Fusion 360.

Message 8 of 8

pts.user2
Contributor
Contributor

Hi @BrianEkins,
As you mentioned in the above message that you were getting the issue of "Plugin can't be opened because Apple cannot check it for malicious software".
We are trying to resolve this but we are having some issue.
The code we have written is in the C++ and are using XCode IDE for coding.
We have used the library template in the XCode to build the code because if we create a New Add-in directly from the Fusion360 it also uses the library template.
But now in library template we are not able to signing the bundle.
Can you help on this? Any documentation would be helpful.