XCode 6 verificationController.m issues

2019-05-08 06:52发布

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 Errors

Errors

enter image description here

2条回答
Viruses.
2楼-- · 2019-05-08 07:23

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.

查看更多
我命由我不由天
3楼-- · 2019-05-08 07:27

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.

查看更多
登录 后发表回答