From 0cfcf60064f4fa9f805bc781560584b4ab6d2812 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Mon, 4 May 2015 12:14:05 +0200 Subject: [PATCH] InApp: add LINPHONE_CAPABILITY_INAPP_PURCHASE extra flag to disable in app code if not linking with in app purchase capability --- Classes/InAppProductsManager.m | 3 ++- linphone.xcodeproj/project.pbxproj | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Classes/InAppProductsManager.m b/Classes/InAppProductsManager.m index 9413490c4..f308eaf19 100644 --- a/Classes/InAppProductsManager.m +++ b/Classes/InAppProductsManager.m @@ -36,7 +36,8 @@ NSString *accountCreationPassword; } -#if !TARGET_IPHONE_SIMULATOR +// LINPHONE_CAPABILITY_INAPP_PURCHASE must be defined in Linphone Build Settings +#if LINPHONE_CAPABILITY_INAPP_PURCHASE && !TARGET_IPHONE_SIMULATOR - (instancetype)init { if ((self = [super init]) != nil) { diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index d0963c035..263e031b6 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -4592,6 +4592,7 @@ WARNING_CFLAGS = ( "-Werror=objc-method-access", "-Werror=incomplete-implementation", + "-DLINPHONE_CAPABILITY_INAPP_PURCHASE=0", ); }; name = Debug; @@ -4678,6 +4679,7 @@ WARNING_CFLAGS = ( "-Werror=objc-method-access", "-Werror=incomplete-implementation", + "-DLINPHONE_CAPABILITY_INAPP_PURCHASE=0", ); }; name = DistributionAdhoc; @@ -4762,6 +4764,7 @@ WARNING_CFLAGS = ( "-Werror=objc-method-access", "-Werror=incomplete-implementation", + "-DLINPHONE_CAPABILITY_INAPP_PURCHASE=0", ); }; name = Release; @@ -4847,6 +4850,7 @@ WARNING_CFLAGS = ( "-Werror=objc-method-access", "-Werror=incomplete-implementation", + "-DLINPHONE_CAPABILITY_INAPP_PURCHASE=0", ); }; name = Distribution;