Unity Mac Build Missing App File



A step by step training on how to submit an Unity3d game to the Mac App Store including answers to the following questions:How to setup an Apple certificate?. To access the Build Settings window, go to File Build Settings. Once you specify the build settings, select Build The process of compiling your project into a format that is ready to run on a.

Submitting a Unity3d game to the Mac App Store is a somewhat painful process. This guide refers to Unity3d 3.5 but should apply to Unity 4.0 and up.

Building

First, build your application for Mac and make sure that you uncheck Mac App Store Validation in the PlayerSettings Inspector window.

Building your App from Unity will create a .App file. Navigate to this file in Finder and right-click. Choose Show Package Contents from the context menu to open your app as a folder.

Info.plist

Navigate to the Contents directory and open the file Info.plist in your favorite text editor. You will need to make a few changes to this file.

Specifically, you will need to edit the following entries to correspond to your specific application.

The end result will look something like this:

You can get more information about these keys from the Apple developer documentation. The most notable key in need of changing is the LSApplicationCategoryType which must correspond to an actual category on the Mac App Store. You can find the LS keys documentation here.

Icons

You will need to generate an iconset matching Apple’s Human Interface Guidelines. The first step is to create all of the required icons. You will need variations of your icon supporting the following resolutions.

Place all of these icons in the same folder called icons.iconset. Now we have to drop in to Terminal and run the iconutil program to create your icns file which will be named the same as your icons folder. Running

will generate a file called icons.icns. You will need to replace the file UnityPlayer.icns with this icon file using Finder. The UnityPlayer.icns file is located in Contents -> Resources within your .App.

Entitlements

All Apps on the Mac App Store must be sandboxed. To sandbox your Unity app you have to provide an entitlements file to use during the code signing process. A fairly minimal entitlements file should look something like this.

You can read more about entitlements at the Entitlement Key Reference.

Code Signing

Now that we have our iconset and entitlements ready we can codesign our App for delivery to the Mac App Store. We have to drop back to the Terminal to run the codesign application.

You can find “XXXX” in the Keychain Access program. Look for a code signing certificate beginning with the text “3rd Party Mac Developer Application” you will need to copy this entire text to the codesign command above. You can find more details from the App Store Submission documentation.

In addition to signing your app you must sign libmono.dylib.

If you don’t have the required Keychain Access certificates you will need to create these using the Apple Member Center.

Product Building

To build your final product run productbuild from the command line.

Where “XXXX” is again from Keychain Access. This time, use the certificate beginning with “3rd Party Mac Developer Installer”.

Application Loader

You are finally ready to submit your App! Before submission you must create your App on iTunes Connect and fill out detailed app information. After your app is created launch Application Loader and click on Deliver Your App. Choose the application you created in iTunes Connect from the drop down menu and follow the prompts to choose your .pkg file that was created with the productbuild command.

Your done! Click submit and, if all went well, you will see your app will be delivered to the App Store and be ready for review.

See also

-->

This quickstart covers how to create a Unity iOS app using Azure Spatial Anchors. Azure Spatial Anchors is a cross-platform developer service that allows you to create mixed reality experiences using objects that persist their location across devices over time. When you're finished, you'll have an ARKit iOS app built with Unity that can save and recall a spatial anchor.

You'll learn how to:

  • Create a Spatial Anchors account
  • Prepare Unity build settings
  • Configure the Spatial Anchors account identifier and account key
  • Export the Xcode project
  • Deploy and run on an iOS device
Velocidrone

If you don't have an Azure subscription, create a free account before you begin.

Prerequisites

To complete this quickstart, make sure you have:

  • A macOS machine with Unity 2019.4 (LTS), the latest version of Xcode installed.
  • Git installed via HomeBrew. Enter the following command into a single line of the Terminal: /usr/bin/ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)'. Then, run brew install git and brew install git-lfs.
  • A developer enabled ARKit compatible iOS device.

Create a Spatial Anchors resource

Go to the Azure portal.

