Skip to content

Commit b903ba0

Browse files
authored
Merge pull request #436 from oddbit/fix/bump_and_18_check_AdVersion
Bump Android FBSDK Core Kit, bump iOS FBAudienceNetwork, and merge debug option
2 parents f233409 + f0149b2 commit b903ba0

File tree

11 files changed

+106
-114
lines changed

11 files changed

+106
-114
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 0.20.0
2+
### ⚠️ Breaking Changes
3+
- **Remove iOS FBAudienceNetwork dependency** - If your app depends on FBAudienceNetwork framework, you'll need to include it separately in your app
4+
5+
### Features
6+
- Update Android `FBSDKCoreKit` to version `18.0` to `19.0`
7+
- Merge option to set debug enabled feature
8+
19
## 0.19.7
210
- Update iOS `FBSDKCoreKit` to `18.0`
311

android/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ android {
4545
main.java.srcDirs += "src/main/kotlin"
4646
test.java.srcDirs += "src/test/kotlin"
4747
}
48+
buildFeatures {
49+
buildConfig = true
50+
}
4851

4952
defaultConfig {
5053
minSdk = 21
@@ -61,6 +64,6 @@ android {
6164
// About the version syntax:
6265
// - https://github.com/oddbit/flutter_facebook_app_events/pull/189#discussion_r768267841
6366
// - https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN402
64-
implementation("com.facebook.android:facebook-android-sdk:[17.0,18.0)")
67+
implementation("com.facebook.android:facebook-android-sdk:[18.0,19.0)")
6568
}
6669
}

android/src/main/kotlin/id/oddbit/flutter/facebook_app_events/FacebookAppEventsPlugin.kt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import io.flutter.plugin.common.MethodChannel
1414
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
1515
import io.flutter.plugin.common.MethodChannel.Result
1616
import java.util.Currency
17+
import com.facebook.LoggingBehavior
1718

