Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/112.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 使用Firebase创建寄存器功能时,Swift 3出错_Ios_Swift_Firebase_Swift3_Firebase Authentication - Fatal编程技术网

Ios 使用Firebase创建寄存器功能时,Swift 3出错

Ios 使用Firebase创建寄存器功能时,Swift 3出错,ios,swift,firebase,swift3,firebase-authentication,Ios,Swift,Firebase,Swift3,Firebase Authentication,我正在使用Firebase在Xcode中开发聊天应用程序&每次我输入详细信息并单击Register时,都会出现以下错误: 2017-03-08 22:05:45.757934 wapp[804:226081] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.ap

我正在使用Firebase在Xcode中开发聊天应用程序&每次我输入详细信息并单击Register时,都会出现以下错误:

2017-03-08 22:05:45.757934 wapp[804:226081] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2017-03-08 22:05:45.766072 wapp[804:226081] [MC] Reading from public effective user settings.
2017-03-08 22:05:49.211930 wapp[804:226158] 0x1701576b0 Copy matching assets reply: XPC_TYPE_DICTIONARY  <dictionary: 0x1701576b0> { count = 1, transaction: 0, voucher = 0x0, contents =
    "Result" => <int64: 0x170222460>: 29
}
2017-03-08 22:05:49.218786 wapp[804:226158] 0x170158260 Daemon configuration query reply: XPC_TYPE_DICTIONARY  <dictionary: 0x170158260> { count = 2, transaction: 0, voucher = 0x0, contents =
    "Dictionary" => <dictionary: 0x1701581b0> { count = 1, transaction: 0, voucher = 0x0, contents =
        "ServerURL" => <dictionary: 0x170158100> { count = 3, transaction: 0, voucher = 0x0, contents =
            "com.apple.CFURL.magic" => <uuid: 0x170243c00> C3853DCC-9776-4114-B6C1-FD9F51944A6D
            "com.apple.CFURL.string" => <string: 0x170249ab0> { length = 30, contents = "https://mesu.apple.com/assets/" }
            "com.apple.CFURL.base" => <null: 0x1aca0fe80>: null-object
        }
    }
    "Result" => <int64: 0x170222b40>: 0
}
2017-03-08 22:05:49.222048 wapp[804:226158] [MobileAssetError:29] Unable to copy asset information from https://mesu.apple.com/assets/ for asset type com.apple.MobileAsset.TextInput.SpellChecker
2017-03-08 22:05:51.059259 wapp[804:226144] 0x170157e40 Copy matching assets reply: XPC_TYPE_DICTIONARY  <dictionary: 0x170157e40> { count = 2, transaction: 0, voucher = 0x0, contents =
    "Assets" => <data: 0x170663080>: { length = 4531 bytes, contents = 0x62706c6973743030d400010002000300040005000601a801... }
    "Result" => <int64: 0x170223440>: 0
}
2017-03-08 22:05:51.076469 wapp[804:226144] 0x170157d90 Copy assets attributes reply: XPC_TYPE_DICTIONARY  <dictionary: 0x170157d90> { count = 2, transaction: 0, voucher = 0x0, contents =
    "Attributes" => <data: 0x170664180>: { length = 302 bytes, contents = 0x62706c6973743030d40102030405061a1b58247665727369... }
    "Result" => <int64: 0x170225820>: 0
}
2017-03-08 22:05:51.083455 wapp[804:226144] 0x174157760 Copy assets attributes reply: XPC_TYPE_DICTIONARY  <dictionary: 0x174157760> { count = 3, transaction: 0, voucher = 0x0, contents =
    "Attributes" => <data: 0x174a6dcc0>: { length = 515 bytes, contents = 0x62706c6973743030d4010203040506232458247665727369... }
    "Result" => <int64: 0x174228c60>: 0
    "SandboxExtension" => <string: 0x17425ad30> { length = 258, contents = "f830455e55a12e4770dcf1a97c2776f1ec0d21e8;00000000;00000000;0000000000000015;com.apple.assets.read;00000001;01000003;000000000001d4e5;/private/var/MobileAsset/Assets/com_apple_MobileAsset_LinguisticData/12124144ce3f42648e61a6a8064d2fb9b2d42605.asset/AssetData" }
}
2017-03-08 22:05:51.091697 wapp[804:226144] 0x170158260 Copy assets attributes reply: XPC_TYPE_DICTIONARY  <dictionary: 0x170158260> { count = 2, transaction: 0, voucher = 0x0, contents =
    "Attributes" => <data: 0x170660ac0>: { length = 302 bytes, contents = 0x62706c6973743030d40102030405061a1b58247665727369... }
    "Result" => <int64: 0x170225460>: 0
}
2017-03-08 22:05:51.097962 wapp[804:226144] 0x170156160 Copy assets attributes reply: XPC_TYPE_DICTIONARY  <dictionary: 0x170156160> { count = 3, transaction: 0, voucher = 0x0, contents =
    "Attributes" => <data: 0x170664380>: { length = 515 bytes, contents = 0x62706c6973743030d4010203040506232458247665727369... }
    "Result" => <int64: 0x170227140>: 0
    "SandboxExtension" => <string: 0x170246cf0> { length = 258, contents = "b14c014aebf7c920f6a59b1d027c4314a3c0578a;00000000;00000000;0000000000000015;com.apple.assets.read;00000001;01000003;000000000001d4f2;/private/var/MobileAsset/Assets/com_apple_MobileAsset_LinguisticData/2e428a59a8c74acf82b249f73fcbbc785b892f69.asset/AssetData" }
}
2017-03-08 22:05:58.289944 wapp[804:226081] *** Terminating app due to uncaught exception 'InvalidFirebaseData', reason: '(setValue:withCompletionBlock:) Cannot store object of type UITextField at username. Can only store objects of type NSNumber, NSString, NSDictionary, and NSArray.'
*** First throw call stack:
(0x18dc521c0 0x18c68c55c 0x1000e2a68 0x1000e1f70 0x1000e24a8 0x1000e1f70 0x1000e1ea4 0x100111130 0x100110f68 0x10003b784 0x10003a11c 0x10003a218 0x10003a344 0x100d2d25c 0x100d2d21c 0x100d32284 0x18dbfff2c 0x18dbfdb18 0x18db2c048 0x18f5b2198 0x193b182fc 0x193b13034 0x10003d420 0x18cb105b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 
任何帮助都将不胜感激

问题是:

而不是:

   let userData : [String : Any] = ["email" : self.emailTxtField!,
                                                         "uid" : uid!,
                                                         "username" : self.usernameTxtField!]
使用:

self.emailTxtField!。text和self.usernameTxtField!。文本起作用。您正在尝试设置UITextField-错误已经指出:

2017-03-08 22:05:58.289944 wapp[804:226081] *** Terminating app due to uncaught exception 'InvalidFirebaseData', reason: '(setValue:withCompletionBlock:) Cannot store object of type UITextField at username. Can only store objects of type NSNumber, NSString, NSDictionary, and NSArray.'
*** First throw call stack:

工作得很有魅力。谢谢:D
   let userData : [String : Any] = ["email" : self.emailTxtField!.text,
                                                         "uid" : uid!,
                                                         "username" : self.usernameTxtField!.text]
2017-03-08 22:05:58.289944 wapp[804:226081] *** Terminating app due to uncaught exception 'InvalidFirebaseData', reason: '(setValue:withCompletionBlock:) Cannot store object of type UITextField at username. Can only store objects of type NSNumber, NSString, NSDictionary, and NSArray.'
*** First throw call stack: