Ejecta & Impact.js – Disable Game Center & In-App Purchase Capabilities

 
1 Kudos
Don't
move!

I made an app with Impact.js that did neither require the Game Center, nor In-App Purchases. If you disable the capabilities in your Xcode project, you’ll notice that the build fails with 11 linker errors:

Apple Mach-O Linker Error:

Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_SKMutablePayment", referenced from:
objc-class-ref in EJBindingIAPProduct.o
"_OBJC_CLASS_$_SKPaymentQueue", referenced from:
objc-class-ref in EJBindingIAPManager.o
objc-class-ref in EJBindingIAPProduct.o
"_OBJC_CLASS_$_GKLeaderboard", referenced from:
objc-class-ref in EJBindingGameCenter.o
"_OBJC_CLASS_$_GKPlayer", referenced from:
objc-class-ref in EJBindingGameCenter.o
"_OBJC_CLASS_$_GKScore", referenced from:
objc-class-ref in EJBindingGameCenter.o
"_OBJC_CLASS_$_SKProductsRequest", referenced from:
objc-class-ref in EJBindingIAPManager.o
"_OBJC_CLASS_$_GKAchievementViewController", referenced from:
objc-class-ref in EJBindingGameCenter.o
"_OBJC_CLASS_$_GKLeaderboardViewController", referenced from:
objc-class-ref in EJBindingGameCenter.o
"_OBJC_CLASS_$_GKLocalPlayer", referenced from:
objc-class-ref in EJBindingGameCenter.o
"_OBJC_CLASS_$_GKAchievement", referenced from:
objc-class-ref in EJBindingGameCenter.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

However, it’s fairly easy to remove these capabilities. Just delete the files (if asked, select “Move to Trash”) in the Ejecta project that bind these capabilities. Source/Ejecta/EJUtils:

EJBindingGameCenter.h
EJBindingGameCenter.m

and the entire Source/Ejecta/EJUtils/IAP directory.

If you then recompile your app or game, you’ll be able to run it without the Game Center and In-App Purchase capabilities.

delete-bindings

Leave a Reply

Your email address will not be published. Required fields are marked *