Skip to content

Commit

Permalink
Merge pull request #71 from Poing-Studios/request-agent-v2
Browse files Browse the repository at this point in the history
request agent v2
  • Loading branch information
gumaciel authored Oct 25, 2023
2 parents d75fa9c + c218a8b commit e9730a5
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: Build iOS 3.3+

on:
push:
tags:
- '*'
env:
TAG_NAME: iOS_v3.3+
RELEASE_NAME: iOS Compiled files for v3.3+
on: workflow_dispatch

jobs:
download-google-mobile-ads-sdk:
Expand Down Expand Up @@ -38,10 +32,17 @@ jobs:
runs-on: "macos-latest"
strategy:
matrix:
GODOT_VERSIONS: [3.3, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.4, 3.4.1, 3.4.2, 3.4.3, 3.4.4, 3.4.5, 3.5, 3.5.1, 4.0]
GODOT_VERSIONS: [3.3, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.4, 3.4.1, 3.4.2, 3.4.3, 3.4.4, 3.4.5, 3.5, 3.5.1, 3.5.2, 3.5.3, 4.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.1, 4.1.1, 4.1.2]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}

- name: Set plugin version on env
run: |
PLUGIN_VERSION=$(find . -name "*.h" -exec grep -H 'PLUGIN_VERSION = ' {} \; | awk -F'"' '{print $2}')
echo "PLUGIN_VERSION=v${PLUGIN_VERSION}" >> $GITHUB_ENV
# Github Actions Matrix doesnt support x.0 values, it's replaced by ''
- name: Verify current matrix's GODOT_VERSIONS
Expand Down Expand Up @@ -139,7 +140,8 @@ jobs:
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
target_commit: ${{ github.ref_name }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ios-template-v${{env.CURRENT_GODOT_VERSION}}.zip
tag: ${{ github.ref }}
tag: ${{env.PLUGIN_VERSION}}
overwrite: true
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@ local.properties

*.tar.xz

plugin/Pods/
# v3 folder
PoingGodotAdMob/

# v2 folder
plugin/Pods/
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if env['simulator']:
env.Append(CCFLAGS=['-mios-simulator-version-min=10.0'])
env.Append(LINKFLAGS=["-mios-simulator-version-min=10.0"])
else:
xcframework_directory = 'ios-arm64_armv7'
xcframework_directory = 'ios-arm64'
sdk_name = 'iphoneos'
env.Append(CCFLAGS=['-miphoneos-version-min=10.0'])
env.Append(LINKFLAGS=["-miphoneos-version-min=10.0"])
Expand Down
2 changes: 1 addition & 1 deletion plugin/admob/config/admob.gdip
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ linked=[
"admob/lib/GoogleMobileAds.xcframework",
"admob/lib/GoogleUtilities.xcframework",
"admob/lib/UserMessagingPlatform.xcframework",
"admob/lib/PromisesObjC.xcframework"]
"admob/lib/FBLPromises.xcframework"]

embedded=[]
system=["JavaScriptCore.framework"]
Expand Down
1 change: 1 addition & 0 deletions plugin/admob/src/formats/Banner.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#endif

#include "../main/admob.h"
#include "version_constants.h"

#import "app_delegate.h"
#import "view_controller.h"
Expand Down
1 change: 1 addition & 0 deletions plugin/admob/src/formats/Banner.mm
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ - (void) load_banner:(NSString*)ad_unit_id :(int)position :(NSString*)size : (bo
bannerView.rootViewController = rootController;

GADRequest *request = [GADRequest request];
request.requestAgent = [NSString stringWithFormat:@"poingstudiosgodot-%@", PLUGIN_VERSION];
[bannerView loadRequest:request];


Expand Down
1 change: 1 addition & 0 deletions plugin/admob/src/formats/Interstitial.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#endif

#include "../main/admob.h"
#include "version_constants.h"


@class Interstitial;
Expand Down
1 change: 1 addition & 0 deletions plugin/admob/src/formats/Interstitial.mm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ - (void) load_interstitial:(NSString*)ad_unit_id {


GADRequest *request = [GADRequest request];
request.requestAgent = [NSString stringWithFormat:@"poingstudiosgodot-%@", PLUGIN_VERSION];

[GADInterstitialAd loadWithAdUnitID:ad_unit_id
request:request
Expand Down
1 change: 1 addition & 0 deletions plugin/admob/src/formats/Rewarded.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#endif

#include "../main/admob.h"
#include "version_constants.h"

@class Rewarded;

Expand Down
1 change: 1 addition & 0 deletions plugin/admob/src/formats/Rewarded.mm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ - (void) load_rewarded:(NSString*) ad_unit_id {
}

GADRequest *request = [GADRequest request];
request.requestAgent = [NSString stringWithFormat:@"poingstudiosgodot-%@", PLUGIN_VERSION];
[GADRewardedAd
loadWithAdUnitID:ad_unit_id
request:request
Expand Down
1 change: 1 addition & 0 deletions plugin/admob/src/formats/RewardedInterstitial.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#endif

#include "../main/admob.h"
#include "version_constants.h"

@class RewardedInterstitial;

Expand Down
1 change: 1 addition & 0 deletions plugin/admob/src/formats/RewardedInterstitial.mm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ - (void) load_rewarded_interstitial:(NSString*) ad_unit_id {
}

GADRequest *request = [GADRequest request];
request.requestAgent = [NSString stringWithFormat:@"poingstudiosgodot-%@", PLUGIN_VERSION];
[GADRewardedInterstitialAd
loadWithAdUnitID:ad_unit_id
request:request
Expand Down
7 changes: 7 additions & 0 deletions plugin/admob/src/formats/version_constants.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// VersionConstants.h
#ifndef VersionConstants_h
#define VersionConstants_h

static NSString *const PLUGIN_VERSION = @"2.1.3";

#endif /* VersionConstants_h */

0 comments on commit e9730a5

Please sign in to comment.