Jump to content
Sign in to follow this  
kabiri

Delphi 12 can not find /usr/lib/swift/libswiftUIKit.dylib

Recommended Posts

Hi
in delphi 12 show this error

[DCC Error] E2597 ld: file not found: /usr/lib/swift/libswiftUIKit.dylib

Which framework do I need to add?

Delphi 12 , XCODE 13.4

Thanks

Share this post


Link to post
4 hours ago, kabiri said:

[DCC Error] E2597 ld: file not found: /usr/lib/swift/libswiftUIKit.dylib

Which framework do I need to add?

There's some instructions for adding Swift support, here. You will also need to ensure you have the Linker Options configured correctly in Project Options as per these instructions.

  • Like 1

Share this post


Link to post
5 hours ago, kabiri said:

XCODE 13.4

I have just noticed you have a version of Xcode that may not even have the Swift support mentioned earlier. Delphi 12 is able to use Xcode 15.1, so I suggest updating. If your Mac is too old to update macOS/Xcode, I suggest watching this part of this video.

  • Like 1

Share this post


Link to post
1 hour ago, Dave Nottage said:

There's some instructions for adding Swift support, here. You will also need to ensure you have the Linker Options configured correctly in Project Options as per these instructions.

I did the same thing. It works fine with Delphi 11. I thought maybe it's from XCODE. The Mac is old and I couldn't update it.

Share this post


Link to post
1 hour ago, Dave Nottage said:

I have just noticed you have a version of Xcode that may not even have the Swift support mentioned earlier. Delphi 12 is able to use Xcode 15.1, so I suggest updating. If your Mac is too old to update macOS/Xcode, I suggest watching this part of this video.

I'll take a look right now. I hope it helps. Thank you.

---Edit---
I watched this webinar online, but I am not sure if it will be helpful. I will watch it again.

Edited by kabiri

Share this post


Link to post
2 minutes ago, kabiri said:

It works fine with Delphi 11

You might need to provide more information, then - perhaps a test project that reproduces the error?

Share this post


Link to post
3 hours ago, kabiri said:

I am not sure if it will be helpful

It should be helpful if you have an older Mac and are unable to update macOS/Xcode. The link I posted is for the exact moment that @Ian Barker discusses how to solve the macOS/Xcode upgrade issue.

  • Like 1

Share this post


Link to post

hi

i update my mac to mac os 14 and xcode 15.2

and add this frimworks

Quote

Accessibility
Combine
AdServices
CoreMotion
DataDetection
UniformTypeIdentifiers

but show this warning and error :

[DCC Error] E2597 ld: warning: directory not found for option '-FC:\Users\hamid\OneDrive\Documents\Embarcadero\Studio\SDKs\iPhoneOS17.2.sdk\System\Library\PrivateFrameworks'

  ld: file not found: /usr/lib/swift/iphoneos/libswiftCompatibilityDynamicReplacements.a

[DCC Fatal Error] F2588 Linker error code: 1 ($00000001)

 

how to fix it?

Share this post


Link to post
36 minutes ago, kabiri said:

how to fix it?

Did you follow and/or check the instructions in my earlier reply?

 

 

Share this post


Link to post
41 minutes ago, Dave Nottage said:

Did you follow and/or check the instructions in my earlier reply?

 

Yes
image.thumb.png.72adf3d52576ff7bb4cb145af3bba8d4.png

 

 

*log show this error

image.thumb.png.930743c3384551a007fd418b0d738fd5.png

Directory does not exist: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/%CLANGVERSION%/
 

Edited by kabiri

Share this post


Link to post


I created the folders in the paths that it couldn't find. ("PrivateFrameworks" and "AppTrackingTransparency.framework\AppTrackingTransparency")
Now it only shows this error:
[DCC Fatal Error] F2588 Linker error code: 3221226505 ($c0000409)
I couldn't find a solution for this.

Share this post


Link to post
1 hour ago, kabiri said:

I created the folders in the paths that it couldn't find

You should not have to manually create missing folders. Even if you did, the files that the compiler needs would not be there. If there was a missing PrivateFrameworks folder, you may have to re-import the SDK using these steps:

  1. In the folder C:\Users\(username)\Documents\Embarcadero\Studio\SDKs, where (username) is the logged in user name, delete the relevant iPhoneOS SDK folder (e.g. iPhoneOS17.2.sdk)
  2. Delete the SDK from the SDK Manager in Delphi
  3. On the Mac, in the ~\PAServer\scratch-dir folder, remove any folders starting with cache-dir
  4. In Delphi, re-add the iOS SDK
  5. Repeat the steps mentioned earlier for importing Swift frameworks, ensuring that you also follow the manual step involving copying of folders.
  • Thanks 1

Share this post


Link to post

I am very grateful for your guidance.
I had done this before, but I had not emptied the "cache" folder on my Mac.
I will empty the "cache" folder on my Mac and try again.
My Mac is just very slow and it takes about 3 hours to transfer files!
I will let you know if it was successful or not after it is finished.

Share this post


Link to post
On 2/25/2024 at 1:11 AM, Dave Nottage said:

You should not have to manually create missing folders. Even if you did, the files that the compiler needs would not be there. If there was a missing PrivateFrameworks folder, you may have to re-import the SDK using these steps:

  1. In the folder C:\Users\(username)\Documents\Embarcadero\Studio\SDKs, where (username) is the logged in user name, delete the relevant iPhoneOS SDK folder (e.g. iPhoneOS17.2.sdk)
  2. Delete the SDK from the SDK Manager in Delphi
  3. On the Mac, in the ~\PAServer\scratch-dir folder, remove any folders starting with cache-dir
  4. In Delphi, re-add the iOS SDK
  5. Repeat the steps mentioned earlier for importing Swift frameworks, ensuring that you also follow the manual step involving copying of folders.

I followed the steps, it didn't make a difference, it gives an error

[DCC Error] E2597 ld: file not found: /System/Library/Frameworks/AppTrackingTransparency.framework/AppTrackingTransparency

Share this post


Link to post
2 minutes ago, kabiri said:

I followed the steps, it didn't make a difference, it gives an error

[DCC Error] E2597 ld: file not found: /System/Library/Frameworks/AppTrackingTransparency.framework/AppTrackingTransparency

If your project requires AppTrackingTransparency, you also need to add that framework to the SDK, as per these instructions.

  • Thanks 1

Share this post


Link to post

I have previously compiled the program without this framework in Delphi 11 .
I have no idea what AppTrackingTransparency is used for.
But I added it to the frameworks and it no longer gives an error.

Edited by kabiri

Share this post


Link to post
Just now, kabiri said:

I have previously compiled the program without this Delphi 11 framework.

Which program? What libraries is your program using?

Share this post


Link to post
1 minute ago, Dave Nottage said:

Which program? What libraries is your program using?

I only used admob (from kastri)

Share this post


Link to post
2 minutes ago, kabiri said:

I only used admob (from kastri)

Which has changed in the last few weeks, and is now dependent on AppTrackingTransparency. See the updated readme.

  • Thanks 1

Share this post


Link to post
1 hour ago, kabiri said:

I apologize, I had only paid attention to this part.

Thanks.. I've updated the readme now.

  • Thanks 1

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
Sign in to follow this  

×