Skip to content

Commit c2464d3

Browse files
committed
Release 1.0.0-nullsafety.0
1 parent 1855107 commit c2464d3

File tree

10 files changed

+205
-44
lines changed

10 files changed

+205
-44
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
## 0.9.0
1+
## 1.0.0-nullsafety.0
2+
- Add nullsafety - PR by @RR-Reddy
3+
- Add support for iOSAdvertiserTrackingEnabled flag - default: false
24

5+
## 0.9.0
36
- Bumped up Audience Network SDK to v6.3.0
47

58
## 0.8.0

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
| - | - |
1414
| ![Interstitial Ad](https://raw.githubusercontent.com/dreamsoftin/facebook_audience_network/master/example/gifs/interstitial.gif "Interstitial Ad") | ![Rewarded Ad](https://raw.githubusercontent.com/dreamsoftin/facebook_audience_network/master/example/gifs/rewarded.gif "Rewarded Video Ad") |
1515

16-
16+
---
1717
## Getting Started
1818

1919
### 1. Initialization:
@@ -29,13 +29,15 @@ The hased id will be in printed to the logcat. Paste that onto the `testingId` p
2929
```dart
3030
FacebookAudienceNetwork.init(
3131
testingId: "37b1da9d-b48c-4103-a393-2e095e734bd6", //optional
32+
iOSAdvertiserTrackingEnabled: true //default false
3233
);
3334
```
3435
##### IOS Setup
3536
In Pod file, set the IOS deployment target version to 9.0
3637

3738
*IN iOS, Banner, Interstital and Native Ads are supported*
3839

40+
---
3941
### 2. Show Banner Ad:
4042

4143
```dart
@@ -63,7 +65,7 @@ Container(
6365
),
6466
)
6567
```
66-
68+
---
6769
### 3. Show Interstitial Ad:
6870

6971
```dart
@@ -75,6 +77,7 @@ FacebookInterstitialAd.loadInterstitialAd(
7577
},
7678
);
7779
```
80+
---
7881
### 4. Show Rewarded Video Ad:
7982
(Android Only)
8083

@@ -89,7 +92,7 @@ FacebookRewardedVideoAd.loadRewardedVideoAd(
8992
},
9093
);
9194
```
92-
95+
---
9396
### 5. Show Native Ad:
9497
- NativeAdType NATIVE_AD_HORIZONTAL & NATIVE_AD_VERTICAL ad types are supported only in iOS. In Android use NATIVE_AD.
9598
```dart
@@ -112,7 +115,7 @@ FacebookNativeAd(
112115
},
113116
),
114117
```
115-
118+
---
116119
### 6. Show Native Banner Ad:
117120
Use `NativeBannerAdSize` to choose the height for Native banner ads. `height` property is ignored for native banner ads.
118121

@@ -133,7 +136,7 @@ FacebookNativeAd(
133136
},
134137
),
135138
```
136-
139+
---
137140
**Check out the [example](https://github.com/dreamsoftin/facebook_audience_network/tree/master/example) for complete implementation.**
138141

139142
iOS wrapper code contribution by **lolqplay team from birdgang**

example/ios/Podfile.lock

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
PODS:
2-
- app_tracking_transparency (0.0.1):
3-
- Flutter
42
- facebook_audience_network (0.0.1):
53
- FBAudienceNetwork (~> 6.3)
64
- Flutter
@@ -10,7 +8,6 @@ PODS:
108
- Flutter (1.0.0)
119

1210
DEPENDENCIES:
13-
- app_tracking_transparency (from `.symlinks/plugins/app_tracking_transparency/ios`)
1411
- facebook_audience_network (from `.symlinks/plugins/facebook_audience_network/ios`)
1512
- Flutter (from `Flutter`)
1613

@@ -20,15 +17,12 @@ SPEC REPOS:
2017
- FBSDKCoreKit
2118

2219
EXTERNAL SOURCES:
23-
app_tracking_transparency:
24-
:path: ".symlinks/plugins/app_tracking_transparency/ios"
2520
facebook_audience_network:
2621
:path: ".symlinks/plugins/facebook_audience_network/ios"
2722
Flutter:
2823
:path: Flutter
2924

3025
SPEC CHECKSUMS:
31-
app_tracking_transparency: 5b1745ef9ade815f7455cb6a0848349589afb7c5
3226
facebook_audience_network: bb22bdda913d419d8c3247c9570bda4563302417
3327
FBAudienceNetwork: 58b4d0f2359783e5bc9ee59f138b4fda43173ac4
3428
FBSDKCoreKit: fada1a6a0076724678993ff05a633848765ff18c

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
TargetAttributes = {
178178
97C146ED1CF9000F007C117D = {
179179
CreatedOnToolsVersion = 7.3.1;
180-
DevelopmentTeam = LWNWGSMVRA;
180+
DevelopmentTeam = DDVJA87MT8;
181181
LastSwiftMigration = 1130;
182182
};
183183
};
@@ -275,12 +275,10 @@
275275
inputPaths = (
276276
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
277277
"${BUILT_PRODUCTS_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework",
278-
"${BUILT_PRODUCTS_DIR}/app_tracking_transparency/app_tracking_transparency.framework",
279278
);
280279
name = "[CP] Embed Pods Frameworks";
281280
outputPaths = (
282281
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKCoreKit.framework",
283-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/app_tracking_transparency.framework",
284282
);
285283
runOnlyForDeploymentPostprocessing = 0;
286284
shellPath = /bin/sh;
@@ -379,7 +377,7 @@
379377
CLANG_ENABLE_MODULES = YES;
380378
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
381379
DEFINES_MODULE = NO;
382-
DEVELOPMENT_TEAM = LWNWGSMVRA;
380+
DEVELOPMENT_TEAM = DDVJA87MT8;
383381
ENABLE_BITCODE = NO;
384382
FRAMEWORK_SEARCH_PATHS = (
385383
"$(inherited)",
@@ -392,7 +390,7 @@
392390
"$(inherited)",
393391
"$(PROJECT_DIR)/Flutter",
394392
);
395-
PRODUCT_BUNDLE_IDENTIFIER = com.rr.interestCalculator;
393+
PRODUCT_BUNDLE_IDENTIFIER = com.dsi.facebookAudienceNetworkExample;
396394
PRODUCT_NAME = "$(TARGET_NAME)";
397395
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
398396
SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
@@ -511,7 +509,7 @@
511509
CLANG_ENABLE_MODULES = YES;
512510
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
513511
DEFINES_MODULE = NO;
514-
DEVELOPMENT_TEAM = LWNWGSMVRA;
512+
DEVELOPMENT_TEAM = DDVJA87MT8;
515513
ENABLE_BITCODE = NO;
516514
FRAMEWORK_SEARCH_PATHS = (
517515
"$(inherited)",
@@ -524,7 +522,7 @@
524522
"$(inherited)",
525523
"$(PROJECT_DIR)/Flutter",
526524
);
527-
PRODUCT_BUNDLE_IDENTIFIER = com.rr.interestCalculator;
525+
PRODUCT_BUNDLE_IDENTIFIER = com.dsi.facebookAudienceNetworkExample;
528526
PRODUCT_NAME = "$(TARGET_NAME)";
529527
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
530528
SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
@@ -542,7 +540,7 @@
542540
CLANG_ENABLE_MODULES = YES;
543541
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
544542
DEFINES_MODULE = NO;
545-
DEVELOPMENT_TEAM = LWNWGSMVRA;
543+
DEVELOPMENT_TEAM = DDVJA87MT8;
546544
ENABLE_BITCODE = NO;
547545
FRAMEWORK_SEARCH_PATHS = (
548546
"$(inherited)",
@@ -555,7 +553,7 @@
555553
"$(inherited)",
556554
"$(PROJECT_DIR)/Flutter",
557555
);
558-
PRODUCT_BUNDLE_IDENTIFIER = com.rr.interestCalculator;
556+
PRODUCT_BUNDLE_IDENTIFIER = com.dsi.facebookAudienceNetworkExample;
559557
PRODUCT_NAME = "$(TARGET_NAME)";
560558
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
561559
SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";

example/lib/main.dart

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ void main() => runApp(AdExampleApp());
66
class AdExampleApp extends StatelessWidget {
77
@override
88
Widget build(BuildContext context) {
9-
109
return MaterialApp(
1110
debugShowCheckedModeBanner: false,
1211
title: 'FB Audience Network Example',
@@ -27,16 +26,12 @@ class AdExampleApp extends StatelessWidget {
2726
),
2827
);
2928
}
30-
31-
3229
}
3330

34-
3531
class AdsPage extends StatefulWidget {
36-
3732
final String idfa;
3833

39-
const AdsPage({Key? key, this.idfa=''}) : super(key: key);
34+
const AdsPage({Key? key, this.idfa = ''}) : super(key: key);
4035

4136
@override
4237
AdsPageState createState() => AdsPageState();
@@ -58,22 +53,21 @@ class AdsPageState extends State<AdsPage> {
5853
void initState() {
5954
super.initState();
6055

61-
6256
/// please add your own device testingId
6357
/// (testingId will print in console if you don't provide )
6458
FacebookAudienceNetwork.init(
6559
testingId: "a77955ee-3304-4635-be65-81029b0f5201",
60+
iOSAdvertiserTrackingEnabled: true,
6661
);
6762

68-
6963
_loadInterstitialAd();
7064
_loadRewardedVideoAd();
7165
}
7266

7367
void _loadInterstitialAd() {
7468
FacebookInterstitialAd.loadInterstitialAd(
75-
placementId:
76-
"YOUR_PLACEMENT_ID", //"IMG_16_9_APP_INSTALL#2312433698835503_2650502525028617" YOUR_PLACEMENT_ID
69+
// placementId: "YOUR_PLACEMENT_ID",
70+
placementId: "IMG_16_9_APP_INSTALL#2312433698835503_2650502525028617",
7771
listener: (result, value) {
7872
print(">> FAN > Interstitial Ad: $result --> $value");
7973
if (result == InterstitialAdResult.LOADED)
@@ -189,9 +183,10 @@ class AdsPageState extends State<AdsPage> {
189183

190184
_showBannerAd() {
191185
setState(() {
192-
_currentAd = FacebookBannerAd(placementId: "YOUR_PLACEMENT_ID",
193-
// placementId:
194-
// "IMG_16_9_APP_INSTALL#2312433698835503_2964944860251047", //testid
186+
_currentAd = FacebookBannerAd(
187+
// placementId: "YOUR_PLACEMENT_ID",
188+
placementId:
189+
"IMG_16_9_APP_INSTALL#2312433698835503_2964944860251047", //testid
195190
bannerSize: BannerSize.STANDARD,
196191
listener: (result, value) {
197192
print("Banner Ad: $result --> $value");
@@ -207,8 +202,9 @@ class AdsPageState extends State<AdsPage> {
207202
}
208203

209204
Widget _nativeBannerAd() {
210-
return FacebookNativeAd(placementId: "YOUR_PLACEMENT_ID",
211-
// placementId: "IMG_16_9_APP_INSTALL#2312433698835503_2964953543583512",
205+
return FacebookNativeAd(
206+
// placementId: "YOUR_PLACEMENT_ID",
207+
placementId: "IMG_16_9_APP_INSTALL#2312433698835503_2964953543583512",
212208
adType: NativeAdType.NATIVE_BANNER_AD,
213209
bannerAdSize: NativeBannerAdSize.HEIGHT_100,
214210
width: double.infinity,
@@ -232,7 +228,7 @@ class AdsPageState extends State<AdsPage> {
232228

233229
Widget _nativeAd() {
234230
return FacebookNativeAd(
235-
// placementId: "IMG_16_9_APP_INSTALL#2312433698835503_2964952163583650",
231+
placementId: "IMG_16_9_APP_INSTALL#2312433698835503_2964952163583650",
236232
adType: NativeAdType.NATIVE_AD_VERTICAL,
237233
width: double.infinity,
238234
height: 300,
@@ -250,4 +246,3 @@ class AdsPageState extends State<AdsPage> {
250246
);
251247
}
252248
}
253-

0 commit comments

Comments
 (0)