Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Built app with Xcode 15.2 crashes after AppSyncClient subscribe on iOS 16.3.1 version or lower #587

Closed
CJblaze2022 opened this issue Mar 12, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@CJblaze2022
Copy link

CJblaze2022 commented Mar 12, 2024

Describe the bug

We were working with Xcode 14.3.1 and made all the configurations to integrate appSync in our project, everything works as expected.

Recently we updated Xcode to 15.2 and the app crashes and stop working after AppSyncClient subscribe and shows EXC_BAD_ACCESS, we don't have crashes with iOS 16.6 devices or higher, crash occurs with lower iOS versions like 16.3.1, 16.1.1, 15.5, etc.

We used 3.1.2 Appsync version for our setting up, we tried with 3.6.4 and issue continues.

Currently we went back to Xcode 14.3.1 to deliver builds into TestFlight, now we are facing this apple warning (this is the reason why we switch from Xcode 14.3.1 to 15.2).

image

To Reproduce

call subscribe method for AppSyncClient.

Expected behavior

Call subscribe method for AppSyncClient without crash for devices with iOS 16.3.1 version or lower.

Screenshots

mage

Environment(please complete the following information):

  • AppSync SDK Version: [3.6.4]
  • Dependency Manager: [Cocoapods]
  • Swift Version : [5.9.2]

Device Information (please complete the following information):

  • Device: [iPad 10 generation]
  • iOS Version: [16.1.1]

Additional context

There is a related issue for amplify-flutter and it wasn't solved yet aws-amplify/amplify-flutter#4195

@sebaland sebaland added the bug Something isn't working label Mar 19, 2024
@sebaland
Copy link
Member

Hi @CJblaze2022, thanks for opening this issue.

From what I found online, this crash happens when attempting to use NWPathMonitor on builds created using Xcode 15 and targeting iOS versions lower than 12, and it only seems to affect CocoaPods.

As a quick fix, you can update both AppSyncRealTimeClient and AWSAppSync targets in your Pods project to use iOS 12.0 as the Minimum Deployment version:
ios12

Note that this will be overwritten every time you do a pod install or pod update, so if you wish to avoid that you can instead add a post-install script to your Podfile:

  post_install do |installer|   
    installer.pods_project.targets.each do |target|
      if target.name  == "AWSAppSync" || target.name  == "AppSyncRealTimeClient"
        target.build_configurations.each do |config|
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
        end
      end
    end
  end

We're already working on bumping the minimum deployments for these pods to iOS 12:

Once these are merged and released, you won't need to manually update anything.
We'll post an update here once that's done.

@CJblaze2022
Copy link
Author

hi @ruisebas so sorry for the late response, we were testing you solution (it is not easy to find iOS 15 and 16 devices 😅), we changed our minimum deployment from 11.4 to 12.0 and it solved the issue. Many thanks for your support! 🙌🏼

@sebaland
Copy link
Member

AppSync SDK 3.7.0 and AppSyncRealTimeClient 3.2.0 have been released bumping the minimum deployment target to iOS 12. Please upgrade your dependencies to the latest versions.
Thanks!

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants