Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Mac Catalyst

Discussion in 'iOS and tvOS' started by Volcore, Oct 16, 2021.

  1. Volcore

    Volcore

    Joined:
    Jan 14, 2020
    Posts:
    24
    Hi everyone,

    we're trying to build our iOS game for Apple Silicon Macs with iOS app support (https://developer.apple.com/macos/iphone-and-ipad-apps/). This already works when downloading the iOS app on an M1 Mac, but has several issues as the app is running in emulation mode (examples: IAPs not working, keyboard input is very laggy, sub-optimal performance).

    We've now been trying to build the app (or for that matter, any Unity project) to support macOS deployment natively (for reference, i'm talking about this checkbox:

    Screenshot 2021-10-17 at 00.19.46.png

    As soon as I enable that checkbox and try to rebuild any project, I'm getting the following errors:

    Code (CSharp):
    1. .../Unity-iPhone.xcodeproj Building for Mac Catalyst, but the linked library 'libil2cpp.a' was built for iOS. You may need to restrict the platforms for which this library should be linked in the target editor, or replace it with an XCFramework that supports both platforms.
    2. .../Unity-iPhone.xcodeproj Building for Mac Catalyst, but the linked library 'libiPhone-lib.a' was built for iOS. You may need to restrict the platforms for which this library should be linked in the target editor, or replace it with an XCFramework that supports both platforms.
    3. .../Unity-iPhone.xcodeproj Building for Mac Catalyst, but the linked library 'baselib.a' was built for iOS. You may need to restrict the platforms for which this library should be linked in the target editor, or replace it with an XCFramework that supports both platforms.
    4.  
    The errors and screenshots above are from an out-of-the-box new project using the Mobile 3D template on the Apple Silicon 2021.2.0b16, and I've tried lots of other editor versions, all with the same issue.

    I couldn't really find much on the forums related to this, or any instructions on how to make that work (partly because Catalyst, Apple Silicon, M1 Mac all seem to be used interchangeably to mean either a native M1 build of the editor, a native M1 build of the macOS standalone build, or native macOS iOS build support).

    So, my key questions are:

    (1) Is this currently working at all?
    (2) If it is, how can I make it work?
    (3) If it is not, are there any plans to add this?

    Thanks,
    Volker
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,756
    If you want to support macOS natively, you need to build for macOS from Unity editor. You're getting that error because you built your project for iOS.
     
    Neonlyte likes this.
  3. Volcore

    Volcore

    Joined:
    Jan 14, 2020
    Posts:
    24
    The whole point is to build an iOS app with M1 mac support. Apple introduced this with the M1 macs: https://developer.apple.com/macos/iphone-and-ipad-apps/.

    The additional build target is required to properly support in app purchases, fix issues with input, and other issues.

    From your reply I understand that Unity is not currently planning to support native Apple Silicon macOS deployment of iOS apps?
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,756
    Hi, apologies for delayed response. It took a while to get a complete answer as it involved several different teams.

    Anyway, we don't support this right now. Unity iOS libraries are built for iOS only, and if you attempt to target macOS in Xcode with them via Mac Catalyst, you'll get errors. You can run apps built for iOS on M1 Macs, but they have to be built as iOS/iPadOS apps.

    Currently, this is not on our roadmap to support at all. This support request has been forwarded to our product team who will investigate the feasibility and usefulness of it before putting it on our roadmap. So even if we decided to support this, it would take at least a year and be only present in new Unity versions. Our current stance is that if you want to target macOS, you should do it via the macOS build target.

    That said, if even if we were to recompile out iOS libraries for Mac Catalyst, I don't think that would solve your input or in app purchases problems. It's still the same code, and even though the app is targeting Mac Catalyst, it will still execute the same way. These issues are not caused by the fact that the app is targeting iOS.

    If you still want to ship your game as iOS on macOS app, I would suggest digging into each problem separately. In-App purchases should be working to the best of my knowledge. Keyboard input issues are just as likely reproduce on iPad and you can report them as bugs. We are not aware of any performance issues that would specifically affect the app when running on macOS vs iPadOS or iOS (unless you're trying to render at a much higher resolution, in which case it might be expected).

    Hope this helps and I'm sorry that this is probably not what you wanted to hear.
     
  5. Volcore

    Volcore

    Joined:
    Jan 14, 2020
    Posts:
    24
    Thanks for the detailed response!

    I'll look into those issues separately then and see how far we can push this with what's there already.
     
  6. jaredDumpling

    jaredDumpling

    Joined:
    May 5, 2017
    Posts:
    1
    Are there any updates on this?
     
  7. Alex_Heizenrader

    Alex_Heizenrader

    Joined:
    May 16, 2019
    Posts:
    102
    Wondering the same!
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,756
    There have been no updates on this, we still have no plans to support it.
     
  9. evilliam

    evilliam

    Joined:
    Sep 7, 2017
    Posts:
    1
    As Catalyst is not supported I was wondering if there was any plan to have Unity as a Library working for Mac OSX?
    It's a very useful feature on iOS - and on Mac it would mean we can make fun things like Unity Screensavers, Unity iTunes Visualizers as well as having Unity be the 3D component of other UI rich apps. Any official (or unofficial) way to do this?

    I did get Unity working as a library on iOS before official support existed so even an understanding of if this is even possible and a few pointers would help
     
    Priva28 likes this.
  10. kdkdkch

    kdkdkch

    Joined:
    Oct 5, 2020
    Posts:
    2
    I want to second this, we need either Unity as a library for macOS or full support for Mac designed for iPad modes.
     
    Priva28 likes this.
  11. Priva28

    Priva28

    Joined:
    Mar 22, 2023
    Posts:
    3
    +1 on this. It's super limiting to not be able to use Unity as a library for macOS right now, so either building the iOS build for Mac Catalyst or building the Unity framework directly for macOS would be great. We essentially can't include any native UI components around a Unity project running on macOS right now which is super limiting. Even Windows supports UaaL haha. Are there plans to support this in the near future?