小编Nic*_*Lui的帖子

找不到带有可执行 pod 的 gem cocoapods (>= 0.a) (react-native pod install)

我刚刚开始一个反应本机项目。然而这个问题却困扰了我一天。我尝试了所有可能的方法来解决它。例如,

sudo gem uninstall cocoapods
rvm uninstall
brew install cocoapods
Run Code Online (Sandbox Code Playgroud)

然而,我却没有运气。我想指出,我可以pod --version在其他路径下,但当我尝试pod在我的项目路径下时会出现问题。我还尝试将rvm默认版本设置为2.7.5,但问题仍然发生。另外,我没有使用Apple M1

Traceback (most recent call last):
    4: from /Users/nicholas/.rvm/gems/ruby-2.7.5/bin/ruby_executable_hooks:22:in `<main>'
    3: from /Users/nicholas/.rvm/gems/ruby-2.7.5/bin/ruby_executable_hooks:22:in `eval'
    2: from /Users/nicholas/.rvm/gems/ruby-2.7.5/bin/pod:23:in `<main>'
    1: from /Users/nicholas/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems.rb:296:in `activate_bin_path'
/Users/nicholas/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems.rb:277:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) with executable pod (Gem::GemNotFoundException)
Run Code Online (Sandbox Code Playgroud)

ruby cocoapods react-native

48
推荐指数
4
解决办法
7万
查看次数

Firebase商店提供商照片网址(无法转换NSURL类型的值?)

我是Firebase的新手,我想存储提供者照片网址但是它出现错误'只能存储NSNumber,NSString,NSDictionary和NSArray类型的对象.' 我尝试了不同类型的方法,但它似乎不适用于示例let profilePicUrl = profile.photoURL as Stringlet profilePicUrl = NSString(NSURL: profile.photoURL)

这是我的方法

func createFirebaseUser(){

        let key = ref.child("user").childByAutoId().key
        if let user = FIRAuth.auth()?.currentUser{
            for profile in user.providerData{
                let uid = profile.uid
                let providerID = profile.providerID
                let displayName = profile.displayName
                let email = ""
                let profilePicUrl = profile.photoURL


                //let userDict :[String : AnyObject] = ["name": username!"profilePicUrl": profilePicUrl!]
            let profile = Profile(uid: uid, displayName: displayName!,email: email, imageUrl: profilePicUrl)

                let childUpdates = ["/user/\(key)": profile]


                ref.updateChildValues(childUpdates, withCompletionBlock: { (error, ref) -> …
Run Code Online (Sandbox Code Playgroud)

ios firebase swift

4
推荐指数
1
解决办法
1224
查看次数

标签 统计

cocoapods ×1

firebase ×1

ios ×1

react-native ×1

ruby ×1

swift ×1