Browse Source

InAppPurchases: fix linker error on iOS when product unlocking module is included by IAP capability is turned off.

tags/2021-05-28
Lukasz Kozakiewicz 7 years ago
parent
commit
f65500ec7b
5 changed files with 13 additions and 2 deletions
  1. +3
    -0
      extras/Projucer/Source/Project Saving/jucer_ProjectExport_Android.h
  2. +3
    -0
      extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h
  3. +2
    -2
      modules/juce_gui_basics/native/juce_android_Windowing.cpp
  4. +3
    -0
      modules/juce_product_unlocking/juce_product_unlocking.cpp
  5. +2
    -0
      modules/juce_product_unlocking/juce_product_unlocking.h

+ 3
- 0
extras/Projucer/Source/Project Saving/jucer_ProjectExport_Android.h View File

@@ -1236,6 +1236,9 @@ private:
defines.set ("JUCE_ANDROID_ACTIVITY_CLASSNAME", getJNIActivityClassName().replaceCharacter ('/', '_'));
defines.set ("JUCE_ANDROID_ACTIVITY_CLASSPATH", "\"" + getJNIActivityClassName() + "\"");
if (androidInAppBillingPermission.get())
defines.set ("JUCE_IN_APP_PURCHASES", "1");
if (supportsGLv3())
defines.set ("JUCE_ANDROID_GL_ES_VERSION_3_0", "1");


+ 3
- 0
extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h View File

@@ -1040,6 +1040,9 @@ public:
s.add ("SEPARATE_STRIP = YES");
}
if (owner.iOS && owner.isInAppPurchasesEnabled())
defines.set ("JUCE_IN_APP_PURCHASES", "1");
defines = mergePreprocessorDefs (defines, owner.getAllPreprocessorDefs (config, type));
StringArray defsList;


+ 2
- 2
modules/juce_gui_basics/native/juce_android_Windowing.cpp View File

@@ -32,7 +32,7 @@ namespace juce
{
//==============================================================================
#if JUCE_MODULE_AVAILABLE_juce_product_unlocking
#if JUCE_IN_APP_PURCHASES && JUCE_MODULE_AVAILABLE_juce_product_unlocking
extern void juce_inAppPurchaseCompleted (void*);
#endif
@@ -92,7 +92,7 @@ JUCE_JNI_CALLBACK (JUCE_ANDROID_ACTIVITY_CLASSNAME, appActivityResult, void, (JN
{
setEnv (env);
#if JUCE_MODULE_AVAILABLE_juce_product_unlocking
#if JUCE_IN_APP_PURCHASES && JUCE_MODULE_AVAILABLE_juce_product_unlocking
if (requestCode == 1001)
juce_inAppPurchaseCompleted (intentData);
#else


+ 3
- 0
modules/juce_product_unlocking/juce_product_unlocking.cpp View File

@@ -50,6 +50,7 @@
namespace juce
{
#if JUCE_IN_APP_PURCHASES
#if JUCE_ANDROID
#include "native/juce_android_InAppPurchases.cpp"
#elif JUCE_IOS
@@ -57,6 +58,8 @@ namespace juce
#endif
#include "in_app_purchases/juce_InAppPurchases.cpp"
#endif
#include "marketplace/juce_OnlineUnlockStatus.cpp"
#if JUCE_MODULE_AVAILABLE_juce_data_structures


+ 2
- 0
modules/juce_product_unlocking/juce_product_unlocking.h View File

@@ -79,7 +79,9 @@
namespace juce
{
#if JUCE_IN_APP_PURCHASES
#include "in_app_purchases/juce_InAppPurchases.h"
#endif
#if JUCE_MODULE_AVAILABLE_juce_data_structures
#include "marketplace/juce_OnlineUnlockStatus.h"


Loading…
Cancel
Save