Errors importing Apple.Core package on Windows machine

Hi,

When I try to import the com.apple.unityplugin.core-1.0.3.tgz package into Unity from my Windows development machine I get lots of errors like :

Library\PackageCache\com.apple.unityplugin.core@077039b365c9\Editor\AppleBuildStep.cs(48,136): error CS0246: The type or namespace name 'PlistDocument' could not be found (are you missing a using directive or an assembly reference?)

Is it possible to get around this so I can develop on Windows?

Thanks

Post not yet marked as solved Up vote post of Newtquest Down vote post of Newtquest
1.2k views
  • DId you solve it ? How did you generate the package ? I need to find it and I only have windows

  • You have to build these plugins as packages on a MacOS machine, afaik.

    The problem occurs when you, for example, submit to a source control repo, and then pull to a Windows machine and try to open in Unity, even if you're in iOS build mode.

Add a Comment

Replies

just add using UnityEditor.iOS.Xcode; in the script and you're good to go

Actually that line already exists, but it's ifdef'd out incorrectly to play nice with Windows. Change it to:

#if UNITY_EDITOR_OSX || (UNITY_EDITOR && UNITY_IOS)
using UnityEditor.iOS.Xcode;
#endif

Note also that fixing this is a temporary/unstable solution: If you ever wipe your Library/PackageCache folders (which happens frequently in dev practice), then this .cs file will get generated with the error again.

To properly fix this, it should be addressed in the github project (I left feedback via the apple site as the github project directs, I suggest if you're seeing this problem you do the same)

Just clear your package cache