206 Commits

Author SHA1 Message Date
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
Sam Odom
64c8d42227 Publish FBSDKTVOSKit (FacebookTV) as Swift package
Summary: Resolve [GitHub issue #1936](https://github.com/facebook/facebook-ios-sdk/issues/1936)

Reviewed By: jawwad

Differential Revision: D34400429

fbshipit-source-id: a887906baa185b4a62e6952b7bab4059711d5235
2022-02-22 18:26:30 -08:00
Jawwad Ahmad
df34d27609 Complete restructuring/renaming of FacebookGamingServices to FBSDKGamingServicesKit
Summary:
Context:
We currently have 2 gaming modules FacebookGamingServices and FBSDKGamingServicesKit

FacebookGamingServices is currently the main module and FBSDKGamingServicesKit is a wrapper around it. The FBSDKGamingServicesKit wrapper previously included 2 Objective-C wrappers to expose functionality in Swift-only code in FacebookGamingServices. However, the maintenance cost of maintaining 2 separate modules was very high so these are being combined into one module.

For this, all of the Objective-C wrappers have been moved to FacebookGamingServices so FBSDKGamingServicesKit is now just an empty wrapper around FacebookGamingServices.

In this diff, I've made the FBSDKGamingServicesKit module the main module and made FacebookGamingServices be a wrapper around it, as we are doing for other kits for Swift Package Manager.

Reviewed By: samodom

Differential Revision: D33935669

fbshipit-source-id: bec45c4534d30800f7150a94a7556d75f78e67a8
2022-02-02 15:15:40 -08:00
Jawwad Ahmad
c78046ab83 Move source code for FBAEMKit from under Sources to be under FBAEMKit
Summary:
```
Before: Sources/FBAEMKit
After: FBAEMKit/FBAEMKit
```

Reviewed By: samodom

Differential Revision: D33934003

fbshipit-source-id: e932812b413824458bfd3b81fa59dd0305d271cc
2022-02-02 10:39:05 -08:00
Jawwad Ahmad
df5e2962a9 Move source code for FBSDKCoreKit_Basics from under Sources to be under FBSDKCoreKit_Basics
Summary:
Before: ROOT_DIR/Sources/FBSDKCoreKit_Basics
After: ROOT_DIR/FBSDKCoreKit_Basics/FBSDKCoreKit_Basics

Reviewed By: samodom

Differential Revision: D33929150

fbshipit-source-id: 3858e251436a1749b633e1873d493f49ea86e820
2022-02-01 18:22:35 -08:00
Jawwad Ahmad
5d6e36c680 Misc Gaming Services, SwiftLint and SwiftFormat cleanup
Differential Revision: D33925428

fbshipit-source-id: dac9fc79646cd03a7705205bcea12eb4c591ec0a
2022-02-01 16:10:26 -08:00
Jawwad Ahmad
95dc6b2149 Move all source files out of FBSDKGamingServicesKit and into FacebookGamingServices
Summary: Since everything in `FacebookGamingServices` is accessible via `FBSDKGamingServicesKit`, these Objective-C wrappers should continue to be accessible. Left the tests for these in `FBSDKGamingServicesKit` to demonstrate that they continue to be accessible in the way as before. The only addition now is that these wrappers are also accessible from the `FacebookGamingServices` module.

Reviewed By: KylinChang

Differential Revision: D33906944

fbshipit-source-id: 7268d25d35adf2e3f701f75857b99b836a166e8e
2022-02-01 09:00:36 -08:00
Zilin Zhang
a2728599f1 Add GK for catalog matching
Reviewed By: wx0165927473

Differential Revision: D33882047

fbshipit-source-id: d7efbd59540a2e44efc3454a62dceb9fa5b0abeb
2022-01-31 15:20:25 -08:00
Jawwad Ahmad
4d5f8fee19 Remove deprecated and unused methods from FBSDKCrashHandler
Reviewed By: samodom

Differential Revision: D33898295

fbshipit-source-id: 694b6c1b9410541f39f635b0261e0035680abb90
2022-01-31 14:40:10 -08:00
Jawwad Ahmad
b9baba390a Use array.firstObject instead of [FBSDKTypeUtility array:array objectAtIndex:0];
Summary: FBSDKTypeUtility isn't needed to guard against an index out of bounds exception since firstObject already returns nil if the array is empty.

Reviewed By: samodom

Differential Revision: D33892386

fbshipit-source-id: 75e45e33939e1510efd41d635b4e3eae443ddadd
2022-01-31 14:15:45 -08:00
Jawwad Ahmad
3d50d87858 Move FBSDKSafeCast.m/h to FBBSDKCoreKit
Summary: There was only a single use of _FBSDKCastToClassOrNilUnsafeInternal in FBAEMKit which I replaced.

Reviewed By: samodom

Differential Revision: D33890209

fbshipit-source-id: d6dfb0b6d9aeac186fead0b20b262e1ff84138fc
2022-01-31 11:20:17 -08:00
Jawwad Ahmad
1c7f7da221 Remove the _FBSDKCastToProtocolOrNilUnsafeInternal method since its only used once
Reviewed By: samodom

Differential Revision: D33823069

fbshipit-source-id: 00382d3f25fba0db3c0581e9b528b2f43c55ff73
2022-01-27 13:32:28 -08:00
Jawwad Ahmad
5face70317 Add "import Foundation" to any class that is using @objc
Summary:
This is to prevent the following error that was seen in D33750740 (8044535803)
```
objc attribute used without importing module 'Foundation'
```

Found the files with:
```
git ls-files '*.swift' | xargs ack -l 'objc' | xargs ack -L 'import (Foundation|XCTest)'
```

Note: In D33783526 (4610b07bda) a custom SwiftLint rule was added to detect this but it only works if there aren't any other imports.

Reviewed By: samodom

Differential Revision: D33803396

fbshipit-source-id: 575d7798a77aac30384f8f44c1d45f97d60fe8f7
2022-01-26 18:23:28 -08:00
Jawwad Ahmad
fcf2a2551c Remove all header files from GamingServicesKit
Reviewed By: samodom

Differential Revision: D33802601

fbshipit-source-id: edcc2db7b630ee3626818724e120eb172b17c7b7
2022-01-26 18:23:28 -08:00
Yiwei Wu
9e2b71fa80 add field isConversionFilteringEligible
Summary:
As Conversion Filtering is a new logic that will be applied to the next release, we need a boolean value to help us distinguish whether a conversion has CF logic.
In this diff:
1. Add a boolean field "isConversionFilteringEligible" to FBAEMInvocation, which represents an Ad Click.  When decoding from the cache, set the field if the field exists, otherwise the cache is from old SDK and we set it as NO.
2. Attach this field as "is_conversion_filtering" to the request parameters when sending back conversions.

Reviewed By: KylinChang

Differential Revision: D33723853

fbshipit-source-id: d516bca35976caa47ced000b8082a85ba83c161a
2022-01-26 14:25:44 -08:00
Jawwad Ahmad
a73aead26e Remove unused FBSDKJSONValue.h/m files from FBSDKCoreKit_Basics
Reviewed By: samodom

Differential Revision: D33759926

fbshipit-source-id: aa53ffff84bf4cc5e9e6dbdfdad0c808def7fa7a
2022-01-25 10:24:38 -08:00
Jawwad Ahmad
bac0efc987 Code cleanup after dropping support for iOS 10
Reviewed By: samodom

Differential Revision: D33755426

fbshipit-source-id: 865d2d1cc94d627042d6fcd04c1431069a69968c
2022-01-24 20:23:53 -08:00
Jawwad Ahmad
0989e3ee39 Fix a variety of indentation issues in documentation comments
Reviewed By: samodom

Differential Revision: D33724461

fbshipit-source-id: 604df3bf44e3253052742325110c03d934a13651
2022-01-23 10:27:32 -08:00
Yiwei Wu
2827ecca5e remove content id check
Summary: In catalog matching, we will check whether an event's contentID belongs to ad click's catalog id. Our current code pointer will do null check for contentID and we simply returns false if contentID is null. However, we should remove this check and let the server to do the check instead.

Reviewed By: joesus, KylinChang

Differential Revision: D33677914

fbshipit-source-id: d0587a2575e1195d89483f2041be91150bcffe34
2022-01-21 11:32:18 -08:00
Sam Odom
9d09f91589 Bump version from 12.3.0 to 12.3.1
Reviewed By: jawwad

Differential Revision: D33666490

fbshipit-source-id: dd09888a8cdbcbc354b479490544212edaa4f48e
2022-01-19 13:57:35 -08:00
Al Tirba
e6c17ba3ed Convert FBSDKChooseContextDialog.m to Swift
Summary: $title

Reviewed By: jawwad

Differential Revision: D33163505

fbshipit-source-id: bd230a9532426b298db7dd288f405d493ad7d85b
2022-01-18 16:13:27 -08:00
Zilin Zhang
664d7217f5 Add delay to aggregation request
Reviewed By: joesus, wx0165927473

Differential Revision: D33333021

fbshipit-source-id: 5fb93ef06f82bfd1bbd353d4c5ca58ab3500452d
2022-01-10 22:03:00 -08:00
Zilin Zhang
d6d39b04ff Fetch config after URL Deeplink is received
Summary: As title

Reviewed By: wx0165927473, samodom

Differential Revision: D33196359

fbshipit-source-id: b57cd70031b1bcc6f7d38065234124b035acbb9e
2022-01-10 22:03:00 -08:00
Joe Susnick
d982d18bb1 Bump SDK version to 12.3.0
Summary: $title

Reviewed By: samodom

Differential Revision: D33454388

fbshipit-source-id: 9b0372506309257d9b32dfff96d49ea3b88d0a39
2022-01-06 09:00:42 -08:00
Zilin Zhang
f6510247cb Move FBSDKDataPersisting protocol to CoreKit Basics
Summary: $title

Reviewed By: samodom

Differential Revision: D33380276

fbshipit-source-id: 9fa2ac58f5905b034f89b4f6faad35c54fbe22b6
2022-01-05 16:56:48 -08:00
Zilin Zhang
344677c644 Make advertiser rule match operators (eq, contains, startswith, notcontains, noteq) to be case insensitive
Reviewed By: joesus

Differential Revision: D33341344

fbshipit-source-id: 48d0abebeb45a6daa2fad62b895d7fc84909e07f
2022-01-05 13:56:12 -08:00
Sam Odom
e44f987b0a Remove use of FBSDKError in CoreKit_Basics
Reviewed By: joesus

Differential Revision: D33399820

fbshipit-source-id: fd09ff13402a7443ba2b40eaa779b492dbf03f50
2022-01-04 16:23:22 -08:00
Sam Odom
d7408150ab Remove use of FBSDKError in GamingServicesKit
Reviewed By: joesus

Differential Revision: D33380687

fbshipit-source-id: fa24ab50b62753a1286245009fa4b7d2622f85bb
2022-01-04 16:23:22 -08:00
Sam Odom
d654c9e909 Inject components and configurator to application delegate
Summary: This allows us to use both the consolidated list of components and the configurator to help bootstrap the SDK

Reviewed By: joesus

Differential Revision: D33345887

fbshipit-source-id: 8ee6d8fb6a6085e430646bd6f342955da1de92d7
2021-12-29 10:22:38 -08:00
Andres Suarez
1be77973cc Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33331776

fbshipit-source-id: 31b16e5e4cd0bb26c1e7cf49d9f8168eefdfe5ce
2021-12-27 17:08:35 -08:00
Sam Odom
9d8da543c6 Abstract dependencies from bridge API protocol web v2
Summary:
* Abstract info dictionary provider
* Add bundle identifier to info dictionary providing protocol
* Abstract internal utility
* Lots of test changes to account for convoluted URL transformations in production code and transitive dependencies

Reviewed By: joesus

Differential Revision: D33105452

fbshipit-source-id: 32fab998a278b7ffba45b904362824f9ffb93845
2021-12-16 21:35:44 -08:00
Jawwad Ahmad
fe83e31b29 Lightweight Generics: Add types to more NSArrays and NSMutableArrays for better Swift compatibilty
Summary:
There were some types that I couldn't add the type to since type was internal and not visible to Swift. In those cases I just added a comment about what the actual type is:
```
property (nullable, nonatomic, readonly) NSArray *path; // NSArray<FBSDKCodelessPathComponent *>
```

```
Count of untyped NSArray and NSMutableArrays

# Before:
ack --no-filename --count  '(NSArray|NSMutableArray) \*'
194

# After
ack --no-filename --count  '(NSArray|NSMutableArray) \*'
145
```

Reviewed By: samodom

Differential Revision: D33165640

fbshipit-source-id: 050103998ee6bfc525b784cdcccb65d69f1b3397
2021-12-16 17:05:36 -08:00
Jawwad Ahmad
00d598dbbe Lightweight Generics: Add types to many NSArrays for better Swift compatibilty
Summary:
This adds types to 57 lines (195 - 138)

```
Before:
ack --no-filename --count --literal 'NSArray *'
195

After:
ack --no-filename --count --literal 'NSArray *'
138
```

I did this in a semi-automated way with a script but I don't think its very reusable and it would take a lot to clean up.

Reviewed By: samodom

Differential Revision: D33096335

fbshipit-source-id: 73f7a771f6ced5d07dfcaafbe099bf184d13b0bd
2021-12-15 14:04:05 -08:00
Jawwad Ahmad
aad5619dfb Remove the "FBSDK_CAST_TO_" macros in favor of calling the underlying function directly
Summary: The macros seems unnecessary and don't really add much. They are also not usable from Swift.

Reviewed By: samodom

Differential Revision: D33038940

fbshipit-source-id: 8ce4c07a9e5a4dba5522e53943efa90543c7ad8d
2021-12-14 08:09:53 -08:00
Jawwad Ahmad
700e1f3f90 Remove unused "FBSDK_CAST_TO_" macros
Summary: FBSDK_CAST_TO_CLASS_OR_NIL_FUNC and FBSDK_CAST_TO_PROTOCOL_OR_NIL_FUNC were unused

Reviewed By: samodom

Differential Revision: D33038674

fbshipit-source-id: a72ae318c85e796e7e5a2551b3f8c5dc117d0b98
2021-12-14 08:09:53 -08:00
Joe Susnick
ca0463a799 Add tvOS slice to AEMKit XCFramework
Summary:
This will make it easier to use SPM with tvOS.
Additionally gates some code that should not be available on tvOS.

Reviewed By: samodom

Differential Revision: D32958438

fbshipit-source-id: f6481fce09be2bfbbd8b120a40461b8dee329016
2021-12-08 13:46:31 -08:00
Jawwad Ahmad
948e4e89eb Bump SDK version to 12.2.1
Reviewed By: jamestouri

Differential Revision: D32955602

fbshipit-source-id: 0e5bd1939ae0cb5c88cdcd6145de807aff1bc9f0
2021-12-08 12:19:13 -08:00
Zilin Zhang
156b7c7717 AEM Bug Fix for Config Cache
Reviewed By: wx0165927473

Differential Revision: D32846912

fbshipit-source-id: 7e4456f14176935fb043bb6386f36537596a5f48
2021-12-03 17:54:24 -08:00
Zilin Zhang
b162340dbe AEM Bug Fix
Summary:
We need to fix:
1. AEM Conversion Filetring endpoint/request names
2. Add special processing for content id
3. Combine catalog networker and AEM networker

Reviewed By: wx0165927473, samodom

Differential Revision: D32782549

fbshipit-source-id: 21b421c5521c94cb0de027b04378d9e3dba38afd
2021-12-02 10:52:12 -08:00
Jawwad Ahmad
f7c9fbc5c0 Bump SDK version to 12.2.0
Summary: Also updated the changelog

Reviewed By: samodom

Differential Revision: D32785335

fbshipit-source-id: 35a8cc0c748c4c5c0efe50f74f63630d914565ec
2021-12-01 20:50:41 -08:00
Zilin Zhang
96dcb78a72 Fix warning log for AEM Conversion Config request
Summary:
https://github.com/facebook/facebook-ios-sdk/issues/1933
We will add an empty "fields" to fix the warning log

Reviewed By: jawwad

Differential Revision: D32741552

fbshipit-source-id: 0fbd4b6d53f385d9b45815201b3827cadd5d0305
2021-11-30 23:11:37 -08:00
Sam Odom
8932220651 Fix some AEM reporter properties
Reviewed By: joesus

Differential Revision: D32698225

fbshipit-source-id: 5783ae65ce06837781b9af41690b2f30b2b0d3a7
2021-11-30 09:26:45 -08:00
Joe Susnick
d1225b19e5 Rename type utility helper to be more accurate
Summary: URLValue will also try to coerce a String into a URL. This naming change highlights that possibility.

Reviewed By: samodom

Differential Revision: D32698924

fbshipit-source-id: 5948a652eb02c8e529416dc998b8f20b0bd75181
2021-11-29 21:58:26 -08:00
CodemodService FBObjcUncrustifyLinterBot
79326cd31c Daily arc lint --take UNCRUSTIFY
Reviewed By: zertosh

Differential Revision: D32639446

fbshipit-source-id: 82f27f8ac14ec69d5bf655f6dbe080d682197105
2021-11-24 04:46:41 -08:00
Jawwad Ahmad
716192723f Fixed a few more NSKeyedUnarchiver validateAllowedClass warnings
Summary:
Warnings in tests were fixed in a previous commit. This fixes warnings that appear when right when the app is launched.

Fixes GitHub issues #1941 and #1930

Reviewed By: samodom

Differential Revision: D32607508

fbshipit-source-id: 903e2967caadc312b41a3b4a6caee060eee305fc
2021-11-23 09:06:58 -08:00
Jawwad Ahmad
a38207417b Fix a few NSKeyedUnarchiver validateAllowedClass Warnings in Xcode Console
Summary:
Running the tests no longer shows these warnings.

Fixed the following warnings when running FBSDKAppEventsStateManagerTests.testPersistingValidState and FBSDKAppEventsTests.testFetchingConfigurationIncludingCertainFeatures

```
Attempted to decode a collection type 'NSString' (subclass of 'NSObject') for key 'NS.keys'. 'NSString' requires its subclasses to be explicitly added to the allowed classes list but it is not present.
allowed unarchiving safe plist type ''NSNumber' (0x7fff863021c8) [/Applications/Xcode_13.0.0_fb.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework]' for key 'NS.objects', even though it was not explicitly included in the client allowed classes set
```

Reviewed By: joesus

Differential Revision: D32606181

fbshipit-source-id: e095005a1904c9b1996df0c3c0ea96482def88de
2021-11-22 16:58:04 -08:00
Xin Wu
8a2449ca2c make app id as optional during FBAEMReporter configuration
Summary: For some MMPs, we let developers set the FB app ID in the info.plist

Reviewed By: samodom

Differential Revision: D32249433

fbshipit-source-id: 5abfb5b5957c8ae6a4a23e2a762a258fa126fe6f
2021-11-19 12:39:20 -08:00
Zilin Zhang
e31eb9f67c Fix getContentID
Reviewed By: wx0165927473, dreamolight

Differential Revision: D32514739

fbshipit-source-id: 3a42bfab828fab28e65896e7e157cbb1ea115acb
2021-11-17 19:54:44 -08:00
CodemodService FBObjcUncrustifyLinterBot
36e20fff5a Daily arc lint --take UNCRUSTIFY
Reviewed By: zertosh

Differential Revision: D32520307

fbshipit-source-id: c7c83fc24a23c30d3c520a86d677490243f9d727
2021-11-17 19:37:07 -08:00
Zilin Zhang
f623eeb18e Add priority addin if the conversion is optimized
Reviewed By: joesus, dreamolight

Differential Revision: D32240117

fbshipit-source-id: c06c0523aae181e3932a8e8e2ef3739e03cb11b4
2021-11-16 21:29:39 -08:00