首页 \ 问答 \ 适用于IOS的Google Analytics(分析) - Phonegap(Google Analytics for IOS - Phonegap)

适用于IOS的Google Analytics(分析) - Phonegap(Google Analytics for IOS - Phonegap)

我需要在Phonegap应用程序中添加Google Analytics功能,我已经为Windows和Android创建了相同的功能,但它的工作正常,但对于iOS,我没有取得任何成功。

我已经浏览了一些链接,即https://github.com/phonegap-build/GAPlugin,但仍然没有成功,有人会建议完整的文档和过程。 我使用的是cordova 2.3.0。

我已尝试在原生iOS应用程序上使用它并且它有效,但我的要求是在Phonegap上。


I have a requirement of adding the Google Analytics feature on Phonegap application, I had already created the same for Windows and Android and it's working fine but for iOS, I am not getting any success.

I have gone through some of the links i.e. https://github.com/phonegap-build/GAPlugin but still no success, would anyone suggest the complete documentation and process. I am using cordova 2.3.0.

I have tried using on native iOS application and it worked but my requirement is on Phonegap.


原文:https://stackoverflow.com/questions/21883954
更新时间:2023-12-30 13:12

最满意答案

我试图通过URL http:// localhost:8785 / service / PayMentService / PayBill来调用我的服务。 但它失败了。 您需要启用默认情况下已关闭的元数据发现功能。您几乎可以在那里找到缺失的元数据

命名元服务行为的实现。

 <serviceBehaviors>
        <behavior name="metadataDiscovery">
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>

将其添加到您的付款服务。

 <service name="SelfHostedWCFService.PayMentService" behaviorConfiguration="metadataDiscovery">
        <endpoint address="" binding="basicHttpBinding" contract="SelfHostedWCFService.IPayMentService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

现在您可以浏览wsdl, http:// localhost:8733 / Design_Time_Addresses / SelfHostedWCFService / PayMentService / 。 同样,将行为标记配置添加到所有服务名称标记中。

你也解释过构造函数在调试模式下,你的代码中缺少一些东西。

 <endpointBehaviors>    
        <behavior name="JsonBehavior">   
          <webHttp/>    
        </behavior>    
      </endpointBehaviors>   

    <endpoint binding="webHttpBinding" 
contract="PayMentRESTService.IPayMentService" behaviorConfiguration="JsonBehavior">

详细请参考http://www.c-sharpcorner.com/UploadFile/0c1bb2/creating-wcf-rest-service/


I tried to call my service by the help of the URL http://localhost:8785/service/PayMentService/PayBill. But it failed. You need to enable metadata discovery which is turned off by default.You are there almost ,the missing one is

Name the meta service behavior implementaion .

 <serviceBehaviors>
        <behavior name="metadataDiscovery">
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>

Add that to your Payment service.

 <service name="SelfHostedWCFService.PayMentService" behaviorConfiguration="metadataDiscovery">
        <endpoint address="" binding="basicHttpBinding" contract="SelfHostedWCFService.IPayMentService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

Now you can browse the wsdl,http://localhost:8733/Design_Time_Addresses/SelfHostedWCFService/PayMentService/ . Similarly add the behavior tag configuration to all your service name tags.

You have also explained that Constructor is hit in debug mode,there are few things missing in your code.

 <endpointBehaviors>    
        <behavior name="JsonBehavior">   
          <webHttp/>    
        </behavior>    
      </endpointBehaviors>   

    <endpoint binding="webHttpBinding" 
contract="PayMentRESTService.IPayMentService" behaviorConfiguration="JsonBehavior">

Refer http://www.c-sharpcorner.com/UploadFile/0c1bb2/creating-wcf-rest-service/ for in detail.

相关问答

更多

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)