适用于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
最满意答案
我试图通过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.
相关问答
更多-
您需要创建一个Binding,然后指定MaxReceivedMessageSize: Uri baseAddress = new Uri("http://localhost:8080/Test"); var serviceHost = new ServiceHost(typeof(TestService)); var basicHttpBinding = new BasicHttpBinding(); basicHttpBinding.MaxReceivedMessageSize = int.MaxValu ...
-
是的,使用OnStart方法。 一旦Windows服务从操作系统获得START命令,它就会被触发。 把你的“触摸”代码(逻辑)放在那里。 Yes, use OnStart method for this. It will be triggered once the Windows service gets a START command from OS. Put your "touch" code (logic) there.
-
托管WCF服务的位置无关紧要。 这一切都取决于绑定,端点,端点行为和服务行为设置,最后但并非最不重要的是,您设置(通过属性)服务的实例化模式和并发类型的方式。 这些设置由ServiceHost实例接管。 即使它在控制台应用程序中运行,应用程序本身也只是ServiceHost的容器, ServiceHost是根据您提供的设置为WCF服务创建运行时环境的容器。 对于您感兴趣的内容,请参阅此处 (并发和限制)。 此外, 在WCF实例模式上非常广泛 。 出于性能原因,我建议您使用单例服务,您可以通过Instance ...
-
在Windows服务中托管的wcf服务,我有哪些缓存选项?(wcf service hosted in a windows service, what caching options do I have?)[2022-03-15]
看一眼 这个链接 用于端点管理。 它总结为: 实例管理是一组技术,帮助我们将所有客户端请求绑定到服务实例,以控制哪个实例处理哪个请求。 为了熟悉所有实例管理模式,我们应该对它们进行简要概述。 基本上WCF中有三种实例模式: 每会话实例模式 每次呼叫实例模式 单例实例模式 我在这种情况下通常做的是每会话实例缓存。 (当然这取决于我正在尝试做什么)。 我使用缓存对象,如下所示: Configuration GetCachedConfiguration() { // If there i ... -
我试图通过URL http:// localhost:8785 / service / PayMentService / PayBill来调用我的服务。 但它失败了。 您需要启用默认情况下已关闭的元数据发现功能。您几乎可以在那里找到缺失的元数据 命名元服务行为的实现。我找到了解决问题的方法。 在从ClientBase
派生的WCF代理类中,我在运行我的WCF服务的PC中使用用户凭证覆盖基本构造函数。 base.ClientCredentials.Windows.ClientCredential.UserName = "localhost\\myUsername"; base.ClientCredentials.Windows.ClientCredential.Password = "myPassword"; 在WCF服务app.config中: 你确定端口是打开的吗? 您可以使用telnet客户端进行检查 telnet machine 8080 如果未打开端口,则可以检查异常详细信息以查看错误。 如果基于HTTP的服务是在非管理员帐户下启动的,那么很可能需要使用以下命令注册它 netsh http add urlacl url=http://+:8080/AuditService user=mylocaluser 您可以在此处找到WCF ServiceHost访问权限的更多详细信息 Are you sure the port is opened ...WCF不在与标准ASP.NET应用程序相同的请求管道上运行,但如果您为ASP.NET兼容性配置服务,则可以利用许多ASP.NET功能(如会话)。 [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)] 但是,看起来你只需要一些能让你像HTTPModules为ASP.NET应用程序那样跳进管道的东西。 既然如此,有很多选择。 您可以在此页面查看大量样本。 您提到了身份 ...尝试创建服务契约以处理使用basicHttpBinding公开的loadbalancer的请求 Try to create a service contract to handle the requests of the loadbalancer exposed using a basicHttpBinding通过LAN访问作为Windows服务托管的WCF服务[关闭](Accessing WCF service hosted as Windows service over LAN [closed])[2022-07-21]
1) - 对端点使用Net.Tcp绑定。 如果客户端和服务器位于同一网络上,则防火墙不会成为问题。 - 客户端配置将有所不同。 您需要指向不同的端点来访问WCF服务。对于每个托管的服务。 2)您也可以使用SvcUtil实用程序在客户端创建代理类。 1) - Use Net.Tcp bindings for endpoints. Firewall won't be an issue if client and server are on same network. - Client configuration ...相关文章
更多- phonegap分享到微信插件(iOS版)
- phonegap与微信开放平台接口整合
- phonegap分享到微信插件(安卓版)
- 《iOS 5核心框架》扫描版[PDF]
- 尚学堂ios高级视频教程
- [ios视频教程] 无限互联ios视频教程全集之objective-c部分
- 关于微信检测SDK应用的原理浅析(iOS)
- 关于微信检测SDK应用的原理浅析(iOS)
- iOS 关于微信检测SDK应用的原理浅析
- 关于微信检测SDK应用的原理浅析(iOS)
最新问答
更多- 您如何使用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)