Skip to content

Commit

Permalink
do not make Google-Mobile-Ads-SDK a dependency
Browse files Browse the repository at this point in the history
because the Google-Mobile-Ads-SDK includes a static framework, it can't be used with `use_frameworks!` when included as transitive dependency.
  • Loading branch information
koenpunt committed Sep 22, 2019
1 parent cafd6f8 commit 89e2bd4
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 21 deletions.
84 changes: 68 additions & 16 deletions Example/ios/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@

/* Begin PBXBuildFile section */
00E356F31AD99517003FC87E /* ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExampleTests.m */; };
04C93CF98C15299BF408645B /* libPods-Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FA0C8C19B8AD52E965DD436A /* libPods-Example.a */; };
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
13E98185F232C603113517AA /* libPods-ExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3002D5B6C68400B66A8B505 /* libPods-ExampleTests.a */; };
1A04B4A8149960C86072600F /* Pods_Example_tvOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FFD8538D174909E13ED954 /* Pods_Example_tvOS.framework */; };
2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
2DCD954D1E0B4F2C00145EB5 /* ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExampleTests.m */; };
5461666A4D5BC8CBD836C4D4 /* libPods-Example-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 03B41F392E301E1D0F773015 /* libPods-Example-tvOSTests.a */; };
BBD5336FC2A8E88E6C5C53A5 /* libPods-Example-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DFFF1DF84DEB1ABE6230D6B8 /* libPods-Example-tvOS.a */; };
3F8AA2943CCB8B14A076EB40 /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3B2AA611DDA5AD7CB6468C8 /* Pods_Example.framework */; };
6194FA12DAD9B87B20696BB7 /* Pods_ExampleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 99484A0726D0D1355B09A912 /* Pods_ExampleTests.framework */; };
B68837C8EA565C92D8182BE7 /* Pods_Example_tvOSTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C26B5791CF4F44D95CE7BFFE /* Pods_Example_tvOSTests.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -44,7 +44,7 @@
00E356EE1AD99517003FC87E /* ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* ExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleTests.m; sourceTree = "<group>"; };
03B41F392E301E1D0F773015 /* libPods-Example-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
08FFD8538D174909E13ED954 /* Pods_Example_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1338AA6DF79403E4E32C295B /* Pods-Example-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-tvOSTests.release.xcconfig"; path = "Target Support Files/Pods-Example-tvOSTests/Pods-Example-tvOSTests.release.xcconfig"; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Example/AppDelegate.h; sourceTree = "<group>"; };
Expand All @@ -57,48 +57,48 @@
2D02E4901E0B4A5D006451C7 /* Example-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Example-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
7B4B60DA1A94452FAAF2AFE8 /* Pods-Example-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-tvOS.debug.xcconfig"; path = "Target Support Files/Pods-Example-tvOS/Pods-Example-tvOS.debug.xcconfig"; sourceTree = "<group>"; };
8444FF53BB475195E1A8C91D /* Pods-Example-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-tvOS.release.xcconfig"; path = "Target Support Files/Pods-Example-tvOS/Pods-Example-tvOS.release.xcconfig"; sourceTree = "<group>"; };
99484A0726D0D1355B09A912 /* Pods_ExampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExampleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A3B2AA611DDA5AD7CB6468C8 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A50A84CC9C71E9683CA11E68 /* Pods-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-ExampleTests/Pods-ExampleTests.debug.xcconfig"; sourceTree = "<group>"; };
D3002D5B6C68400B66A8B505 /* libPods-ExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
DFFF1DF84DEB1ABE6230D6B8 /* libPods-Example-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
C26B5791CF4F44D95CE7BFFE /* Pods_Example_tvOSTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example_tvOSTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E13F5EE0D9998112AE1EAFB5 /* Pods-ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleTests.release.xcconfig"; path = "Target Support Files/Pods-ExampleTests/Pods-ExampleTests.release.xcconfig"; sourceTree = "<group>"; };
E78F7D51D6B71F1012E0019F /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
F35C82EE8A82B25FB90E187C /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = "<group>"; };
F4FE027B7AF7B41073C27B4E /* Pods-Example-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-tvOSTests.debug.xcconfig"; path = "Target Support Files/Pods-Example-tvOSTests/Pods-Example-tvOSTests.debug.xcconfig"; sourceTree = "<group>"; };
FA0C8C19B8AD52E965DD436A /* libPods-Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
00E356EB1AD99517003FC87E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
13E98185F232C603113517AA /* libPods-ExampleTests.a in Frameworks */,
6194FA12DAD9B87B20696BB7 /* Pods_ExampleTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
04C93CF98C15299BF408645B /* libPods-Example.a in Frameworks */,
3F8AA2943CCB8B14A076EB40 /* Pods_Example.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2D02E4781E0B4A5D006451C7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
BBD5336FC2A8E88E6C5C53A5 /* libPods-Example-tvOS.a in Frameworks */,
1A04B4A8149960C86072600F /* Pods_Example_tvOS.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2D02E48D1E0B4A5D006451C7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5461666A4D5BC8CBD836C4D4 /* libPods-Example-tvOSTests.a in Frameworks */,
B68837C8EA565C92D8182BE7 /* Pods_Example_tvOSTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -141,10 +141,10 @@
children = (
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
FA0C8C19B8AD52E965DD436A /* libPods-Example.a */,
DFFF1DF84DEB1ABE6230D6B8 /* libPods-Example-tvOS.a */,
03B41F392E301E1D0F773015 /* libPods-Example-tvOSTests.a */,
D3002D5B6C68400B66A8B505 /* libPods-ExampleTests.a */,
A3B2AA611DDA5AD7CB6468C8 /* Pods_Example.framework */,
08FFD8538D174909E13ED954 /* Pods_Example_tvOS.framework */,
C26B5791CF4F44D95CE7BFFE /* Pods_Example_tvOSTests.framework */,
99484A0726D0D1355B09A912 /* Pods_ExampleTests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -230,6 +230,7 @@
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
095AA2D0F1F6828B47850CC6 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -373,6 +374,57 @@
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
095AA2D0F1F6828B47850CC6 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/DoubleConversion/DoubleConversion.framework",
"${BUILT_PRODUCTS_DIR}/Folly/folly.framework",
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
"${BUILT_PRODUCTS_DIR}/React-Core/React.framework",
"${BUILT_PRODUCTS_DIR}/React-DevSupport/React.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTActionSheet/React.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTAnimation/React.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTBlob/React.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTImage/React.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTLinking/React.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTNetwork/React.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTSettings/React.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTText/React.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTVibration/React.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTWebSocket/React.framework",
"${BUILT_PRODUCTS_DIR}/React-cxxreact/cxxreact.framework",
"${BUILT_PRODUCTS_DIR}/React-jsi/jsi.framework",
"${BUILT_PRODUCTS_DIR}/React-jsiexecutor/jsireact.framework",
"${BUILT_PRODUCTS_DIR}/React-jsinspector/jsinspector.framework",
"${BUILT_PRODUCTS_DIR}/glog/glog.framework",
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
"${BUILT_PRODUCTS_DIR}/react-native-admob/react_native_admob.framework",
"${BUILT_PRODUCTS_DIR}/yoga/yoga.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DoubleConversion.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/folly.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cxxreact.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsi.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsireact.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsinspector.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_admob.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/yoga.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
110E645EA8D9BFBAF3F95EDF /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
3 changes: 3 additions & 0 deletions Example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
platform :ios, '9.0'
use_frameworks!
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'Example' do
Expand Down Expand Up @@ -27,6 +28,8 @@ target 'Example' do
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

pod 'Google-Mobile-Ads-SDK', '~> 7.8'

target 'ExampleTests' do
inherit! :search_paths
# Pods for testing
Expand Down
6 changes: 3 additions & 3 deletions Example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ PODS:
- React-jsi (= 0.60.5)
- React-jsinspector (0.60.5)
- react-native-admob (2.0.0-beta.5):
- Google-Mobile-Ads-SDK
- React-Core
- React-RCTActionSheet (0.60.5):
- React-Core (= 0.60.5)
Expand Down Expand Up @@ -117,6 +116,7 @@ DEPENDENCIES:
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- Google-Mobile-Ads-SDK (~> 7.8)
- React (from `../node_modules/react-native/`)
- React-Core (from `../node_modules/react-native/React`)
- React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
Expand Down Expand Up @@ -207,7 +207,7 @@ SPEC CHECKSUMS:
React-jsi: 4d8c9efb6312a9725b18d6fc818ffc103f60fec2
React-jsiexecutor: 90ad2f9db09513fc763bc757fdc3c4ff8bde2a30
React-jsinspector: e08662d1bf5b129a3d556eb9ea343a3f40353ae4
react-native-admob: b54436fb2eb5f5a706c49d2f33c918adcecca392
react-native-admob: 6c8217b6e2b0317df130c6804bc150778301f93e
React-RCTActionSheet: b0f1ea83f4bf75fb966eae9bfc47b78c8d3efd90
React-RCTAnimation: 359ba1b5690b1e87cc173558a78e82d35919333e
React-RCTBlob: 5e2b55f76e9a1c7ae52b826923502ddc3238df24
Expand All @@ -220,6 +220,6 @@ SPEC CHECKSUMS:
React-RCTWebSocket: cd932a16b7214898b6b7f788c8bddb3637246ac4
yoga: 312528f5bbbba37b4dcea5ef00e8b4033fdd9411

PODFILE CHECKSUM: 427825d45bec91cf181bdca5a1e33480e904ef46
PODFILE CHECKSUM: 4e567a12c0120fa5781752a0fe3f55e04addfdde

COCOAPODS: 1.8.0.beta.2
2 changes: 1 addition & 1 deletion ios/RNDFPBannerView.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if __has_include(<React/RCTComponent.h>)
#if __has_include(<React/RCTView.h>)
#import <React/RCTView.h>
#else
#import "RCTView.h"
Expand Down
11 changes: 10 additions & 1 deletion react-native-admob.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ Pod::Spec.new do |s|
s.source = { :git => 'https://github.com/sbugert/react-native-admob.git', :tag => "v#{version}" }
s.source_files = 'ios/*.{h,m}'

s.dependency 'Google-Mobile-Ads-SDK'
# We can't add the Google-Mobile-Ads-SDK as a dependency, as it would prevent
# this library to be used with `use_frameworks!`.
# So instead we add the default location of the framework to the framework
# search paths, and we rely on consumers of this library to add
# Google-Mobile-Ads-SDK as a direct dependency.
s.weak_frameworks = 'GoogleMobileAds'
s.pod_target_xcconfig = {
'FRAMEWORK_SEARCH_PATHS' => '"$(PODS_ROOT)/Google-Mobile-Ads-SDK/Frameworks/GoogleMobileAdsFramework-Current"',
}

s.dependency 'React-Core'
end

0 comments on commit 89e2bd4

Please sign in to comment.