小编Ish*_*ika的帖子

"pod init"创建错误,上面写着"你需要至少git版本1.8.5才能使用CocoaPods"

我无法在我的系统中安装任何pod.因此,我从我的Mac中删除了cocoapods然后重新安装它.该过程是成功的,但是当我运行命令pod init后,错误显示在终端中:

`verify_minimum_git_version!': [!] You need at least git version 1.8.5 to use CocoaPods (Pod::Informative)
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/lib/cocoapods/command.rb:49:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
Run Code Online (Sandbox Code Playgroud)

我还检查了我的Git版本是1.8.4,但我得到任何解决方案来更新相同的.

xcode command-line-tool ios cocoapods

41
推荐指数
4
解决办法
2万
查看次数

Runkeeper登录

我在我的应用程序中使用runkeeper将其连接到并从中获取数据.点击一个按钮,它会将我引导到我在runkeeper的web应用程序上登录的浏览器,在获取访问令牌和user_Id后点击服务并返回到我的应用程序.现在再次,如果我点击我的应用程序中的按钮获取连接,它会直接要求我重定向回我的应用程序,但我想要的是每次我点击连接时,它应该要求登录.我知道我必须清除缓存和cookie,但不知道如何.

@IBAction func btnRunKeeperClicked(sender: AnyObject) {
   MSYRunKeeper.shareInstance.loginWithRunKeeper { (result, success) in
    print(result)
    if success{
        print(result)
        let accessToken = result["accessToken"] as? String ?? ""
        self.hitServiceToGetDataFromRunkeeper(accessToken)
    }else{
        print("error...")
    }

    }
 }
Run Code Online (Sandbox Code Playgroud)

func hitServiceToGetDataFromRunkeeper(accessToken:String){

    showActivityIndicator(true, inViewConroller: self, animated: true)
    let dict = HelperClass.userDefaultForAny("User_Detail")
    var userID = ""
    var serviceKey = ""
    if(dict != nil){
        userID = (dict!["userID"] as? String)!
        serviceKey = (dict!["service_key"] as? String)!
    }

    var paramDictionary = NSMutableDictionary()
    paramDictionary = ["method":"runkeeperLogin","service_key":serviceKey,"userID":userID,"runkeeperAccessToken":accessToken,"isRunkeeperConnect":"1"]

    print_debug(paramDictionary)

    FSServicesClass.sharedInstance.postWithParamater(paramDictionary, sBlock: { (result) in
        if(NSDictionary(dictionary: result).valueForKey("success")?.integerValue == 1){
            showActivityIndicator(false, …
Run Code Online (Sandbox Code Playgroud)

ios swift

7
推荐指数
1
解决办法
384
查看次数

从我的应用程序打开优步,接收和放下位置预先填充,而不使用sdk

我希望通过点击我的应用程序中的按钮来打开优步,并且不使用优步sdk预先填充拾取和下降位置.我按照链接建议深层链接但不起作用:https://developer.uber.com/docs/riders/ride-requests/tutorials/deep-links/introduction

下面给出的是我的代码

首先在这里添加优步:

<key>LSApplicationQueriesSchemes</key>
    <array>
        <string>uber</string>
    </array>
Run Code Online (Sandbox Code Playgroud)

然后在按钮操作中添加了这段代码:

let url = NSURL(string:
 "uber://?client_id=oR5_kM9B8Hsxf9BKAXZl7Pm6IcL38n9w&action=setPickup&pickup[latitude]=37.775818&pickup[longitude]=-122.418028&pickup[nickname]=UberHQ&pickup[formatted_address]=1455%20Market%20St%2C%20San%20Francisco%2C%20CA%2094103&dropoff[latitude]=37.802374&dropoff[longitude]=-122.405818&dropoff[nickname]=Coit%20Tower&dropoff[formatted_address]=1%20Telegraph%20Hill%20Blvd%2C%20San%20Francisco%2C%20CA%2094133&product_id=a1111c8c-c720-46c3-8534-2fcdd730040d&link_text=View%20team%20roster&partner_deeplink=partner%3A%2F%2Fteam%2F9383")

         if UIApplication.shared.canOpenURL(url! as URL){
             UIApplication.shared.openURL(url! as URL)
         }
Run Code Online (Sandbox Code Playgroud)

我也只是试图从我的应用程序打开优步,即使这不起作用.请提出一些解决方案.提前致谢!

ios swift uber-api

5
推荐指数
1
解决办法
750
查看次数

标签 统计

ios ×3

swift ×2

cocoapods ×1

command-line-tool ×1

uber-api ×1

xcode ×1