XCode 6 verificationController.m issues

爱⌒轻易说出口 提交于 2019-12-22 08:51:06

问题


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:

  • 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


回答1:


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.




回答2:


Have you downloaded sample code? I have downloaded sample code and its working fine at my side. It seems that you have missed or added an extra braket } or { in your code.

May be this happened when you was trying to comment this code [UIDevice currentDevice].uniqueIdentifier; because originally this line produce an error.



来源:https://stackoverflow.com/questions/27382041/xcode-6-verificationcontroller-m-issues

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!