aws-amplify/amplify-swift

Build failed for arm64e: Amplify.swiftmodule is not built for arm64e

Opened this issue ยท 8 comments

Describe the bug

When trying to build my iOS application for arm64e, the build fails with the error message: Build failed because Amplify.swiftmodule is not built for arm64e. Please try a run destination with a different architecture.

I am following Apple's documentation for enabling Pointer Authentication (PAC) as per Apple's documentation. The error occurs after configuring the app to build with the arm64e architecture in Xcode and trying to archive the build.

The issue is preventing me from using security features provided by the arm64e architecture, and it seems that the current version of the Amplify framework is not compatible with this architecture.

Screenshot 2024-10-07 at 10 44 39โ€ฏAM

Steps To Reproduce

1 - Follow Apple's instructions for enabling arm64e and Pointer Authentication (PAC) from Apple Documentation. (https://developer.apple.com/documentation/security/preparing-your-app-to-work-with-pointer-authentication) 

2 - In Xcode, go to Build Settings and add arm64e to the Architectures section under $(ARCHS_STANDARD) and the Excluded Architectures field should remain empty.

3 - Import AWS Amplify in your project:
import Amplify
import AWSAPIPlugin
import AWSCognitoAuthPlugin

4 - In the AppDelegate or SceneDelegate, initialize the AWS Amplify library:

func configureAmplify() {
    do {
        try Amplify.add(plugin: AWSCognitoAuthPlugin())
        try Amplify.add(plugin: AWSAPIPlugin())
        try Amplify.configure()
        print("Amplify configured successfully")
    } catch {
        print("Failed to configure Amplify: \(error)")
    }
}

5 - Build the app targeting arm64e architecture.
6 - The build will fail with the error: Amplify.swiftmodule is not built for arm64e.

Expected behavior

The application should build successfully for arm64e architecture without throwing errors. I expect AWS Amplify and its related modules to support the arm64e architecture to allow for Pointer Authentication (PAC) on newer devices.

Amplify Framework Version

2.42.1

Amplify Categories

API, DataStore

Dependency manager

Swift PM

Swift version

5.0

CLI version

12.12.6

Xcode version

16.0 (16A242d)

Relevant log output

Build failed because Amplify.swiftmodule is not built for arm64e. Please try a run destination with a different architecture.

Is this a regression?

Yes

Regression additional context

No response

Platforms

iOS

OS Version

17

Device

iPad Pro M4/ iPad Pro M2

Additional context

This issue prevents the app from building with arm64e, which is necessary to enable Pointer Authentication (PAC) as required for additional security on newer devices. We rely heavily on AWS Amplify for data synchronization, and this is a critical blocker for compliance with our security requirements.

Hello, Thank you for posting this issue. Our team will take a look and post updates here.

Thank you very much, I will be very attentive. That is a critical security point that my application must solve.

Any Update...?

This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a ๐Ÿ‘ reaction on the request. This helps us prioritize new features most important to you. Thank you!

Hey @CarlosJaimes, we don't have any updates to report at this moment.

Since this is something that is currently not supported, I've tagged this as a feature request

Any Update...?

This feature request has not been prioritized yet. We will post updates in here once it is.

Bump