-
Notifications
You must be signed in to change notification settings - Fork 345
Adds google_mobile_ads support for Swift Package Manager
#1395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
dbd244c
71833b2
ffb1eaf
8de1d2d
51ca762
5abb5c6
dd1a53b
e534888
eef2f5c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,5 @@ | |
| <array> | ||
| <string>arm64</string> | ||
| </array> | ||
| <key>MinimumOSVersion</key> | ||
| <string>13.0</string> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SGTM |
||
| </dict> | ||
| </plist> | ||
Large diffs are not rendered by default.
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 = ""$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" prepare "> | ||
| <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> |
| 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") | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| ], | ||
| 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") | ||
| ] | ||
| ) | ||
| ] | ||
| ) | ||
There was a problem hiding this comment.
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.