Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Pods/
**/Flutter/flutter_assets/
ServiceDefinitions.json
xcuserdata/
xcshareddata/
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why this was ignored in the first place, but the scheme details are a necessary part of the project now.


local.properties
keystore.properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,5 @@
<array>
<string>arm64</string>
</array>
<key>MinimumOSVersion</key>
<string>13.0</string>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an auto-migration from running with a recent version of Flutter; I can revert if you prefer, as it's unrelated, but it will be re-deleted on every run.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

</dict>
</plist>
201 changes: 40 additions & 161 deletions packages/google_mobile_ads/example/ios/Runner.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new file is the result of following the instructions for manually adding SwiftPM support to the example app.

Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<PreActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Prepare Flutter Framework Script"
scriptText = "&quot;$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh&quot; prepare&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
</ExecutionAction>
</PreActions>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9E61AA1529BBE51900801A83"
BuildableName = "RunnerTests.xctest"
BlueprintName = "RunnerTests"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
3 changes: 2 additions & 1 deletion packages/google_mobile_ads/example/ios/Runner/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

@import google_mobile_ads;

#include "AppDelegate.h"
#import "FLTGoogleMobileAdsPlugin.h"
#include "GeneratedPluginRegistrant.h"

@interface NativeAdFactoryExample : NSObject <FLTNativeAdFactory>
Expand Down
Empty file.
6 changes: 3 additions & 3 deletions packages/google_mobile_ads/ios/google_mobile_ads.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ Google Mobile Ads plugin for Flutter.
s.license = { :file => '../LICENSE' }
s.author = { 'Flutter Team' => 'flutter-dev@googlegroups.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*.{h,m}'
s.public_header_files = 'Classes/**/*.h'
s.source_files = 'google_mobile_ads/Sources/google_mobile_ads/**/*.{h,m}'
s.public_header_files = 'google_mobile_ads/Sources/google_mobile_ads/**/*.h'
s.dependency 'Flutter'
s.dependency 'Google-Mobile-Ads-SDK','~> 12.14.0'
s.dependency 'webview_flutter_wkwebview'
s.ios.deployment_target = '13.0'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS' => 'armv7 arm64 x86_64' }
s.static_framework = true
s.resource_bundles = {
'google_mobile_ads' => ['Classes/**/*.xib']
'google_mobile_ads' => ['google_mobile_ads/Sources/google_mobile_ads/**/*.xib']
}

s.test_spec 'Tests' do |test_spec|
Expand Down
34 changes: 34 additions & 0 deletions packages/google_mobile_ads/ios/google_mobile_ads/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "google_mobile_ads",
platforms: [
.iOS("13.0")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 13.0 rather than the 12.0 used in the podspec because webview-flutter-wkwebview requires 13, and Xcode enforces coherent min versions on a per-target level (unlike CocoaPods, which only fails if the final app has mismatches, which wasn't happening because any app built with a recent version of Flutter requires at least 13.0).

],
products: [
.library(name: "google-mobile-ads", targets: ["google_mobile_ads"])
],
dependencies: [
.package(
url: "https://github.com/googleads/swift-package-manager-google-mobile-ads", from: "12.14.0"),
.package(name: "webview_flutter_wkwebview", path: "../webview_flutter_wkwebview"),
],
targets: [
.target(
name: "google_mobile_ads",
dependencies: [
.product(name: "GoogleMobileAds", package: "swift-package-manager-google-mobile-ads"),
.product(name: "webview-flutter-wkwebview", package: "webview_flutter_wkwebview"),
],
resources: [
.process("Resources"),
],
cSettings: [
.headerSearchPath("include/google_mobile_ads")
]
)
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#import "FLTAppStateNotifier.h"
#import "FLTConstants.h"
#import "FLTNSString.h"
#import "UserMessagingPlatform/FLTUserMessagingPlatformManager.h"
#import "FLTUserMessagingPlatformManager.h"
@import webview_flutter_wkwebview;

@interface FLTGoogleMobileAdsPlugin ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
#import "FLTGoogleMobileAdsReaderWriter_Internal.h"
#import "FLTAdUtil.h"
#import "FLTMediationExtras.h"
#import "NativeTemplates/FLTNativeTemplateColor.h"
#import "NativeTemplates/FLTNativeTemplateFontStyle.h"
#import "NativeTemplates/FLTNativeTemplateStyle.h"
#import "NativeTemplates/FLTNativeTemplateTextStyle.h"
#import "NativeTemplates/FLTNativeTemplateType.h"
#import "FLTNativeTemplateColor.h"
#import "FLTNativeTemplateFontStyle.h"
#import "FLTNativeTemplateStyle.h"
#import "FLTNativeTemplateTextStyle.h"
#import "FLTNativeTemplateType.h"

// The type values below must be consistent for each platform.
typedef NS_ENUM(NSInteger, FLTAdMobField) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
// limitations under the License.

#import "FLTUserMessagingPlatformManager.h"
#import "../FLTAdUtil.h"
#import "../FLTNSString.h"
#import "FLTAdUtil.h"
#import "FLTNSString.h"
#import "FLTUserMessagingPlatformReaderWriter.h"
#include <UserMessagingPlatform/UserMessagingPlatform.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

#import "FLTUserMessagingPlatformReaderWriter.h"
#import "../FLTAdUtil.h"
#import "FLTAdUtil.h"
#include <UserMessagingPlatform/UserMessagingPlatform.h>

// The type values below must be consistent for each platform.
Expand Down