Skip to content

Build failure: Cannot find '__IPHONE_OS_VERSION_MIN_REQUIRED' in scope when compiling Amplify via Swift Package Manager #4068

@MoheedZafar

Description

@MoheedZafar

Describe the bug

Description:
When integrating Amplify via Swift Package Manager, the build fails with the following error:

Cannot find '__IPHONE_OS_VERSION_MIN_REQUIRED' in scope

This happens in the file:

ASFAppInfo.m

Since __IPHONE_OS_VERSION_MIN_REQUIRED is no longer available in recent Xcode versions (and deprecated macros have been removed), the package fails to compile on the latest iOS SDK.

Steps To Reproduce

Create a new iOS project in Xcode 26

Add Amplify via Swift Package Manager.

Build the project.

Error appears in ASFAppInfo.m.

Expected behavior

Amplify should build successfully on the latest iOS SDKs without relying on deprecated macros.

Amplify Framework Version

2.48.0

Amplify Categories

Auth

Dependency manager

Swift PM

Swift version

5.9

CLI version

2.48.0

Xcode version

26.0.1 (17A400)

Relevant log output

<details>
<summary>Log Messages</summary>


INSERT LOG MESSAGES HERE

</details>

Is this a regression?

Yes

Regression additional context

No response

Platforms

No response

OS Version

Mac OS Version 26.0.1 (25A362)

Device

iPhone XR

Specific to simulators

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions