本文介绍了XCode 6 verificationController.m问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用由用于验证购买时的收据。它适用于XCode5,但在XCode6中它提供了许多错误。可能是由于C ++代码如:

I am using VerificationController.m provided by Raywenderlich for validating receipts for in ap purchase. It is working fine for XCode5 but in XCode6 it is giving number of errors. probably due to C++ code like:


  • 缺少方法声明代码

  • @end必须出现在objective-c

  • 上下文'checkReiptSecurity'的冲突类型

  • Missing Code for Method declaration
  • @end must appear in objective-c
  • context Conflicting types for 'checkReiptSecurity'

谁能告诉我需要做什么?

can anyone tell me what is needed to be done ?

编辑:这是错误截图

Edit : Here are errors screenshot

推荐答案

你修好过这个吗?我遇到了完全相同的问题所以我会把这个问题留在这里给那些想要看的人。事实证明,在较新版本的Xcode中,您不能再将C / C ++代码放入Objective-C上下文中。所以我移动了 unsigned int的声明iTS_intermediate_der_len unsigned char iTS_intermediate_der [] char * base64_encode(const void * buf,size_t size),并且 void * base64_decode(const char * s,size_t * data_len)到顶部文件,在 @implementation 标记之上。

Have you fixed this? I was running in to the exact same problem so I'll leave my fix here for anyone that comes looking. It turns out in newer versions of Xcode you aren't allowed to put C/C++ code in objective-C context anymore. So I moved the declarations for unsigned int iTS_intermediate_der_len, unsigned char iTS_intermediate_der[], char* base64_encode(const void* buf, size_t size), and void * base64_decode(const char* s, size_t * data_len) to the top of the file, above the @implementation tag.

这篇关于XCode 6 verificationController.m问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 05:55