TargetARM vs TargetX86

Hi, I have this code for many years which appears on a windows in my programs in order to indicate which build use a person who send me an email from my Program. And it is written in the subject, for exemple (version of my program, Build, version of Xojo) :

A propos de SyncTwoFolders 2.3.5b7 Mac INTEL - Cocoa 64-bit (2019r3.2) 

My code is :

Dim TampText as String

#If TargetWindows Then ' Est aussi X86 (Intel)
  TampText = "Windows"
#ElseIf TargetMacOS Then
  #If TargetX86 Then
    ' #If TargetCocoa Then
    TampText = "Mac INTEL" ' - Cocoa"
    ' #ElseIf TargetCarbon Then
    '   TampText = "Mac INTEL - Carbon"
    ' #Else
    ' TampText = "Mac INTEL - ???"
    ' #EndIf
    ' #ElseIf TargetPowerPC Then
    '   TampText = "Mac PPC"
  #ElseIf TargetARM Then
    TampText = "Mac ARM"
  #Else
    TampText = "???"
  #EndIf
#Else
  TampText = "???"
#EndIf

#If Target32Bit Then
  TampText = TampText + " 32-bit"
#ElseIf Target64Bit Then
  TampText = TampText + " 64-bit"
#Else
  TampText = TampText + " ??-bit"
#EndIf

TampText = TampText + " (" + RBVersionString + ")"
' #If RBVersion < 2013 Then
' TampText = TampText + " (RS)."
' #Else
' TampText = TampText + " (Xojo)."
' #EndIf

Return TampText

But on this page docs xojo TargetARM it’s not clear. I search for TargetARM but the results are 6 yers old.
I don’t have a Mac ARM and I can’t test but I will build my applications in ARM.
Can someone tell me if TargetARM will return the good result on a Desktop ARM Mac ?

It does.

1 Like

But remember, it tells you what the app was BUILT for, not the architecture on which it is being run.

1 Like

The docs say ‘compiling or running’

I don’t want to build my applications universal, I did to try and they are 2 times bigger. I did the same when Carbon -> Cocoa. The default link was Carbon and then Cocoa. Now the default is X86 and after it will be ARM (or never, depending if I switch to window, but it’s another story).

Thank you for your answer.
Note : The doc page should be updated I think. It’s written :

When building for Raspberry Pi, TargetLinux also returns True.

and Mac ARM is missing.

Already updated to:

Returns True if you are compiling or running for an ARM CPU, such as for the Raspberry Pi, macOS on Apple Silicon (M1) or iOS.

Edit: oh, you are talking about the Notes, but that is just a note for Raspberry Pi.

No, I didn’t see “macOS on Apple Silicon (M1)”, it has been updated a few minutes ago or it was already there ??? I must be tired.
Thanks again.

I updated the page earlier today after I saw your posting. Thanks for bringing to our attention.

3 Likes