Forum Xamarin.iOS
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

ERROR ITMS-90240: "Unsupported Architectures"

SauravAnandSauravAnand USMember ✭✭


I'm trying to publish Xamarin.Mac app with the help of Application Loader but getting few errors and one of them is like:

ERROR ITMS-90240: "Unsupported Architectures. Your executable contained the following disallowed architectures: '[i386 (in]'.

There are two options in the Architecture Dropdown (i386 & x86_64) and i have selected x86_64 which indicates for 64 bit.

I have searched online and got many results about fix but didn't get it clearly how to proceed with it. Also read about Lipo command but couldn't get how to start with it using my Terminal.

One solution from ([])

-Open Terminal
-open your project drag path of respective framework to Terminal
-example : cd /Users/MAC/Desktop/MyProject/Alamofire.framework
-set your Framework name in below command and run
-lipo -remove i386 Alamofire -o Alamofire && lipo -remove x86_64 Alamofire -o Alamofire

I didn't get the framework path here (how to get that).

Please help me. Thank you.


Best Answer


  • IvanIcinIvanIcin USMember ✭✭✭

    As far as I can read your description, you have x386 in dylib file: libMonoPosixHelper.dylib. If you can fix dylib file that is the only way to do it. But it is not related to Xamarin in any way as far as I can tell.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    So close @Ivanlcin but that is a built in library in Xamarin.Mac.

    I believe this bug is fixed in newer Xamarin.Macs:

    What version of Xamarin.Mac are you using?

    If you are stuck with an earlier version, you can use a work around like this:

    but upgrading would obviously be preferable.

  • SauravAnandSauravAnand USMember ✭✭

    Thank you @IvanIcin @ChrisHamons

    @IvanIcin Yes i guess need to fix dylib file as a temporary solution.

    @ChrisHamons I'm using Xamarin.Mac version

    I Have downloaded LipoExample yesterday itself and found it's using CustomBuildActions.targets file which consist of Lipo command to execute but can you please guide me on how to add this up in my existing Xamarin.Mac project?

    Do i need to add it like any other file or there are any other way to add it?

    Thank you.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    If you are uncomfortable adding custom logic to your build, I would strongly suggest updating to which is in the stable channel. shows some of the steps to add custom logic to your build and is a complete example, but it can be non-trivial to learn msbuild quickly.

  • SauravAnandSauravAnand USMember ✭✭

    Thank you @ChrisHamons . I will try to update Xamarin.Mac and see how it goes. Updating Xamarin.Mac to will resolve the issue?

    Also will give custom logic a spin.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    Yes, 4.4 (d15-7) contains logic to handle this case Apple introduced.

  • SauravAnandSauravAnand USMember ✭✭
    edited August 2018

    @ChrisHamons updating Xamarin.Mac worked but for one of my application didn't go well and getting the same Unsupported Architectures error.

    I would like to tell you that there is no any option to specify x86_64 under Mac Build tab option of Project properties.

    There is only one under Platform dropdown is 'AnyCPU'.

    when i opened .csproj in texteditor then found below lines:

    <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectTypeGuids>{42C0BBD9-55CE-4FC1-8D90-A7348ABAFB23};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectGuid>{4C945AF1-1CBD-4930-8AFB-0D8F506F22FD}</ProjectGuid> <OutputType>Exe</OutputType> <RootNamespace>MyProject</RootNamespace> <MonoMacResourcePrefix>Resources</MonoMacResourcePrefix> <AssemblyName>MyProject</AssemblyName> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> </PropertyGroup>

    Please see below screen shots of General & Mac build tab:

    Please suggest how i can resolve this error from my current project.
    Let me know if need of any further input.

    Thank you.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    @SauravAnand - The application in question appears to be Classic Xamarin.Mac (referencing XamMac) still, did you forget to migrate it to unified?

  • SauravAnandSauravAnand USMember ✭✭

    @ChrisHamons I have migrated my project to unified successfully. Perviously i was using Framework: Mono/.Net 4.5 (which is unsupported) but moving on to Xamarin.Mac .Net 4.5 Framework is little bit pain right now for me due to multiple library level issues.

    Can i still use Mono/.Net 4.5 framework and choose x86_64 architecture or i have to switch to Xamarin.Mac .Net 4.5 Framework immediately?

    When i select Mono/.Net 4.5 and proceed to build app then getting few errors like below:

    Why i'm getting MonoMac error here i couldn't understand.
    Please help.

  • SauravAnandSauravAnand USMember ✭✭

    When i'm using Xamarin.Mac .Net 4.5 Framework getting below errors while building project.

    It's not identifying MonoMac, System.Drawing, System.Web.Util, System.Management etc. Could you please advice as i want to shift my project to recommended Xamarin.Mac .Net 4.5 Framework.

    Please help.
    Thank you.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    Did you use the migration tool?

    MonoMac doesn't exist Unified world, so those namespaces need to be updated. Instead of using MonoMac.Appkit we have using AppKit.

    None of these are going to work at all in 4.5: System.Web.Util, System.Management. You can ls /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/4.5/ and see the list of assemblies we ship in our supported set. I would strongly suggest moving away from them, but if that is not possible you'll need to move to the unsupported "System" framework option ( that allows linking against the copies in your system wide isntall.

    System.Drawing is a special case, the implementation in mono uses a native library (libgdiplus) which has broken a number of times over the last few years and has a number of limitations, thus we never shipped in Unified for a reason. I would suggest looking into or moving away from it and toward painting on a native CoreGraphics Layer.

  • SauravAnandSauravAnand USMember ✭✭
    edited August 2018

    Hi @ChrisHamons , yes i have used mentioned migration tool itself.

    I have resolved many errors in my project but couldn't fix few of them such as:

    1)Error CS0030: Cannot convert type 'System.nint' to 'AppKit.NSRunResponse'

    IntPtr modalSession ;
