Commit Graph

4360 Commits

Author SHA1 Message Date
Shawn Zeng
dbacc829d3 Dynamic loading parameters
Summary: Dynamically loading standard parameters list from server. If fail, ball back to the default list

Reviewed By: KylinChang

Differential Revision: D46922765

fbshipit-source-id: c66d1466beb9e6eb1fb4122d664c4c68d82f01f1
2023-06-23 16:51:08 -07:00
Shawn Zeng
8845830fe7 Update Standard Parameters List
Summary: TSIA

Reviewed By: KylinChang

Differential Revision: D46920664

fbshipit-source-id: 6477ba83da59ca67cbc9fa874234f5cfca2f5b7f
2023-06-23 10:03:34 -07:00
Xin Wu
b06c49aead Add coarse config to event/currency set
Summary: $ title

Differential Revision: D46845185

fbshipit-source-id: 3b7e0dbc80cd64d58021ca3270fc8bb69073ea93
2023-06-21 15:47:14 -07:00
Zilin Zhang
622102a128 Add isMatchCCRule
Reviewed By: amleshjk

Differential Revision: D46845532

fbshipit-source-id: f2fcae4da48920b7a874a0d960c86843ed84f89f
2023-06-21 15:30:57 -07:00
Zilin Zhang
6eafa3467a Add CCRuleEngine StringComparison & getKey
Reviewed By: amleshjk

Differential Revision: D46789789

fbshipit-source-id: ab31d733a05b7cfb0b55dd3ddbdcf4632745fa10
2023-06-21 15:30:54 -07:00
Shawn Zeng
324e900bed Set up MACARuleMatchingManager
Summary:
**Context**
As previous diffs D46705940, we enable `ProtectedMode` to filter non-standard parameter of App Events in client side. But without those params, the MACA matching cannot be done in server, so we need to move the MACA rule matching to client side as well.

**In this diff**
- Add new feature `FBSDKFeatureMACARuleMatching`
- Add new class `MACARuleMatchingManager` and add to the AppEvents' configuration

Reviewed By: KylinChang

Differential Revision: D46779149

fbshipit-source-id: d12ac3b6be2cd173fdd5023d096c1ad1478cd2f8
2023-06-21 14:27:59 -07:00
Zilin Zhang
1640abe41a Bump version
Summary: $title

Differential Revision: D46789002

fbshipit-source-id: 036b53b962bc74bf83160d5afbd17d7a74b8df44
2023-06-16 11:05:09 -07:00
Shawn Zeng
e94f74575b Implement processParameters method
Summary:
**In this diff**
- Implement the filter method of ProtectedModeManager.

Now the standardParameter list is hardcoded in FBSDK, will change to dynamically load in the future.

Reviewed By: KylinChang

Differential Revision: D46708165

fbshipit-source-id: 6984dec83ae578e87e8df2871c28ab93a2a989ba
2023-06-15 09:34:09 -07:00
Shawn Zeng
9cea64cd78 Add new ProtectedMode feature
Summary:
New diff copy from D46668428

ProtectedMode is a new feature added in FBSDK, in order to filter the non-standard parameters in AppEvents that will be sent to the FB server.

**In this diff**
- Create ProtectedModeManager class stub
- Add protectedMode to the AppEvent configuration

Reviewed By: Nathaaaalie

Differential Revision: D46705940

fbshipit-source-id: e3f164c7d3c9996232b3e8d12c51128494f8cef5
2023-06-15 09:34:07 -07:00
Zilin Zhang
814863c8d8 Bump v16.1.1
Summary: $title

Reviewed By: wx0165927473

Differential Revision: D46714164

fbshipit-source-id: bc42540e1569cf1d482fa111a6c4bf26a5b979bf
2023-06-14 10:12:00 -07:00
Zilin Zhang
e26a812022 Add AEM AutoSetup Proxy control
Summary: $title

Reviewed By: wx0165927473

Differential Revision: D46631107

fbshipit-source-id: e249fa2d7cfe3232a28b3659f346a954ade08920
2023-06-14 10:04:06 -07:00
Zilin Zhang
2474f76aae Add proxy support
Reviewed By: wx0165927473

Differential Revision: D46430795

fbshipit-source-id: 001ca2de5ed49ea73937d360f1ddd7cc89d659d3
2023-06-14 10:04:03 -07:00
Xin Wu
792f9a03dc fix unit tests
Summary: $title

Reviewed By: Nathaaaalie, KylinChang

Differential Revision: D46675691

fbshipit-source-id: d32a88d3b28fb600241c230e2462ed793e86ee70
2023-06-13 09:15:49 -07:00
Xin Wu
bceec0ae12 Add unit tests
Summary: $title

Reviewed By: KylinChang

Differential Revision: D46452809

