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
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
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
Summary: There was only a single use of _FBSDKCastToClassOrNilUnsafeInternal in FBAEMKit which I replaced.
Reviewed By: samodom
Differential Revision: D33890209
fbshipit-source-id: d6dfb0b6d9aeac186fead0b20b262e1ff84138fc
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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