NSRunResponse response ;

    var modal = new myController();

    modalSession = NSApplication.SharedApplication.BeginModalSession(modal.Window);

    response = NSRunResponse.Continues;

    while (modal.Running && response == NSRunResponse.Continues)

response = (NSRunResponse)NSApplication.SharedApplication.RunModalSession(modalSession); // Getting error here
NSRunLoop.Current.RunUntil(NSRunLoopMode.Default, NSDate.DistantFuture);


    2)Error CS1061: 'DataTable' does not contain a definition for 'AsEnumerable'
    -Referenced System.Data.DataSetExtensions dll also but no luck.

    3)System.Drawing: I'm still figuring this out based on your previous suggestion but till now no luck.

    Thank you.

  • SauravAnandSauravAnand USMember ✭✭

    @ChrisHamons Thank you very much. Resolved 1st issue with your suggestion, for 2nd one needed to modify the code and not using AsEnumerable. By doing so solved my problem.

    About 3rd issue i'm trying to avoid it using and proceed without it .

    I would like to ask few more query if you won't mind:

    1)App is now migrated to 64bit fully and using Xamarin.Mac .Net 4.5 Framework so can i access Photos Library photos/videos programatically (C#) so that i will get FullPath of photo and it's AlbumName (which are created by users in Photos app)?

    2)I'm using Xcode version: 8.3.1,
    macOS Sierra: 10.12.6,
    Xamarin Studio Community: Version 6.3 (build 863)
    Mono (2017-12/ea8a24b1bbf) (64-bit)

    Currently i'm experiencing some issue with Checkboxes of my application on macOS High Sierra machine.

    When i click on Checkbox, application hangs for long and not responding lastly i need to force quit every time. App is running all fine on macOS Sierra.

    Do i need to update my Xcode or Xamarin Studio? Please provide me some pointers on this.

    Thank you.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai
    1. I almost forgot how much fun the media library APIs are. You can see details and a sample here -

    2. I've not seen that specific issue. Maybe something your draw code or responding to state change is hanging something? There are two approaches I'd take:

    • Try to debug the specific issue - Try breaking when you "hang" and see what's going on, add Console.WriteLines to print state, etc
    • If that is not fruitful, you can bisect your issue. Create a branch and start removing code until you can't isolate it. Since a new Xamarin.Mac application I assume does not show the issue, there has to be something in your sample that isn't there that is triggering it.
  • SauravAnandSauravAnand USMember ✭✭

    Thank you. For accessing the Photos i need to have read permission enabled in .entitlements file but the issue is my project only contains .plist, there is not .entitlements file. How can i add this in my project and enable "" ?

    As of now i'm getting mediaSources null. (mediaSources = mediaLibrary.MediaSources;)

    -Could you please suggest me how can i get my app sandbox enabled too? I tried to add developer (team) account but it's prompting to Fastlane which i have installed and proceed to add. This has asked me credentials on terminal and i entered but don't know what happened it didn't go correctly, it showed me that added to keychain but even after this it couldn't add/fetch my account. What do i do please suggest.

    -Application Loader still doesn't recognise my project as 64bit and giving me same Unsupported Architecture error.

    Thank you.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    I guess older project templates didn't create an Entitlements.plist file. Just make a text file with this text:

    save it as Entitlements.plist, add it to your project, double click it to edit in the IDE, then set it in your Project Options -> Mac Signing -> Custom Entitlements section.

    Sandbox'ing is another setting you set in your entitlements, so once you have that setup you should be able to set it there.

    What does Project Options -> Mac Build -> Supported Architectures show? That should be x86_64 for 64-bit. If Application Loader is throwing a fit, maybe a native library you depend upon is 32-bit?

  • SauravAnandSauravAnand USMember ✭✭
    edited August 2018

    -Added Entitlement.plist file to my project and have set it in Custom Entitlement section but while project build it's giving error "/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.Common.targets: error : Could not find any available provisioning profiles for OS X"

    -Project Options -> Mac Build -> Supported Architectures: x86_64.

    -How can i identify which native library depend upon 32bit and resolve them.

    Thank you for your help.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai
    • That sounds like you don't have a provisioning profile set? Can you try making a new project in xcode and enable signing so it can fetch some certificates?
    • You could build with x86_64 and see what causes link failures. You could also use file on each native dependency and see which are 32-bit only.
  • SauravAnandSauravAnand USMember ✭✭

    Hi @ChrisHamons i've included Entitlement.plist file in my project, set provisioning profile too with no compile error but still i'm getting mediaSources is NULL by below code.

    mediaLibrary = new MLMediaLibrary(NSDictionary<NSString, NSObject>.FromObjectsAndKeys
    new NSObject[] { NSNumber.FromUInt64 ((ulong)MLMediaSourceType.Image) },
    new NSString[] { MLMediaLibrary.MediaLoadSourceTypesKey }

    var mediaSources = mediaLibrary.MediaSources;

    I have added "" entry in Entitlement.plist.

    Please suggest me what i'm doing wrong. I'm trying to get this done in Xamarin.Mac application (C#).

    My project is not sandbox enabled. Is this what causing issue? I was trying to enable it but whenever trying it asks me do following:

    -Select/add development team.
    -While adding it redirects me to this.

    -After proceeding through username & password its says that credentials has been added to keychain.
    -But after few second it give me error like below and account has not been added.

    Is there any way to add account other than FASTLANE?

    Please advice.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    Hmm, fastlane should work. Consider filing an issues about that here -

    I would suggest launching Xcode, creating a Cocoa project, adding your apple account to Preferences -> Accounts, and in the project settings "Enable Development Signing". That should sync down the certifications and such you need, then you can swap back to VSfM and try enabling sandbox again.

    The Media Library APIs don't exactly spell out what you need to do for them to work, but I think enabling sandboxing is required.

  • SauravAnandSauravAnand USMember ✭✭
    edited October 2018

    @ChrisHamons I tried to get Masters directory files but it's returning 0 always in macOS Mojave (before it was giving files).

    DirectoryInfo di = new DirectoryInfo("/Users/username/Pictures/Photos Library.photoslibrary/Masters");
    FileInfo[] images= di.GetFiles("*", SearchOption.AllDirectories);

    I'm getting images as 0 here. Is this anything to do with new macOS Mojave restrictions?

    I'm using Xamarin Studio and still couldn't add developer account using Fastlane.

    Please help.

  • SauravAnandSauravAnand USMember ✭✭

    @ChrisHamons Please help me on above issue.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    That issue seems completely unrelated to the other issue, if you want to start a discussion you should consider starting a new thread.

    In any case, you should consider using the actual PhotoKit API:

Sign In or Register to comment.