fbshipit-source-id: 5158af6fe281c532ae730ca779afd8489456a93b
2023-06-12 10:33:58 -07:00
Xin Wu
663455e675 Add new fields in config graph API
Summary:
Schema design: https://docs.google.com/document/d/1w39R4VCAodg3ciM9kkGzSpPC_Bs6xkI2-DQZMnfB2JQ/edit#heading=h.a90wcj6w8gsd

Here is the new v4 schema looks like:
```
{
  "data": [
    {
      "lock_window_rules": [
        {
          "lock_window_type": "time",
          "time": 36,
          "postback_sequence_index": 1
        },
        {
          "lock_window_type": "event",
          "events": [
            {
              "event_name": "fb_mobile_purchase",
              "values": [
                {
                  "currency": "USD",
                  "amount": 10.1
                }
              ]
            }
          ]
          "postback_sequence_index": 2
        }
      ],
      "coarse_cv_configs": [
        {
          "postback_sequence_index": 1,
          "coarse_cv_rules": [
            {
              "coarse_cv_value": "high",
              "events": [
                {
                  "event_name": "fb_mobile_purchase",
                  "values": [
                    {
                      "currency": "USD",
                      "amount": 10.1
                    }
                  ]
                }
              ]
            }
          ],
          "update_time": 1602399600
        }
      ],
      "is_coarse_cv_accumulative": false
    }
  ]
}
```

Reviewed By: KylinChang

Differential Revision: D46347246

fbshipit-source-id: 208531535673806479cf40056898c609ad3e11bb
2023-06-12 10:33:56 -07:00
Zilin Zhang
397e7f4f87 Add nullable url support for AEM handling
Summary: Fix https://github.com/facebook/facebook-ios-sdk/issues/2209?fbclid=IwAR2gcZAqSTsAzvRLjCb_r9nRJlTSnWhN9KtAzwbnF8fGnRBk0Imxed6c6vo

Differential Revision: D46331151

fbshipit-source-id: 94c9efd936b0d36be17939409ea83e7c7c9fe4b7
2023-05-31 14:19:04 -07:00
Zilin Zhang
6563a8cdcd Publish ATE in main thread
Summary: This fixes https://github.com/facebook/facebook-ios-sdk/issues/2168 , app events are sent in main thread and publishing ATE didn't happen in main thread. That may cause app events flushing waiting for ATE publishing in encodedDeviceInfo and thus lead to ANR issue. We should make ATE publishing in main thread as well.

Differential Revision: D46326000

fbshipit-source-id: 28bf4cab8e5035ede740056c1eae4984095fa101
2023-05-31 13:58:26 -07:00
Zilin Zhang
9013cdb326 Clean Comments
Summary: $title

Reviewed By: dreamolight

Differential Revision: D45746783

fbshipit-source-id: 63e9e630e23f67038cd09c90c12238b9545eba58
2023-05-10 13:56:25 -07:00
Zilin Zhang
fac1b605fc Bump v16.1.0
Summary: $title

Differential Revision: D45202361

fbshipit-source-id: d22d58af5a40b2c4887f9b713c885bde018628bf
2023-04-21 16:29:19 -07:00
Zilin Zhang
ee28a5352a set user agent
Summary: $title

Reviewed By: aseempuri, wx0165927473

Differential Revision: D45072518

fbshipit-source-id: f53bd86e5b567e2264d2100b26ba9b4429e48664
2023-04-18 11:23:01 -07:00
Zilin Zhang
1156cb7df2 Add campaignids support
Summary: $title

Differential Revision: D45070047

fbshipit-source-id: 670583d1869959829a852be4362c1daf67953b52
2023-04-18 11:22:59 -07:00
Zilin Zhang
658fb009da Optimize the config loading
Summary:
We optimize the CAPIG config loading in this diff. We don't load the CAPIG config every time we log CAPIG event, but only load the config if:
1. Last refresh timestamp is over 24 hours, or
2. CAPIG config doesn't exist (e.g. loaded config is not valid)

We also add a flag to mark whether we're loading config now, if yes, then we just add the callback to the callback list and wait for the config loading completion. In order to make those thread-safe, we create a serial queue and put the operations inside the serial queue.

Differential Revision: D45035238

fbshipit-source-id: d69216bab9935549750b726e9894bcb61c64b937
2023-04-18 11:22:56 -07:00
Zilin Zhang
3ec6938586 Fix install event logging
Summary:
We need to have config loaded before we sended CAPIG events. Previously the install event logging happens at the same time with config loading and that causes we'll miss install events. In order to fix that,
1. we add `load` function which loads the config and it'll execute completion blocks after we load the config
2. in the function `recordEvent`, we'll call the `load` function and put CAPIG event logging as callback block to `load`

Differential Revision: D45034581

fbshipit-source-id: 33af95049985a26d5daf524dc23aac5435799d40
2023-04-18 00:03:41 -07:00
Zilin Zhang
f3c65f6e38 Bump v16.0.1
Summary: $title

Differential Revision: D44409836

fbshipit-source-id: ff376469141dbb6106903a97846136a62dd4d1ce
2023-03-27 11:48:25 -07:00
Zilin Zhang
f0565956db Add the fix to make AEM Reporter configuration public
Summary: $title

Reviewed By: wx0165927473

Differential Revision: D44350264

fbshipit-source-id: 1e5eb44f215be4e944a2b430aba81d5783281448
2023-03-23 14:37:53 -07:00
Zilin Zhang
91650cc434 Bump SDK version to 16.0.1
Summary: $title

Reviewed By: wx0165927473

Differential Revision: D44318993

fbshipit-source-id: 75d4e63be496e58494ae095572df64b6f982b075
2023-03-22 16:18:55 -07:00
Zilin Zhang
97a160efcf Flush Events if AEM campaign id is found
Summary: We'd like to flush events if AEM campaign id is found

Reviewed By: wx0165927473

Differential Revision: D44314208

fbshipit-source-id: 35a570ce4b5b32df16cfdca3ab5e8192dc260246
2023-03-22 15:27:15 -07:00
Zilin Zhang
014f33b367 Update package manifest and podspecs for v16.0.0 release
Summary: N\A

Reviewed By: wx0165927473, samodom

Differential Revision: D43110845

fbshipit-source-id: de2f1ca4f584d61053aaf27e15fbab7eff960f58
2023-02-08 10:52:46 -08:00
Zilin Zhang
9f074858f0 Fix scenedelegate support
Summary:
When SDK initializes, connectedScenes may be an empty Set, we should check info.plist (info.plist defines scenedelegates) instead.

https://developer.apple.com/documentation/uikit/app_and_environment/scenes/specifying_the_scenes_your_app_supports?language=objc

Differential Revision: D43100903

fbshipit-source-id: abb3c20cc35c29a33c5e4d85a89493400cc985ec
2023-02-07 14:55:59 -08:00
Zilin Zhang
49e49f7336 Bump SDK version to 16.0.0 and Graph API Version to 16.0
Reviewed By: samodom

Differential Revision: D42979901

fbshipit-source-id: 14fcc0e409bb5a818908778cf7876bab3bbde835
2023-02-02 16:32:21 -08:00
Zilin Zhang
83fe2af755 Add support for campaignids
Summary: Add support for campaignids

Differential Revision: D42916574

fbshipit-source-id: 0c4b45e45a8b66debb76abad57cb2dfb3f79a1a8
2023-02-01 15:18:04 -08:00
Zilin Zhang
b175ede690 Add AEM Auto Setup Shield
Summary:
Add AEM Shield to protect AEM Auto Setup:
- Disable Auto Setup if exception is found
- Send crash reports if exception is found

Differential Revision: D42860772

fbshipit-source-id: f61e60eb5bde373b220f343724d4639d9505d74b
2023-02-01 14:29:01 -08:00
Zilin Zhang
feaa05adc5 Add event logging for AutoSetup
Summary: Log Auto Setup Optin\Optout status event

Differential Revision: D42837159

fbshipit-source-id: d0e177e47dc41fbf6de9c6b32959370f110fd725
2023-02-01 13:28:38 -08:00
Zilin Zhang
9435ab9f24 Add GK control for Auto Setup
Summary: Add GK control for Auto Setup so we can turn on\off Auto Setup remotely

Differential Revision: D42735249

fbshipit-source-id: 6d0c1f504fa207c77df0131f8b84689a3118960c
2023-01-27 16:13:35 -08:00
Zilin Zhang
5222c7b720 Add AEM Manager to configurator
Summary: Add AEM Manager as part of configurator so that FB SDK can config the AEM Auto Setup

Differential Revision: D42669713

fbshipit-source-id: 4c1bcfa2bec0394e31943583bd88d43b9f74690f
2023-01-27 16:13:33 -08:00
Zilin Zhang
c9bfb83b14 Add AEM Auto Setup to CoreKit
Summary: Add AEM Auto Setup module to CoreKit

Differential Revision: D42669073

fbshipit-source-id: c6bd8cf31e1129dfc306d2b4a20586cf64a44938
2023-01-27 16:13:31 -08:00
Sam Odom
54f8e66581 Skip failing profile picture view tests
Summary: These tests were flaky before now but seem to be failing in CI (only) every time.

Reviewed By: KylinChang

Differential Revision: D42723774

fbshipit-source-id: 18fc61b547231e4932569da96186989a1fd3342b
2023-01-24 14:29:11 -08:00
Sam Odom
46f2c431d2 Temporarily disable image tests
Summary: These tests are being skipped due to changes in Xcode 14.1 that produce new and different PNG data

Reviewed By: joshlevitre

