Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Implement out of band updates for Brave Ads
Browse files Browse the repository at this point in the history
  • Loading branch information
tmancey committed Jul 9, 2020
1 parent bb0238c commit 7813f49
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 144 deletions.
20 changes: 20 additions & 0 deletions BraveRewards/BraveRewards.dSYM/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.BraveRewards</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Binary file modified BraveRewards/BraveRewards.framework/BraveRewards
Binary file not shown.
3 changes: 0 additions & 3 deletions BraveRewards/BraveRewards.framework/Headers/BATBraveAds.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ NS_SWIFT_NAME(BraveAds)
/// Automatically detected ads subdivision targeting code
@property (nonatomic, copy) NSString * automaticallyDetectedSubdivisionTargetingCode;

/// The user model locales Brave Ads supports currently
@property (nonatomic, readonly) NSArray<NSString *> *userModelLanguages;

/// Remove all cached history (should be called when the user clears their browser history)
- (void)removeAllHistory:(void (^)(BOOL))completion;

Expand Down
4 changes: 4 additions & 0 deletions BraveRewards/BraveRewards.framework/Headers/BATBraveLedger.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ NS_SWIFT_NAME(BraveLedger)

- (void)rewardsInternalInfo:(void (NS_NOESCAPE ^)(BATRewardsInternalsInfo * _Nullable info))completion;

- (void)allContributions:(void (^)(NSArray<BATContributionInfo *> *contributions))completion;

@property (nonatomic, readonly, copy) NSString *rewardsDatabasePath;

#pragma mark - Reporting

@property (nonatomic) UInt32 selectedTabId;
Expand Down
19 changes: 9 additions & 10 deletions BraveRewards/BraveRewards.framework/Headers/ledger.mojom.objc.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@


typedef NS_ENUM(NSInteger, BATContributionStep) {
BATContributionStepStepRetryCount = -7,
BATContributionStepStepAcOff = -6,
BATContributionStepStepRewardsOff = -5,
BATContributionStepStepAcTableEmpty = -4,
BATContributionStepStepNotEnoughFunds = -3,
BATContributionStepStepFailed = -2,
Expand Down Expand Up @@ -91,6 +94,8 @@ typedef NS_ENUM(NSInteger, BATResult) {
BATResultRetryLong = 31,
BATResultContinue = 32,
BATResultInProgress = 33,
BATResultRewardsOff = 34,
BATResultAcOff = 35,
} NS_SWIFT_NAME(Result);


Expand Down Expand Up @@ -255,7 +260,7 @@ typedef NS_ENUM(NSInteger, BATInlineTipsPlatforms) {



@class BATContributionInfo, BATContributionPublisher, BATPublisherInfo, BATPublisherBanner, BATPendingContribution, BATPendingContributionInfo, BATVisitData, BATRewardsParameters, BATBalance, BATAutoContributeProperties, BATMediaEventInfo, BATExternalWallet, BATBalanceReportInfo, BATActivityInfoFilterOrderPair, BATActivityInfoFilter, BATRewardsInternalsInfo, BATServerPublisherInfo, BATServerPublisherPartial, BATTransferFee, BATContributionQueue, BATContributionQueuePublisher, BATPromotion, BATUnblindedToken, BATClientInfo, BATRecurringTip, BATTransactionReportInfo, BATContributionReportInfo, BATMonthlyReportInfo, BATCredsBatch, BATSKUOrder, BATSKUOrderItem, BATSKUTransaction, BATUrlResponse;
@class BATContributionInfo, BATContributionPublisher, BATPublisherInfo, BATPublisherBanner, BATPendingContribution, BATPendingContributionInfo, BATVisitData, BATRewardsParameters, BATBalance, BATAutoContributeProperties, BATMediaEventInfo, BATExternalWallet, BATBalanceReportInfo, BATActivityInfoFilterOrderPair, BATActivityInfoFilter, BATRewardsInternalsInfo, BATServerPublisherInfo, BATTransferFee, BATContributionQueue, BATContributionQueuePublisher, BATPromotion, BATUnblindedToken, BATClientInfo, BATRecurringTip, BATTransactionReportInfo, BATContributionReportInfo, BATMonthlyReportInfo, BATCredsBatch, BATSKUOrder, BATSKUOrderItem, BATSKUTransaction, BATUrlResponse;

NS_ASSUME_NONNULL_BEGIN

Expand Down Expand Up @@ -291,6 +296,7 @@ NS_SWIFT_NAME(PublisherInfo)
@property (nonatomic) int32_t category;
@property (nonatomic) uint64_t reconcileStamp;
@property (nonatomic) BATPublisherStatus status;
@property (nonatomic) uint64_t statusUpdatedAt;
@property (nonatomic, copy) NSString * name;
@property (nonatomic, copy) NSString * url;
@property (nonatomic, copy) NSString * provider;
Expand Down Expand Up @@ -326,6 +332,7 @@ NS_SWIFT_NAME(PendingContributionInfo)
@property (nonatomic, copy) NSString * publisherKey;
@property (nonatomic) BATRewardsType type;
@property (nonatomic) BATPublisherStatus status;
@property (nonatomic) uint64_t statusUpdatedAt;
@property (nonatomic, copy) NSString * name;
@property (nonatomic, copy) NSString * url;
@property (nonatomic, copy) NSString * provider;
Expand Down Expand Up @@ -435,19 +442,11 @@ NS_SWIFT_NAME(ServerPublisherInfo)
@interface BATServerPublisherInfo : NSObject <NSCopying>
@property (nonatomic, copy) NSString * publisherKey;
@property (nonatomic) BATPublisherStatus status;
@property (nonatomic) bool excluded;
@property (nonatomic, copy) NSString * address;
@property (nonatomic) uint64_t updatedAt;
@property (nonatomic, copy, nullable) BATPublisherBanner * banner;
@end

NS_SWIFT_NAME(ServerPublisherPartial)
@interface BATServerPublisherPartial : NSObject <NSCopying>
@property (nonatomic, copy) NSString * publisherKey;
@property (nonatomic) BATPublisherStatus status;
@property (nonatomic) bool excluded;
@property (nonatomic, copy) NSString * address;
@end

NS_SWIFT_NAME(TransferFee)
@interface BATTransferFee : NSObject <NSCopying>
@property (nonatomic, copy) NSString * id;
Expand Down
111 changes: 0 additions & 111 deletions BraveRewards/BraveRewards.framework/bundle-schema.json

This file was deleted.

53 changes: 37 additions & 16 deletions BraveRewards/BraveRewards.framework/catalog-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@
"totalMax",
"segments",
"creatives",
"oses"
"oses",
"channels"
],
"properties": {
"creativeSetId": {
Expand Down Expand Up @@ -163,6 +164,7 @@
},
"segments": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -202,6 +204,12 @@
}
}
},
"channels": {
"type": "array",
"items": {
"type": "string"
}
},
"creatives": {
"type": "array",
"items": {
Expand Down Expand Up @@ -242,23 +250,36 @@
},
"payload": {
"type": "object",
"additionalProperties": false,
"required": [
"targetUrl",
"body",
"title"
],
"properties": {
"targetUrl": {
"type": "string"
},
"body": {
"type": "string"
"oneOf": [
{
"properties": {
"targetUrl": {
"type": "string"
},
"body": {
"type": "string"
},
"title": {
"type": "string"
}
},
"additionalProperties": false
},
"title": {
"type": "string"
{
"properties": {
"creativeUrl": {
"type": "string"
},
"size": {
"type": "string"
},
"targetUrl": {
"type": "string"
}
},
"additionalProperties": false
}
}
]
}
}
}
Expand Down
Binary file modified BraveRewards/BraveRewards.framework/icudtl.dat
Binary file not shown.

This file was deleted.

6 changes: 3 additions & 3 deletions BraveRewards/BraveRewards.resolved
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build: Release
brave-browser: 1.10.x (7e07f2574f0d61f1ceca904091466006dddf26e0)
brave-core: 1.10.x-ios (261aa5b6143c269ede179ee55ff413a6fe567843)
latest tag: v1.10.97
brave-browser: master (77ca149a4f468723a0ae5d05e71c5d9a265abc48)
brave-core: issues/8396 (0b0e64b15c51448bec495a80758a7b351c646158)
latest tag: v1.12.78

0 comments on commit 7813f49

Please sign in to comment.