Jump to content
Francisco

Error in iOS "file was built for which is not the architecture being linked (arm64)"

Recommended Posts

I have a project that compiles for iOS 64 bits perfectly when SDK is 11.2

 

When compiling for SDK 12.1 I obtain this error:

 

[DCC Error] E2597 NYI lto::archName

  ld: file was built for  which is not the architecture being linked (arm64): C:\Users\Paco\Documents\Embarcadero\Studio\SDKs\iPhoneOS12.1.sdk/System/Library/Frameworks/MessageUI.framework/MessageUI.tbd for architecture arm64

 

I have been reading the same problem in other forums, but, honestly, I cannot understand how to solve it for the Embarcadero compiler.

 

I am using Rio 10.3.2

 

Any help?

 

Thanks in advance.

Edited by Francisco

Share this post


Link to post

You'll need to show the code that's linking to the MessageUI framework. I expect it's attempting to link to MessageUI.tbd when it should be just MessageUI (i.e. no extension), and/or you've added the framework incorrectly to the SDK.

Share this post


Link to post
19 hours ago, Dave Nottage said:

You'll need to show the code that's linking to the MessageUI framework. I expect it's attempting to link to MessageUI.tbd when it should be just MessageUI (i.e. no extension), and/or you've added the framework incorrectly to the SDK.

Dave, thanks for taking your time.

 

The same code is working for SDK 11.2. So I think the problems is not in the code.

 

Anyway, I obtained the code from this post:

https://www.woll2woll.com/single-post/2017/04/24/Send-an-Email-with-an-Attachment-FireMonkey

 

Here is the link to the pas file:

https://github.com/roywoll/wwEmailWithAttachment_FMX/blob/master/wwEmailWithAttachment.pas

 

where we can read:

const

libMessageUI = '/System/Library/Frameworks/MessageUI.framework/MessageUI';

 

I changed to:

libMessageUI = '/System/Library/Frameworks/MessageUI.framework/MessageUI.tdb'; 

 

Same error message.

 

However, it is true that I have problems to import the sdk from the Mac. When I click "Update Local File Cache" I can check that in the PC SDK directory list the MessageUI.framework directory is not copied from the Mac.

I do not know what I am doing wrong, because it seems quite easy to do. No error message is shown after clicking on "Update Local File Cache" . A picture follows showing the SDK manager of RAD Studio.

 

https://ibb.co/CnKLCQn

 

 

What I am doing to solve this issue is copying form MAC Xcode the directory to the PC SDK directory.  I think (not 100% sure) that I had to do the same for Tokyo (copying from the MAC). But it seems that now it does not work.

Edited by Francisco

Share this post


Link to post

You have not added the MessageUI framework correctly, since it is appearing in "Other Paths", rather than "Frameworks". Please remove that entry and:

 

  1. Select an existing framework listed in the "Frameworks" section - this will ensure that none of the radio buttons are selected when the Add Remote Path item dialog shows
  2. Click the Add button
  3. In the Path on remote machine combo, enter:  $(SDKROOT)/System/Library/Frameworks
  4. In Framework name, enter: MessageUI
  5. Click OK
  6. Click Update Local File Cache
  7. Click Save

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×