[__NSCFString objectForKey:]:无法识别的选择器发送到实例 0x281eb7360

问题描述 投票:0回答:1

有人知道这个错误是什么意思吗?我正在 Flutter 中进行开发,一切工作正常,但现在当我尝试访问 Firebase Auth 时,会发生这种情况并且应用程序崩溃......

这就是错误消息:

-[__NSCFString objectForKey:]: unrecognized selector sent to instance 0x281eb7360
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString objectForKey:]: unrecognized selector sent to instance 0x281eb7360'
*** First throw call stack:
(0x1c1d32a48 0x1c1a59fa4 0x1c1c365a8 0x1c1d36af4 0x1c1d38a7c 0x103221c84 0x1c19ff184 0x1c19a69a4 0x103221bd4 0x1032235c4 0x103222408 0x103088bb8 0x10308bad0 0x103089cd0 0x103087ecc 0x1030794fc 0x10307aa10 0x103079750 0x103078f58 0x1c19fe610 0x1c19ff184 0x1c19ab404 0x1c19abdf8 0x1c19b5314 0x1c1a4eb88 0x1c1a51760)
libc++abi.dylib: terminating with uncaught exception of type NSException
* thread #9, queue = 'com.google.firebase.auth.globalWorkQueue', stop reason = signal SIGABRT
    frame #0: 0x00000001c1b29ec4 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
->  0x1c1b29ec4 <+8>:  b.lo   0x1c1b29ee0               ; <+36>
    0x1c1b29ec8 <+12>: stp    x29, x30, [sp, #-0x10]!
    0x1c1b29ecc <+16>: mov    x29, sp
    0x1c1b29ed0 <+20>: bl     0x1c1b08f64               ; cerror_nocancel
Target 0: (Runner) stopped.
Lost connection to device. 

那是我的信息。也许它里面有什么东西 ......____________________________________________________________

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>NSCameraUsageDescription</key>
    <string>your usage description here</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>your usage description here</string>
    <key>NSAppTransportSecurity</key>
    <string>for the video player to run</string>
    <key>NSLocationAlwaysUsageDescription</key>
    <string>to enhance the user experience looking for an event location</string>
    <key>CFBundleDevelopmentRegion</key>
    <string>$(DEVELOPMENT_LANGUAGE)</string>
    <key>CFBundleDisplayName</key>
    <string>Wishing Table App</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>wishing_table_app</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>$(MARKETING_VERSION)</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleIdentifier</key>
            <string></string>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
        </dict>
        <dict/>
    </array>
    <!--Facebook Dev Info-->
    <key>CFBundleURLTypes</key>
    <array>
    <dict>
        <key>CFBundleURLSchemes</key>
        <array>
        <string>fb714675723306138</string>
        <string>com.googleusercontent.apps.{key}</string>
        </array>
    </dict>
    </array>
    <!-- <key>FacebookAppID</key>
    <string>{key}</string>
    <key>FacebookClientToken</key>
    <string>{key}</string>
    <key>FacebookDisplayName</key>
    <string>Wishing Table</string>
    <key>LSApplicationQueriesSchemes</key>
    <array>
    <string>fbapi</string>
    <string>fbapi20130214</string>
    <string>fbapi20130410</string>
    <string>fbapi20130702</string>
    <string>fbapi20131010</string>
    <string>fbapi20131219</string>
    <string>fbapi20140410</string>
    <string>fbapi20140116</string>
    <string>fbapi20150313</string>
    <string>fbapi20150629</string>
    <string>fbapi20160328</string>
    <string>fbauth</string>
    <string>fb-messenger-share-api</string>
    <string>fbauth2</string>
    <string>fbshareextension</string>
    </array> -->

    <!--End-->
    <key>CFBundleVersion</key>
    <string>$(FLUTTER_BUILD_NUMBER)</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>MBXAAccessToken</key>
    <string>{key}</string>
    <key>NSCameraUsageDescription</key>
    <string>To take user profile image</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>Shows your location on the map and helps improve the map</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>Used to capture audio</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>To choose user profile image</string>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
</dict>
</plist>

这就是引发错误的文件(GTMSessionFetcher)

#if !GTM_ALLOW_INSECURE_REQUESTS
+ (BOOL)appAllowsInsecureRequests {
  // If the main bundle Info.plist key NSAppTransportSecurity is present, and it specifies
  // NSAllowsArbitraryLoads, then we need to explicitly enforce secure schemes.
#if GTM_TARGET_SUPPORTS_APP_TRANSPORT_SECURITY
  static BOOL allowsInsecureRequests;
  static dispatch_once_t onceToken;
  dispatch_once(&onceToken, ^{
    NSBundle *mainBundle = [NSBundle mainBundle];
    NSDictionary *appTransportSecurity =
        [mainBundle objectForInfoDictionaryKey:@"NSAppTransportSecurity"];
    allowsInsecureRequests =
        [[appTransportSecurity objectForKey:@"NSAllowsArbitraryLoads"] boolValue]; <<< HERE does it break
  });
  return allowsInsecureRequests;
#else
  // For builds targeting iOS 8 or 10.10 and earlier, we want to require fetcher
  // security checks.
  return YES;
#endif  // GTM_TARGET_SUPPORTS_APP_TRANSPORT_SECURITY
}
#else   // GTM_ALLOW_INSECURE_REQUESTS
+ (BOOL)appAllowsInsecureRequests {
  return YES;
}
#endif  // !GTM_
ios swift flutter firebase
1个回答
0
投票

您找到解决这个问题的方法了吗? 当我在 flutter 中使用 firebase_auth 验证电话号码时,我现在面临同样的问题..

© www.soinside.com 2019 - 2024. All rights reserved.