Skip to content

Commit

Permalink
feat: create MetaFBAdSettings and MetaModule #59
Browse files Browse the repository at this point in the history
  • Loading branch information
gumaciel committed Aug 4, 2023
1 parent 9c8e8df commit df43186
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 16 deletions.
48 changes: 40 additions & 8 deletions PoingGodotAdMob/PoingGodotAdMob.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@
5E80AAD62A44A50C001C750F /* PoingGodotAdMob.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5E80AAD32A44A50C001C750F /* PoingGodotAdMob.h */; };
5E80AAE42A44A74A001C750F /* AdNetworkExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5E80AAE32A44A74A001C750F /* AdNetworkExtras.mm */; };
5E80AAE52A44A74A001C750F /* AdNetworkExtras.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5E80AAE22A44A74A001C750F /* AdNetworkExtras.h */; };
5E80AAF12A44A82F001C750F /* Meta.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5E80AAF02A44A82F001C750F /* Meta.mm */; };
5E80AAF22A44A82F001C750F /* Meta.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5E80AAEF2A44A82F001C750F /* Meta.h */; };
5E80AAF12A44A82F001C750F /* PoingGodotAdMobMetaModule.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5E80AAF02A44A82F001C750F /* PoingGodotAdMobMetaModule.mm */; };
5E80AAF22A44A82F001C750F /* PoingGodotAdMobMetaModule.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5E80AAEF2A44A82F001C750F /* PoingGodotAdMobMetaModule.h */; };
5E80AB002A44AA77001C750F /* VunglePoingExtrasBuilder.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5E80AAFF2A44AA77001C750F /* VunglePoingExtrasBuilder.mm */; };
5E80AB012A44AA77001C750F /* VunglePoingExtrasBuilder.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5E80AAFE2A44AA77001C750F /* VunglePoingExtrasBuilder.h */; };
5EA276132A66FC6A00D5CF1E /* PoingGodotAdMobAdView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5EA276122A66FC6A00D5CF1E /* PoingGodotAdMobAdView.mm */; };
5EA276172A6739D200D5CF1E /* BannerAd.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5EA276162A6739D200D5CF1E /* BannerAd.mm */; };
5EA2761A2A67461A00D5CF1E /* GodotDictionaryToObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5EA276192A67461A00D5CF1E /* GodotDictionaryToObject.mm */; };
5EA595992A76B08400968B18 /* PoingGodotAdMobRewardedAd.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5EA595982A76B08400968B18 /* PoingGodotAdMobRewardedAd.mm */; };
5EA5959C2A76B10000968B18 /* RewardedAd.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5EA5959B2A76B10000968B18 /* RewardedAd.mm */; };
5EAFBD212A7C96600045DAB8 /* PoingGodotAdMobMetaFBAdSettings.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5EAFBD202A7C96600045DAB8 /* PoingGodotAdMobMetaFBAdSettings.mm */; };
5EB13DE52A76FF7800054CFC /* PoingGodotAdMobRewardedInterstitialAd.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5EB13DE42A76FF7800054CFC /* PoingGodotAdMobRewardedInterstitialAd.mm */; };
5EB13DE82A77003500054CFC /* RewardedInterstitialAd.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5EB13DE72A77003500054CFC /* RewardedInterstitialAd.mm */; };
5EB13DEB2A7706AE00054CFC /* PoingGodotAdMobConsentInformation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5EB13DEA2A7706AE00054CFC /* PoingGodotAdMobConsentInformation.mm */; };
Expand Down Expand Up @@ -80,7 +81,7 @@
dstPath = "include/$(PRODUCT_NAME)";
dstSubfolderSpec = 16;
files = (
5E80AAF22A44A82F001C750F /* Meta.h in CopyFiles */,
5E80AAF22A44A82F001C750F /* PoingGodotAdMobMetaModule.h in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -122,8 +123,8 @@
5E80AAE22A44A74A001C750F /* AdNetworkExtras.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AdNetworkExtras.h; sourceTree = "<group>"; };
5E80AAE32A44A74A001C750F /* AdNetworkExtras.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AdNetworkExtras.mm; sourceTree = "<group>"; };
5E80AAED2A44A82E001C750F /* poing-godot-admob-meta.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "poing-godot-admob-meta.a"; sourceTree = BUILT_PRODUCTS_DIR; };
5E80AAEF2A44A82F001C750F /* Meta.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Meta.h; sourceTree = "<group>"; };
5E80AAF02A44A82F001C750F /* Meta.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = Meta.mm; sourceTree = "<group>"; };
5E80AAEF2A44A82F001C750F /* PoingGodotAdMobMetaModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PoingGodotAdMobMetaModule.h; sourceTree = "<group>"; };
5E80AAF02A44A82F001C750F /* PoingGodotAdMobMetaModule.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = PoingGodotAdMobMetaModule.mm; sourceTree = "<group>"; };
5E80AAFC2A44AA77001C750F /* poing-godot-admob-vungle.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "poing-godot-admob-vungle.a"; sourceTree = BUILT_PRODUCTS_DIR; };
5E80AAFE2A44AA77001C750F /* VunglePoingExtrasBuilder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VunglePoingExtrasBuilder.h; sourceTree = "<group>"; };
5E80AAFF2A44AA77001C750F /* VunglePoingExtrasBuilder.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = VunglePoingExtrasBuilder.mm; sourceTree = "<group>"; };
Expand All @@ -141,6 +142,9 @@
5EA5959D2A76B39E00968B18 /* VectorHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VectorHelper.h; sourceTree = "<group>"; };
5EA5959E2A76C0BA00968B18 /* ObjectController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ObjectController.h; sourceTree = "<group>"; };
5EA5959F2A76C56500968B18 /* AdFormatBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AdFormatBase.h; sourceTree = "<group>"; };
5EAFBD1E2A7C94EA0045DAB8 /* poing-godot-admob-meta.gdip */ = {isa = PBXFileReference; lastKnownFileType = text; path = "poing-godot-admob-meta.gdip"; sourceTree = "<group>"; };
5EAFBD1F2A7C96540045DAB8 /* PoingGodotAdMobMetaFBAdSettings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PoingGodotAdMobMetaFBAdSettings.h; sourceTree = "<group>"; };
5EAFBD202A7C96600045DAB8 /* PoingGodotAdMobMetaFBAdSettings.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = PoingGodotAdMobMetaFBAdSettings.mm; sourceTree = "<group>"; };
5EB13DE32A76FF6300054CFC /* PoingGodotAdMobRewardedInterstitialAd.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PoingGodotAdMobRewardedInterstitialAd.h; sourceTree = "<group>"; };
5EB13DE42A76FF7800054CFC /* PoingGodotAdMobRewardedInterstitialAd.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = PoingGodotAdMobRewardedInterstitialAd.mm; sourceTree = "<group>"; };
5EB13DE62A77002B00054CFC /* RewardedInterstitialAd.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RewardedInterstitialAd.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -342,8 +346,11 @@
5E80AAEE2A44A82F001C750F /* meta */ = {
isa = PBXGroup;
children = (
5E80AAEF2A44A82F001C750F /* Meta.h */,
5E80AAF02A44A82F001C750F /* Meta.mm */,
5EAFBD1D2A7C94B30045DAB8 /* config */,
5E80AAEF2A44A82F001C750F /* PoingGodotAdMobMetaModule.h */,
5E80AAF02A44A82F001C750F /* PoingGodotAdMobMetaModule.mm */,
5EAFBD1F2A7C96540045DAB8 /* PoingGodotAdMobMetaFBAdSettings.h */,
5EAFBD202A7C96600045DAB8 /* PoingGodotAdMobMetaFBAdSettings.mm */,
);
path = meta;
sourceTree = "<group>";
Expand Down Expand Up @@ -402,6 +409,14 @@
path = adformats;
sourceTree = "<group>";
};
5EAFBD1D2A7C94B30045DAB8 /* config */ = {
isa = PBXGroup;
children = (
5EAFBD1E2A7C94EA0045DAB8 /* poing-godot-admob-meta.gdip */,
);
path = config;
sourceTree = "<group>";
};
5EB13DF12A773C2000054CFC /* ump */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -723,7 +738,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5E80AAF12A44A82F001C750F /* Meta.mm in Sources */,
5EAFBD212A7C96600045DAB8 /* PoingGodotAdMobMetaFBAdSettings.mm in Sources */,
5E80AAF12A44A82F001C750F /* PoingGodotAdMobMetaModule.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -1018,6 +1034,14 @@
CODE_SIGN_STYLE = Automatic;
EXCLUDED_ARCHS = "";
EXECUTABLE_PREFIX = "poing-godot-admob-";
HEADER_SEARCH_PATHS = (
"$(inherited)",
"\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities/GoogleUtilities.framework/Headers\"",
"\"${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC/FBLPromises.framework/Headers\"",
"\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb/nanopb.framework/Headers\"",
"$(SRCROOT)/../godot/platform/ios",
"$(SRCROOT)/../godot",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -1033,6 +1057,14 @@
CODE_SIGN_STYLE = Automatic;
EXCLUDED_ARCHS = "";
EXECUTABLE_PREFIX = "poing-godot-admob-";
HEADER_SEARCH_PATHS = (
"$(inherited)",
"\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities/GoogleUtilities.framework/Headers\"",
"\"${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC/FBLPromises.framework/Headers\"",
"\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb/nanopb.framework/Headers\"",
"$(SRCROOT)/../godot/platform/ios",
"$(SRCROOT)/../godot",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// MIT License
//
// Copyright (c) 2023-present Poing Studios
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

#ifndef PoingGodotAdMobMetaFBAdSettings_h
#define PoingGodotAdMobMetaFBAdSettings_h

#include "core/object/class_db.h"
#include "core/version.h"

class PoingGodotAdMobMetaFBAdSettings : public Object {

GDCLASS(PoingGodotAdMobMetaFBAdSettings, Object);

static PoingGodotAdMobMetaFBAdSettings *instance;
static void _bind_methods();

public:
void set_advertiser_tracking_enabled(bool tracking_required);

static PoingGodotAdMobMetaFBAdSettings *get_singleton();

PoingGodotAdMobMetaFBAdSettings();
~PoingGodotAdMobMetaFBAdSettings();
private:
static PoingGodotAdMobMetaFBAdSettings *options;
};


#endif /* PoingGodotAdMobMetaFBAdSettings_h */
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,4 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

#import "Meta.h"

@implementation Meta

@end
#import "PoingGodotAdMobMetaFBAdSettings.h"
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

#import <Foundation/Foundation.h>
#ifndef PoingGodotMetaModule_h
#define PoingGodotMetaModule_h

@interface Meta : NSObject
void register_poing_godot_admob_meta_types();
void unregister_poing_godot_admob_meta_types();

@end
#endif /* PoingGodotAdMobModule_h */
41 changes: 41 additions & 0 deletions PoingGodotAdMob/src/mediation/meta/PoingGodotAdMobMetaModule.mm
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// MIT License
//
// Copyright (c) 2023-present Poing Studios
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

#import "PoingGodotAdMobMetaModule.h"
#include "PoingGodotAdMobMetaFBAdSettings.h"

#import <Foundation/Foundation.h>
#include "core/config/engine.h"
#include "core/version.h"

PoingGodotAdMobMetaFBAdSettings *poing_godot_admob_meta_app_options;

void register_poing_godot_admob_adcolony_types() {
poing_godot_admob_meta_app_options = memnew(PoingGodotAdMobMetaFBAdSettings);
Engine::get_singleton()->add_singleton(Engine::Singleton("PoingGodotAdMobMetaFBAdSettings", poing_godot_admob_meta_app_options));
}

void unregister_poing_godot_admob_adcolony_types() {
if (poing_godot_admob_meta_app_options) {
memdelete(poing_godot_admob_meta_app_options);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[config]
name="AdMob Meta"
binary="poing-godot-admob/bin/poing-godot-admob-meta.a"

initialization="register_poing_godot_admob_meta_types"
deinitialization="unregister_poing_godot_admob_meta_types"

[dependencies]
linked=[]
embedded=[]
system=[]
capabilities=[]
files=[]
linker_flags=[]

[plist]

0 comments on commit df43186

Please sign in to comment.