# Xojo universal app runs on x86 but not m1

**URL:** <https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576>\
**Category:** macOS\
**Created:** [June 6, 2024, 12:49am UTC](https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576 "2024-06-06T00:49:30Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Batson](https://forum.xojo.com/user_avatar/forum.xojo.com/steve_batson/32/5835_2.png) [@Steve\_Batson](https://forum.xojo.com/u/Steve_Batson)\
**Post date:** [June 6, 2024, 12:49am UTC](https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576/1 "2024-06-06T00:49:31Z")

</div>

I have an app that has had no issues running on x86 or M1 when built as Universal. Today, it is throwing fits on my m1 Mac mini. Right of the bat it errors out saying It can’t write to a data folder that the app uses saying it’s read only. I checked the folder and it is not read only. I haven’t had this in the past with previous Xojo versions. Is this something anyone has seen? I’m not sure if this is a Xojo issue or something else that may have changed somewhere.

---

<div class="post-metadata">

**Author:** ![Patrick\_Salo](https://forum.xojo.com/user_avatar/forum.xojo.com/patrick_salo/32/514_2.png) [@Patrick\_Salo](https://forum.xojo.com/u/Patrick_Salo)\
**Post date:** [June 6, 2024, 2:32am UTC](https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576/2 "2024-06-06T02:32:59Z")

</div>

My guess is the following…

> <https://github.com/IsmaelMartinez/teams-for-linux/issues/1225>
>
> Hello, the Mac build is now universal, but because it is unsigned, it crashes on… Apple Silicon macs on startup:
> \<img width="1042" alt="image" src="https://github.com/IsmaelMartinez/teams-for-linux/assets/120108/91492ac4-8104-4015-b622-58b5c1c6b7cd"\>
> 
> It \[appears\](https://code.videolan.org/videolan/vlc/-/issues/26432) that Apple Silicon Macs simply can't run unsigned code (not sure about that, but I was not able to find a workaround). A build from this repo signed with my developer certificate works, but that is trusted only on my machine.
> 
> I'm not about to accept Apple's $99 extortion to \_checks notes\_ be able to run code on my HW, so I guess we're looking for somebody willing to do that.
> 
> In the meantime, the universal build now crashes on start on Apple Silicon macs, instead of just being slow - I suppose we should revert  #1212?

But this is potentially a bit more clear…

[https://www.mothersruin.com/software/Apparency/faq.html](https://www.mothersruin.com/software/Apparency/faq.html)  
(see Ad-hoc signature)

Which also links to Apple which is very clear…

> **[macOS Big Sur 11.0.1 Universal Apps Release Notes | Apple Developer...](https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-universal-apps-release-notes/#Code-Signing)**
>
> Update your apps to support Macs with Apple silicon.

---

<div class="post-metadata">

**Author:** ![Patrick\_Salo](https://forum.xojo.com/user_avatar/forum.xojo.com/patrick_salo/32/514_2.png) [@Patrick\_Salo](https://forum.xojo.com/u/Patrick_Salo)\
**Post date:** [June 6, 2024, 2:50am UTC](https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576/3 "2024-06-06T02:50:46Z")

</div>

My hunch is wrong. I just tried to duplicate this with a new Xojo app, not signed and running on another computer and it runs fine with the ad-hoc signing.

---

<div class="post-metadata">

**Author:** ![Jeff\_Tullin](https://forum.xojo.com/user_avatar/forum.xojo.com/jeff_tullin/32/693_2.png) [@Jeff\_Tullin](https://forum.xojo.com/u/Jeff_Tullin)\
**Post date:** [June 6, 2024, 5:38am UTC](https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576/4 "2024-06-06T05:38:07Z")

</div>

> [@Steve\_Batson](#):
>
> It can’t write to a data folder that the app uses saying it’s read only. I checked the folder and it is not read only.

Its not read-only to you, but it may be read-only to your app if it has been translocated.  
Drag it to the desktop and leave it.  
Then drag it to applications and try again.  
If that fails, go to settings, privacy, and give it full disc access, maybe?

---

<div class="post-metadata">

**Author:** ![Steve\_Batson](https://forum.xojo.com/user_avatar/forum.xojo.com/steve_batson/32/5835_2.png) [@Steve\_Batson](https://forum.xojo.com/u/Steve_Batson)\
**Post date:** [June 6, 2024, 3:28pm UTC](https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576/5 "2024-06-06T15:28:19Z")

</div>

Hi Jeff, thanks for you response. These tips did not work.

I did find something interesting though. The app and its files had been zipped up and put on my Google drive to make available to a new user. This issue was pointed out to me and I downloaded, unzipped the file and I had the same issue.

I then simply copied the folder from my x86 Mac to my M1 Mac mini and it worked just fine. So now the question is, was it affected by the zip/unzip process, the Google Drive or a combination of both. I’ve never had this issue before.

In any case, I’m going to do some more testing to try to isolate it to where the issue occurs so I can figure out how to proceed to a solution.

---

<div class="post-metadata">

**Author:** ![Steve\_Batson](https://forum.xojo.com/user_avatar/forum.xojo.com/steve_batson/32/5835_2.png) [@Steve\_Batson](https://forum.xojo.com/u/Steve_Batson)\
**Post date:** [June 6, 2024, 3:52pm UTC](https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576/6 "2024-06-06T15:52:43Z")

</div>

I just tested the zip file and it works fine. When I download the same zip file from Google Drive, unzip and try to run it, I get the message that Apple can’t verify it. If I run anyway, it starts having other issues. Still looking into it.

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [June 6, 2024, 3:53pm UTC](https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576/7 "2024-06-06T15:53:12Z")

</div>

It was affected by being a download from the internet. This causes the translocation security feature Jeff mentioned.

With Macs, there are right and wrong ways to access FolderItems. How are you acquiring the FolderItem for this data folder? Where is it located?

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [June 6, 2024, 3:59pm UTC](https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576/8 "2024-06-06T15:59:26Z")

</div>

> [@Steve\_Batson](#):
>
> was it affected by the zip/unzip process

Some “zips” breaks apps for sure (lose some properties needed by the Mac). How are you zipping it? Prefer DMG to pack your app.

---

<div class="post-metadata">

**Author:** ![Steve\_Batson](https://forum.xojo.com/user_avatar/forum.xojo.com/steve_batson/32/5835_2.png) [@Steve\_Batson](https://forum.xojo.com/u/Steve_Batson)\
**Post date:** [June 6, 2024, 4:01pm UTC](https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576/9 "2024-06-06T16:01:08Z")

</div>

I have a folder on the desktop that I put the app and its files. There is a data folder in there that I have the a number of methods that access the folder for read or write. Here’s how I access it.

var f as New FolderItem  
f=app.AppTopFolder  
f=f.child(“ABData”).child(“contactlist.csv”)

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [June 6, 2024, 4:01pm UTC](https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576/10 "2024-06-06T16:01:52Z")

</div>

> [@Steve\_Batson](#):
>
> var f as New FolderItem  
> f=app.AppTopFolder  
> f=f.child(“ABData”).child(“contactlist.csv”)

That’s a recipe for headaches.

---

<div class="post-metadata">

**Author:** ![Steve\_Batson](https://forum.xojo.com/user_avatar/forum.xojo.com/steve_batson/32/5835_2.png) [@Steve\_Batson](https://forum.xojo.com/u/Steve_Batson)\
**Post date:** [June 6, 2024, 4:03pm UTC](https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576/11 "2024-06-06T16:03:15Z")

</div>

As far as zipping it, I’m having the Mac compress it which results in the zip file. For this particular case, a DMG is not ideal as I have this package setup with the windows and linux versions as well.

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [June 6, 2024, 4:04pm UTC](https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576/12 "2024-06-06T16:04:49Z")

</div>

You can’t assume you have access to the Desktop in Mac applications. You need to move your data storage to your own child folder of `SpecialFolder.ApplicationData`.

You can create a central DataFolder as FolderItem function like this to simplify things, but this is my recommendation:

```auto
// This should match the bundle identifier you have set up in the build settings
// Bundle identifiers should be domains that do actually exist and can be used to locate / contact you
var fData as FolderItem = SpecialFolder.ApplicationData.Child("com.mydomain.myapp")
if not fData.Exists then
  fData.CreateFolder

end

return fData

```

Edit: Re-reading your post, it also appears that you’re assuming access to files located next to the app, which you cannot do while Translocated either. If your app is code signed, notarized, and not Translocated, you can – but not until all three of those steps are satisfied.

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [June 6, 2024, 4:13pm UTC](https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576/13 "2024-06-06T16:13:09Z")

</div>

> [@Steve\_Batson](#):
>
> I’m having the Mac compress it which results in the zip file.

There are some special features that must be selected to a zipped Mac App work:

```auto
zip -r -y -9 MyAppPack.zip My_App.app

```

Recursively pack all, store symbolic links not a copy of the pointed file, best compression.

---

<div class="post-metadata">

**Author:** ![Steve\_Batson](https://forum.xojo.com/user_avatar/forum.xojo.com/steve_batson/32/5835_2.png) [@Steve\_Batson](https://forum.xojo.com/u/Steve_Batson)\
**Post date:** [June 6, 2024, 8:51pm UTC](https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576/14 "2024-06-06T20:51:52Z")

</div>

It turns out the the issue was that the Quarantine Bit was being set during the download and MacOS would not let it run. With the bit not set, the software runs fine on both x86 and M1 systems after doing the “Open Anyway” from the security options.

It looks like I’ll be getting a developer account set back up that expired a few years ago.

Thanks all for the feedback and suggestions.

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [June 7, 2024, 4:04am UTC](https://forum.xojo.com/t/xojo-universal-app-runs-on-x86-but-not-m1/80576/15 "2024-06-07T04:04:13Z")

</div>

> [@Steve\_Batson](#):
>
> the issue was that the Quarantine Bit

Add another packaging step doing a preventive clean up before zipping it too:

```auto
sudo xattr -cr My_App.app
zip -r -y -9 MyAppPack.zip My_App.app

```
