C. Cannon
C. Cannon

Reputation: 49

.NET MAUI builds iOS app with the wrong Apple developer account

I have been working in .NET MAUI professionally for a little over a year.

In that time, we have developed and released an app using Visual Studio for Mac and my enterprise developer account.

Since our last release, I logged in to my personal Apple Developer account on my work laptop to install an app to my iPad using Xcode. This account has NEVER been signed in to Visual Studio, only the enterprise account has ever been signed in to visual studio.

However, now when I build my app for work using Visual Studio, it installs the app bundle in a folder associated with my personal Apple ID, instead of one associated with the enterprise account.

I am also having trouble signing this build and publishing it to the App Store, and I think this may be the root cause.

Does anyone have any experience with this at all?

Upvotes: 1

Views: 432

Answers (2)

Nabil Akhlaque
Nabil Akhlaque

Reputation: 356

I also had this exact problem. I logged out of my apple developer account and edited my project file instead. Works flawless.

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-ios|AnyCPU'">
  <ProvisioningType>manual</ProvisioningType>
  <CodesignKey>iPhone Developer</CodesignKey>
  <CodesignProvision>Testapp Development Provision</CodesignProvision>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-ios|AnyCPU'">
    <ProvisioningType>manual</ProvisioningType>
    <CodesignKey>Apple Distribution: COMPANY LLC (XXXXXXXXX)</CodesignKey>
    <CodesignProvision>Testapp dist Provision</CodesignProvision>
    <MtouchLink>None</MtouchLink>
</PropertyGroup>

Upvotes: 0

Leon Lu
Leon Lu

Reputation: 9244

it installs the app bundle in a folder associated with my personal Apple ID, instead of one associated with the enterprise account.

First of all, please open the Properties window and go to Bundle Signing tab of your iOS project. Then you could check if the Provisioning profile and Signing Identity are for your enterprise account rather than personal account.

I am also having trouble signing this build and publishing it to the App Store

Applications with Apple Developer Enterprise Program don't need to be submitted for review by Apple and cannot publish to AppStore. Please see Publish a .NET MAUI iOS app for in-house distribution - .NET MAUI | Microsoft Learn

You could try to check if your account is type of individual account. If so, you could create an App Store Connect API key and add the account in VS, then Publish a .NET MAUI iOS app for App Store distribution - .NET MAUI | Microsoft Learn.

For information about creating an App Store Connect API key, see Creating API Keys for App Store Connect API on developer.apple.com.

Upvotes: 1

Related Questions