0

I have a Unity project that uses a native ios framework from C# scripts. When I compile it for iOS app (.ipa), everything works fine. I want to compile it for macOS, too, that means Standalone build. To enable that, I check Standalone in import settings:

Screenshot

Then build the app for Standalone platform:

Screenshot

It builds an app, but it is unable to access native framework, and I don't see it inside package contents:

Screentshot

What am I missing?

annaoomph
  • 552
  • 1
  • 4
  • 22

1 Answers1

0

unable to access native framework, and I don't see it inside package contents:

The structure is: Project-Name/Assets/SDK-Name/Plugins/iOS/SDK.framework

There are two issues:

1.The directory you put the plugin.

You put the iOS plugin the Plugins/iOS folder which works fine.

For Mac OSX, you put it in the Assets/Plugins folder. This is also where you put plugins for Windows and Linux.

2.You must convert or build the plugin or framework into a bundle. This bundle is what you should place in the Assets/Plugins folder.

Programmer
  • 121,791
  • 22
  • 236
  • 328
  • How can I build an existing project into a bundle? In the guide it is only said how to create it from scratch – annaoomph Aug 30 '18 at 07:10
  • I also have my C# files that call the SDK in `Plugins/SDKName/iOS/SomeFile.cs`. When running the game, in the console I see `EntryPointNotFoundException: method_name at (wrapper managed-to-native)`. – annaoomph Aug 30 '18 at 10:44
  • Your `SomeFile.cs` should be in the `SDKName` folder not `SDKName/iOS` because you want to use it on Mac too. The files that should be in `SDKName/iOS` are the native files. The `EntryPointNotFoundException` means that it could not find the function. I do not have your code so there's really nothing I can do. I suggest you read [this](https://stackoverflow.com/a/49795660/3785314). It has the error described there and how to fix it – Programmer Aug 30 '18 at 16:59