Differential Revision: D41112236

fbshipit-source-id: aaec3a550c37614a62a0e7cd1243e64a2ec208e5
2022-11-08 09:15:47 -08:00
Sam Odom
a8fcccef3c Update package manifest and podspecs for v15.1.0
Reviewed By: josueBrizuelaXD

Differential Revision: D40867463

fbshipit-source-id: ec2bb2aeb7eec9905ece8d8b4a4ac164749ab3f0
2022-10-31 14:48:55 -07:00
naveen
b0c58e0fe2 chore: Set permissions for GitHub actions (#2072)
Summary:
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>

Pull Request resolved: https://github.com/facebook/facebook-ios-sdk/pull/2072

Reviewed By: joesus

Differential Revision: D40737684

Pulled By: jawwad

fbshipit-source-id: b0a40666855308f60714e48d49ac8ae3e4277150
2022-10-28 11:43:05 -07:00
Jawwad Ahmad
d48d92a3c0 Sort methods and properties in CoreKitComponents and CoreKitConfigurator
Reviewed By: samodom

Differential Revision: D40700045

fbshipit-source-id: 63153a1a6f2bd029760f2eca1a4e35c480196b69
2022-10-27 09:14:18 -07:00
Jawwad Ahmad
897d66be0d Remove support for tvOS
Summary: tvOS is no longer supported

Reviewed By: samodom

Differential Revision: D40691780

fbshipit-source-id: f189dc7a95825ac04c9e87cb98b990ea29eaebf4
2022-10-26 09:02:20 -07:00
Sam Odom
ef4f8ecdef Configure the shared settings instance before anything else
Summary: When configuring the shared app events instance before configuring settings, the settings app ID is nil because its info dictionary provider isn't configured yet. This change makes sure that settings is configured before all other types since so many components rely on it.

Reviewed By: jawwad

Differential Revision: D40694989

fbshipit-source-id: beb4c362ff2af539497e1f235da1c97b530dc0da
2022-10-26 08:53:52 -07:00
Zilin Zhang
4544a43785 Append AEM campaign ids to App Event
Summary: $title

Reviewed By: wx0165927473

Differential Revision: D40649498

fbshipit-source-id: bd8a62608fea4cabf7ebc743da5bd9b565870211
2022-10-25 13:42:08 -07:00
Jawwad Ahmad
98b0b91800 Remove FBSDKTVOSKit
Summary: FBSDKTVOSKit was previously deprecated. This commit removes it completely.

Reviewed By: samodom

Differential Revision: D40688750

fbshipit-source-id: 2c981ce6bff126c0781d027d5dfa7cc7649312e3
2022-10-25 13:20:43 -07:00
Jawwad Ahmad
8b97c8f111 Update Stack Overflow link to navigate to facebook-ios-sdk tag
Summary: The Stack Overflow link was set up as facebook.stackoverflow.com. This redirects to the "questions tagged facebook" link at https://stackoverflow.com/questions/tagged/facebook. However it would be better to navigate to "questions tagged facebook-ios-sdk", so the https://stackoverflow.com/questions/tagged/facebook-ios-sdk link feels more appropriate.

Reviewed By: josueBrizuelaXD

Differential Revision: D40681706

fbshipit-source-id: bcb1436ca1a33035bfa712f53b4cf77daea837e9
2022-10-25 10:34:17 -07:00
Jawwad Ahmad
21c969c082 Bump waitForExpectations from 2 to 4 in attempt to fix test flakyness
Summary: Might as well try to wait a bit longer if it prevents the test failing.

Reviewed By: samodom

Differential Revision: D40648425

fbshipit-source-id: 2ee79f29c81c4cb340d299f876dcb3d08ba13312
2022-10-24 13:50:19 -07:00
Jawwad Ahmad
9c9676c6b4 Fix some issues in bump-version script
Summary: Podfiles won't be updated since they are generated, but FBSDKTVOSKit.podspec is not (even though it will be removed soon)

Reviewed By: samodom

Differential Revision: D40645524

fbshipit-source-id: c896e3031d7296ed676a65017416cec9febe0de9
2022-10-24 12:50:31 -07:00
Sam Odom
7e0911c0f1 Bump version to 15.1.0
Summary:
Facbook:
Discarded the automatic changes to the podspecs (except TVOSKit) since they're generated.

Reviewed By: jawwad

Differential Revision: D40644294

fbshipit-source-id: 4f2f30ecba634e234de8aa1020c7c40aeed19b64
2022-10-24 11:21:52 -07:00
Jawwad Ahmad
7092d1610e Remove unnecessary NSObject subclassing from FBAEMKit
Reviewed By: samodom

Differential Revision: D40566483

fbshipit-source-id: 7e86504fa69c6509526b5f46aa482321e68e812b
2022-10-21 15:30:46 -07:00