1819
/** FacebookAppEventsPlugin */
1920
class FacebookAppEventsPlugin: FlutterPlugin, MethodCallHandler {
@@ -99,8 +100,17 @@ class FacebookAppEventsPlugin: FlutterPlugin, MethodCallHandler {
99100
private fun handleGetAnonymousId(call: MethodCall, result: Result) {
100101
result.success(anonymousId)
101102
}
102-
//not an android implementation as of yet
103+
103104
private fun handleSetAdvertiserTracking(call: MethodCall, result: Result) {
105+
val enabled = call.argument("enabled") as? Boolean ?: false
106+
val collectId = call.argument("collectId") as? Boolean ?: false
107+
FacebookSdk.setAdvertiserIDCollectionEnabled(collectId)
108+
FacebookSdk.setIsDebugEnabled(enabled)
109+
// Enable logging for debug builds
110+
if (enabled && BuildConfig.BUILD_TYPE == "debug") {
111+
FacebookSdk.addLoggingBehavior(LoggingBehavior.APP_EVENTS)
112+
FacebookSdk.addLoggingBehavior(LoggingBehavior.REQUESTS)
113+
}
104114
result.success(null);
105115
}
106116

example/ios/Podfile.lock

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
PODS:
2-
- facebook_app_events (0.0.1):
3-
- FBAudienceNetwork (= 6.16)
2+
- facebook_app_events (0.20.0):
43
- FBSDKCoreKit (~> 18.0)
54
- Flutter
65
- FBAEMKit (18.0.0):
76
- FBSDKCoreKit_Basics (= 18.0.0)
8-
- FBAudienceNetwork (6.16.0)
97
- FBSDKCoreKit (18.0.0):
108
- FBAEMKit (= 18.0.0)
119
- FBSDKCoreKit_Basics (= 18.0.0)
@@ -19,7 +17,6 @@ DEPENDENCIES:
1917
SPEC REPOS:
2018
trunk:
2119
- FBAEMKit
22-
- FBAudienceNetwork
2320
- FBSDKCoreKit
2421
- FBSDKCoreKit_Basics
2522

@@ -30,9 +27,8 @@ EXTERNAL SOURCES:
3027
:path: Flutter
3128

3229
SPEC CHECKSUMS:
33-
facebook_app_events: 015d0181fcb1bf667ada2b8f02d0f53b9ea296dc
30+
facebook_app_events: cfa07e73912a052992b5f218f79a19a66a99bf1a
3431
FBAEMKit: e34530df538b8eb8aeb53c35867715ba6c63ef0c
35-
FBAudienceNetwork: d1670939884e3a2e0ad98dca98d7e0c841417228
3632
FBSDKCoreKit: d3f479a69127acebb1c6aad91c1a33907bcf6c2f
3733
FBSDKCoreKit_Basics: 017b6dc2a1862024815a8229e75661e627ac1e29
3834
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@
147147
9705A1C41CF9048500538489 /* Embed Frameworks */,
148148
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
149149
7878047FC249226250759C2A /* [CP] Embed Pods Frameworks */,
150-
55C6264CF7F80AA283CFC693 /* [CP] Copy Pods Resources */,
151150
);
152151
buildRules = (
153152
);
@@ -222,24 +221,6 @@
222221
shellPath = /bin/sh;
223222
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
224223
};
225-
55C6264CF7F80AA283CFC693 /* [CP] Copy Pods Resources */ = {
226-
isa = PBXShellScriptBuildPhase;
227-
buildActionMask = 2147483647;
228-
files = (
229-
);
230-
inputPaths = (
231-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh",
232-
"${PODS_CONFIGURATION_BUILD_DIR}/FBAudienceNetwork/FBAudienceNetwork.bundle",
233-
);
234-
name = "[CP] Copy Pods Resources";
235-
outputPaths = (
236-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FBAudienceNetwork.bundle",
237-
);
238-
runOnlyForDeploymentPostprocessing = 0;
239-
shellPath = /bin/sh;
240-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
241-
showEnvVarsInLog = 0;
242-
};
243224
7878047FC249226250759C2A /* [CP] Embed Pods Frameworks */ = {
244225
isa = PBXShellScriptBuildPhase;
245226
buildActionMask = 2147483647;

example/pubspec.lock

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,57 +5,57 @@ packages:
55
dependency: transitive
66
description:
77
name: async
8-
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
8+
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "2.11.0"
11+
version: "2.12.0"
1212
boolean_selector:
1313
dependency: transitive
1414
description:
1515
name: boolean_selector
16-
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
16+
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
1717
url: "https://pub.dev"
1818
source: hosted
19-
version: "2.1.1"
19+
version: "2.1.2"
2020
characters:
2121
dependency: transitive
2222
description:
2323
name: characters
24-
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
24+
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
2525
url: "https://pub.dev"
2626
source: hosted
27-
version: "1.3.0"
27+
version: "1.4.0"
2828
clock:
2929
dependency: transitive
3030
description:
3131
name: clock
32-
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
32+
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
3333
url: "https://pub.dev"
3434
source: hosted
35-
version: "1.1.1"
35+
version: "1.1.2"
3636
collection:
3737
dependency: transitive
3838
description:
3939
name: collection
40-
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
40+
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
4141
url: "https://pub.dev"
4242
source: hosted
43-
version: "1.18.0"
43+
version: "1.19.1"
4444
facebook_app_events:
4545
dependency: "direct dev"
4646
description:
4747
path: ".."
4848
relative: true
4949
source: path
50-
version: "0.19.7"
50+
version: "0.20.0"
5151
fake_async:
5252
dependency: transitive
5353
description:
5454
name: fake_async
55-
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
55+
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
5656
url: "https://pub.dev"
5757
source: hosted
58-
version: "1.3.1"
58+
version: "1.3.2"
5959
flutter:
6060
dependency: "direct main"
6161
description: flutter
@@ -70,18 +70,18 @@ packages:
7070
dependency: transitive
7171
description:
7272
name: leak_tracker
73-
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
73+
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
7474
url: "https://pub.dev"
7575
source: hosted
76-
version: "10.0.5"
76+
version: "10.0.8"
7777
leak_tracker_flutter_testing:
7878
dependency: transitive
7979
description:
8080
name: leak_tracker_flutter_testing
81-
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
81+
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
8282
url: "https://pub.dev"
8383
source: hosted
84-
version: "3.0.5"
84+
version: "3.0.9"
8585
leak_tracker_testing:
8686
dependency: transitive
8787
description:
@@ -94,10 +94,10 @@ packages:
9494
dependency: transitive
9595
description:
9696
name: matcher
97-
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
97+
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
9898
url: "https://pub.dev"
9999
source: hosted
100-
version: "0.12.16+1"
100+
version: "0.12.17"
101101
material_color_utilities:
102102
dependency: transitive
103103
description:
@@ -110,71 +110,71 @@ packages:
110110
dependency: transitive
111111
description:
112112
name: meta
113-
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
113+
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
114114
url: "https://pub.dev"
115115
source: hosted
116-
version: "1.15.0"
116+
version: "1.16.0"
117117
path:
118118
dependency: transitive
119119
description:
120120
name: path
121-
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
121+
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
122122
url: "https://pub.dev"
123123
source: hosted
124-
version: "1.9.0"
124+
version: "1.9.1"
125125
sky_engine:
126126
dependency: transitive
127127
description: flutter
128128
source: sdk
129-
version: "0.0.99"
129+
version: "0.0.0"
130130
source_span:
131131
dependency: transitive
132132
description:
133133
name: source_span
134-
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
134+
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
135135
url: "https://pub.dev"
136136
source: hosted
137-
version: "1.10.0"
137+
version: "1.10.1"
138138
stack_trace:
139139
dependency: transitive
140140
description:
141141
name: stack_trace
142-
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
142+
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
143143
url: "https://pub.dev"
144144
source: hosted
145-
version: "1.11.1"
145+
version: "1.12.1"
146146
stream_channel:
147147
dependency: transitive
148148
description:
149149
name: stream_channel
150-
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
150+
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
151151
url: "https://pub.dev"
152152
source: hosted
153-
version: "2.1.2"
153+
version: "2.1.4"
154154
string_scanner:
155155
dependency: transitive
156156
description:
157157
name: string_scanner
158-
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
158+
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
159159
url: "https://pub.dev"
160160
source: hosted
161-
version: "1.2.0"
161+
version: "1.4.1"
162162
term_glyph:
163163
dependency: transitive
164164
description:
165165
name: term_glyph
166-
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
166+
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
167167
url: "https://pub.dev"
168168
source: hosted
169-
version: "1.2.1"
169+
version: "1.2.2"
170170
test_api:
171171
dependency: transitive
172172
description:
173173
name: test_api
174-
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
174+
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
175175
url: "https://pub.dev"
176176
source: hosted
177-
version: "0.7.2"
177+
version: "0.7.4"
178178
vector_math:
179179
dependency: transitive
180180
description:
@@ -187,10 +187,10 @@ packages:
187187
dependency: transitive
188188
description:
189189
name: vm_service
190-
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
190+
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
191191
url: "https://pub.dev"
192192
source: hosted
193-
version: "14.2.5"
193+
version: "14.3.1"
194194
sdks:
195-
dart: ">=3.3.0 <4.0.0"
195+
dart: ">=3.7.0-0 <4.0.0"
196196
flutter: ">=3.18.0-18.0.pre.54"

ios/Classes/SwiftFacebookAppEventsPlugin.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import Flutter
22
import UIKit
33
import FBSDKCoreKit
44
import FBSDKCoreKit_Basics
5-
import FBAudienceNetwork
65

76
public class SwiftFacebookAppEventsPlugin: NSObject, FlutterPlugin {
87
public static func register(with registrar: FlutterPluginRegistrar) {
@@ -185,7 +184,7 @@ public class SwiftFacebookAppEventsPlugin: NSObject, FlutterPlugin {
185184
let arguments = call.arguments as? [String: Any] ?? [String: Any]()
186185
let enabled = arguments["enabled"] as! Bool
187186
let collectId = arguments["collectId"] as! Bool
188-
FBAdSettings.setAdvertiserTrackingEnabled(enabled)
187+
Settings.shared.isAdvertiserTrackingEnabled = enabled
189188
Settings.shared.isAdvertiserTrackingEnabled = enabled
190189
Settings.shared.isAdvertiserIDCollectionEnabled = collectId
191190
result(nil)

ios/facebook_app_events.podspec

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'facebook_app_events'
3-
s.version = '0.0.1'
3+
s.version = '0.20.0'
44
s.summary = 'Flutter plugin for Facebook Analytics and App Events'
55
s.description = <<-DESC
66
Flutter plugin for Facebook Analytics and App Events
@@ -19,8 +19,4 @@ Flutter plugin for Facebook Analytics and App Events
1919
# Do not specify PATCH version of FBSDKCoreKit. See README file for explanation
2020
# https://github.com/oddbit/flutter_facebook_app_events#dependencies-on-facebook-sdk
2121
s.dependency 'FBSDKCoreKit', '~> 18.0'
22-
23-
# See docs on FBAudienceNetwork
24-
# https://developers.facebook.com/docs/audience-network/setting-up/platform-setup/ios/add-sdk/
25-
s.dependency 'FBAudienceNetwork', '6.16'
2622
end

lib/facebook_app_events.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,7 @@ class FacebookAppEvents {
290290
);
291291
}
292292

293-
/// Sets the Advert Tracking propeety for iOS advert tracking
294-
/// an iOS 14+ feature, android should just return a success.
293+
/// Sets the Advert Tracking property
295294
Future<void> setAdvertiserTracking({
296295
required bool enabled,
297296
bool collectId = true,

0 commit comments

Comments
 (0)