On the left pane, select Create a resource.

Use the search box to search for Spatial Anchors.

Select Spatial Anchors, and then select Create.

On the Spatial Anchors Account pane, do the following:

  • Enter a unique resource name by using regular alphanumeric characters.

  • Select the subscription that you want to attach the resource to.

  • Create a resource group by selecting Create new. Name it myResourceGroup, and then select OK.

    A resource group is a logical container into which Azure resources, such as web apps, databases, and storage accounts, are deployed and managed. For example, you can choose to delete the entire resource group in one simple step later.

  • Select a location (region) in which to place the resource.

  • Select New to begin creating the resource.

After the resource is created, the Azure portal shows that your deployment is complete.

Select Go to resource. You can now view the resource properties.

Copy the resource's Account ID value into a text editor for later use.

Also copy the resource's Account Domain value into a text editor for later use.

Under Settings, select Key. Copy the Primary key value, Account Key, into a text editor for later use.

Start by preparing your environment for the Azure CLI:

Unity Mac Build Missing App File
  • Use Azure Cloud Shell using the Bash environment.

  • If you prefer, install the Azure CLI to run CLI reference commands.

    • If you're using a local installation, sign in to the Azure CLI by using the az login command. To finish the authentication process, follow the steps displayed in your terminal. For additional sign-in options, see Sign in with the Azure CLI.
    • When you're prompted, install Azure CLI extensions on first use. For more information about extensions, see Use extensions with the Azure CLI.
    • Run az version to find the version and dependent libraries that are installed. To upgrade to the latest version, run az upgrade.
  1. After you sign in, use the az account set command to select the subscription in which to set up the spatial anchors account:

  2. Run the az group create command to create a resource group, or use an existing resource group:

    A resource group is a logical container into which Azure resources, such as web apps, databases, and storage accounts, are deployed and managed. For example, you can choose to delete the entire resource group in one simple step later.

    You can view your current spatial anchors accounts for a resource group by using the az spatial-anchors-account list command:

    You can also view the spatial anchors accounts for your subscription:

  3. Run the az spatial-anchors-account create command to create your spatial anchors account:

  4. View the resource properties by using the az spatial-anchors-account show command:

    Copy the resource Account ID value and the resource Account Domain value into a text editor for later use.

  5. Run the az spatial-anchors-account key show command to get your primary and secondary keys:

    Copy the key values into a text editor for later use.

    If you need to regenerate keys, use the az spatial-anchors-account key renew command:

You can delete an account by using the az spatial-anchors-account delete command:

Start by preparing your environment for Azure PowerShell:

  • If you choose to use Azure PowerShell locally:
    • Install the Az PowerShell module.
    • Connect to your Azure account using theConnect-AzAccount cmdlet.
  • If you choose to use Azure Cloud Shell:
    • See Overview of Azure Cloud Shell formore information.

Important

While the Az.MixedReality PowerShell module is in preview, you must install it separately usingthe Install-Module cmdlet. After this PowerShell module becomes generally available, it will bepart of future Az PowerShell module releases and available by default from within Azure CloudShell.

  1. After you sign in, use the Set-AzContext cmdlet to select the subscription in which to set up the spatial anchors account:

  2. Run the New-AzResourceGroup cmdlet to create a resource group, or use an existing resource group:

    A resource group is a logical container into which Azure resources, such as web apps, databases, and storage accounts, are deployed and managed. For example, you can choose to delete the entire resource group in one simple step later.

    You can view your current spatial anchors accounts for a resource group by using the Get-AzSpatialAnchorsAccount cmdlet:

    You can also view the spatial anchors accounts for your subscription:

  3. Run the New-AzSpatialAnchorsAccount cmdlet to create your spatial anchors account:

  4. View the resource properties by using the Get-AzSpatialAnchorsAccount cmdlet:

    Copy the property accountId value and the property accountDomain value into a text editor for later use.

  5. Run the Get-AzSpatialAnchorsAccountKey cmdlet to get your primary and secondary keys:

    Copy the key values into a text editor for later use.

    If you need to regenerate keys, use the New-AzSpatialAnchorsAccountKey cmdlet:

