XCode 11.2, simulator iOS 11 crashes with error "dyld: lazy symbol binding failed: Symbol not found..."

576 views Asked by At

Using AWSAppSync ios sdk, trying to configure the AWSAppSyncClient, and the simulator crashes when trying to create a Reachability instance (when trying to get the UserPoolsAuthProvider):

        let appSyncConfig = try AWSAppSyncClientConfiguration(appSyncServiceConfig: AWSAppSyncServiceConfig(),
                                                              userPoolsAuthProvider: {
                                                              class MyCognitoUserPoolsAuthProvider : AWSCognitoUserPoolsAuthProviderAsync {
                                                                  func getLatestAuthToken(_ callback: @escaping (String?, Error?) -> Void) {
                                                                      AWSMobileClient.default().getTokens { (tokens, error) in
                                                                          if error != nil {
                                                                              callback(nil, error)
                                                                          } else {
                                                                              callback(tokens?.idToken?.tokenString, nil)
                                                                          }
                                                                      }
                                                                  }
                                                              }
                                                              return MyCognitoUserPoolsAuthProvider()}(),
                                                              cacheConfiguration: cacheConfiguration)

Below is the full error message:

dyld: lazy symbol binding failed: Symbol not found: _$sSo18NSNotificationNamea12ReachabilityE19reachabilityChangedABvau Referenced from: /Users/user/Library/Developer/CoreSimulator/Devices/5BD6D58E-C91E-4737-AD3B-547E9D77770B/data/Containers/Bundle/Application/F8307EF9-70B5-4834-BFC4-D340DCF4D3DD/nano-staging.app/Frameworks/AWSAppSync.framework/AWSAppSync Expected in: /Users/user/Library/Developer/CoreSimulator/Devices/5BD6D58E-C91E-4737-AD3B-547E9D77770B/data/Containers/Bundle/Application/F8307EF9-70B5-4834-BFC4-D340DCF4D3DD/nano-staging.app/Frameworks/Reachability.framework/Reachability

Using aws-mobile-appsync-sdk-ios v3.1.11 and Reachability v5.1.0, would appreciate any help immensely!

1

There are 1 answers

0
Hadi On

You can try to add "Reachability.framework" in xcode to the "Link Binary With Libraries" with the flag "optional"

enter image description here