Other linker flags set to -ObjC

I have included other linker flags set in -ObjC in my build settings as I would like to use an infrastructure that requires this ( https://github.com/rs/SDWebImage )

However, after adding this flag, I get linker errors:

Undefined symbols for architecture armv7: 

"_ OBJC_CLASS _ $ _ SKProductsRequest" referenced by:

  objc-class-ref in Parse(PFPurchase.o) 

"_ OBJC_CLASS _ $ _ SKPayment" referenced by:

  objc-class-ref in Parse(PFPurchase.o) 

"_ OBJC_CLASS _ $ _ SKPaymentQueue" referenced by:

  objc-class-ref in Parse(PFPurchase.o) objc-class-ref in Parse(PFPaymentTransactionObserver.o) 

ld: character not found for armv7 architecture

clang: error: linker command failed with exit code 1 (use -v to invoke the call)

Removing the -ObjC linker flag and building the project again without errors. Any ideas of the reason? Thanks.

+4
source share
2 answers

You need to add StoreKit.framework .

Version 1.0.62 Parse iOS SDK introduced in-app purchases . To do this, add StoreKit.framework to existing iOS projects for Parse, even if IAP is not used.

Do it:

  • Choose your project
  • Choose a target
  • Assembly phase selection
  • In Link Binaries with Libraries, click +
  • Search StoreKit and Add

Then import the framework into your project:

 #import "StoreKit/StoreKit.h" 

See the same error in this promotion community link .

+17
source

add the Storekit framework to your project and use this operator, in which you use the write code for the App App Purchase

 #import "StoreKit/StoreKit.h" 
+6
source

Source: https://habr.com/ru/post/1480037/


All Articles