You can delete an account by using the Remove-AzSpatialAnchorsAccount cmdlet:

Download and open the Unity sample project

Clone the samples repository by running the following commands:

In Unity, open the project in the Unity folder. Unity might prompt you about a difference between the version in the project and the version that's installed on your machine. This warning is okay, as long as your version of Unity Editor is newer than the one that the project was created with. If your version is newer, select Continue. If your version is older than the one the project needs, select Quit, and upgrade your Unity Editor.

Open Build Settings by selecting File > Build Settings.

In the Platform section, select iOS.

Select Switch Platform to change the platform to iOS. Unity might prompt you to install iOS support components if they're missing.

Close the Build Settings window.

Configure the account information

The next step is to configure the app to use your account information. You copied the Account Key, Account ID, and Account Domain values to a text editor earlier, in the 'Create a Spatial Anchors resource' section.

On the Project pane, go to AssetsAzureSpatialAnchors.SDKResources.

Select SpatialAnchorConfig. On the Inspector pane, enter the Account Key as the value for Spatial Anchors Account Key, the Account ID as the value for Spatial Anchors Account Id, and the Account Domain as the value for Spatial Anchors Account Domain.

Export the Xcode project

Open Build Settings by selecting File > Build Settings.

Under Scenes In Build, ensure all the scenes have a check mark next to them.

Select Build. On the pane that opens, select a folder to export the Xcode project to.

When the export is complete, a folder that contains the exported Xcode project appears.

Unity mac build

Note

If a window appears with a message asking whether you want to replace or append, we recommend that you select Append, because it's faster. You should select Replace only if you're changing assets in your scene. For example, you might be adding, removing, or changing parent/child relationships, or you might be adding, removing, or changing properties. If you're only making source code changes, Append should be enough.

Unity

Open the Xcode project

Now you can open your Unity-iPhone.xcodeproj project in Xcode.

Unity Mac Build Missing App File

You can either launch Xcode and open the exported Unity-iPhone.xcodeproj project or launch the project in Xcode by running the following command from the location where you exported the project:

Select the root Unity-iPhone node to view the project settings, and then select the General tab.

Under Deployment Info, make sure that the deployment target is set to iOS 11.0.

Select the Signing & Capabilities tab and make sure that Automatically manage signing is enabled. If it's not, enable it, and then reset the build settings by selecting Enable Automatic on the pane that appears.

Deploy the app to your iOS device

Connect the iOS device to the Mac, and set the active scheme to your iOS device.

Select Build and then run the current scheme.

In the app, select BasicDemo using the arrows, then press the Go! button to run the demo. Follow the instructions to place and recall an anchor.

Unity Mac Build On Windows

When finished, stop the app by pressing Stop in Xcode.

Troubleshooting

Unity Mac Build Missing App Files

Rendering issues

When running the app, if you don't see the camera as the background (for instance you instead see a blank, blue or other textures) then you likely need to re-import assets in Unity. Stop the app. From the top menu in Unity, choose Assets -> Re-import all. Then, run the app again.

Clean up resources

In the preceding steps, you created Azure resources in a resource group. If you don't expect to need these resources in the future, you can delete them by deleting the resource group.

From the Azure portal menu or Home page, select Resource groups. Then, on the Resource groups page, select myResourceGroup.

Unity Mac Build

On the myResourceGroup page, make sure that the listed resources are the ones you want to delete.

Select Delete resource group, type myResourceGroup in the text box to confirm, and then select Delete.

Unity Mac Build Missing App File Velocidrone

Next steps

Unity Mac Build Support

In this quickstart, you created a Spatial Anchors account. You then configured and deployed an app to save and recall spatial anchors. To learn more about how to improve the app so it can share spatial anchors with other devices, continue to the next tutorial.