12 Commits

Author SHA1 Message Date
Jawwad Ahmad
624db61799 Add a swiftlint rule to prefer final classes
Summary:
There were only 2 instances in which I had to add a disable comment for prefer_final_classes due to subclassing

Used the following to add the final keyword (Adds final to any class that doesn't have final or open before it and doesn't have func after it)
```
find . -name '*.swift' | xargs perl -pi -e 's/(?<!final )(?<!open )(class (?!func).*\{)/final \1/g'
```

Reviewed By: samodom

Differential Revision: D34119233

fbshipit-source-id: 963d64fefc1686095d0bfe18ac7cb9677606f4e6
2022-02-09 23:10:04 -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
92b4408ce1 Rename FacebookGamingServicesTests to FBSDKGamingServicesKitTests
Summary: Also moved files

Reviewed By: samodom

Differential Revision: D33929673

fbshipit-source-id: e577bc35820885df102795f94efb66a6c2b49251
2022-02-01 17:32:53 -08:00
Jawwad Ahmad
3253b1b09d Move all tests out of Tests/FBSDKGamingServicesKit and into FacebookGamingServices/FacebookGamingServicesTests
Summary: Also removed the FBSDKGamingServicesKitTests target and related code

Reviewed By: KylinChang

Differential Revision: D33910596

fbshipit-source-id: 5f86e606d73dc36c7268252056f9afab5d9aa811
2022-02-01 09:00:36 -08:00
Joe Susnick
fe7ba4f527 Adding ObjC linker flag for regression tests
Summary:
Adds the ObjC linker option. Per [Apple Docs](https://developer.apple.com/library/archive/qa/qa1490/_index.html):

> Passing the -ObjC option to the linker causes it to load all members of static libraries that implement any Objective-C class or category. This will pickup any category method implementations. But it can make the resulting executable larger, and may pickup unnecessary objects. For this reason it is not on by default.

We need to make sure that the SDK still works when this aggressive style of linking is on so we're adding the ObjC flag. This should expose any issues we have with linking.

I'm not entirely clear on the issues this could obscure but it feels like overkill to have a duplicate job just for this one flag.

Reviewed By: samodom

Differential Revision: D33255584

fbshipit-source-id: 49ac804518219ccec1b736959887c83efe50c781
2021-12-28 13:36:57 -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
Joe Susnick
784059e45a Adding ability to test SPM integration
Summary:
https://fb.workplace.com/groups/iOSDevQA/permalink/7020550424660179/

Has more information about the reasons for the specific decisions in here.

High level, the Swift Package file will use the environment variable `USE_LOCAL_FB_BINARIES` if it is available on command line builds. If it is set, the build will use local references to binary targets.

The CI test will builds the frameworks then archives a project that uses those artifacts via SPM.

Reviewed By: jawwad

Differential Revision: D31829704

fbshipit-source-id: 69f907fe2787e0bbd8c8895b1dce6a66ec570f8c
2021-10-28 20:20:44 -07:00
Andres Suarez
325eb64e5e Apply LICENSELINT
Reviewed By: johnny2217

Differential Revision: D31866195

fbshipit-source-id: 96c9e2047491ab2b10a3dc8d0b8d570d72c48825
2021-10-22 12:29:20 -07:00
Sam Odom
8520dcc859 Rename static targets and schemes
Summary: We are renaming the various static targets and schemes to consistently differentiate between the two linking strategies

Reviewed By: jamestouri

Differential Revision: D30890695

fbshipit-source-id: 78b08bc5bc79ca23b279411609db264d9de57b8a
2021-09-13 10:54:36 -07:00
CodemodService Bot
80337f258d SwiftLint autocorrect fixes
Differential Revision: D27732292

fbshipit-source-id: 5cde0a0aa4a6be545cd83106b0585b2c7da26723
2021-04-13 08:01:49 -07:00
Jawwad Ahmad
7052450052 Fix swiftlint warnings in the facebook-ios-sdk (#1559)
Summary:
Pull Request resolved: https://github.com/facebook/facebook-ios-sdk/pull/1559

This commit fixes the current swiftlint warnings in the SDK.

- Added a blank line between "import Foundation" and "testable import FBSDKCoreKit" to fix sorted_imports.
- Excluded "RawAppEventsConfigurationResponseFixtures" in .swiftlint.yml for the type_name violation.
- Ignored the trailing_comma rule to allow trailing commas.

The following warnings were fixed:
```
warning: Colon Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)
warning: Type Name Violation: Type name should be between 3 and 40 characters long: 'RawAppEventsConfigurationResponseFixtures' (type_name)
warning: Sorted Imports Violation: Imports should be sorted. (sorted_imports)
warning: Vertical Whitespace Violation: Limit vertical whitespace to a single empty line. Currently 2. (vertical_whitespace)
```

Reviewed By: joesus

Differential Revision: D24691969

fbshipit-source-id: 4fc7a87d613d7053eccbd49519e93206a32b97ef
2020-11-04 16:12:48 -08:00
Joe Susnick
7a2f482441 Update Xcode Integration Project Path (#1418)
Summary:
Pull Request resolved: https://github.com/facebook/facebook-ios-sdk/pull/1418

Moves the `TestXcodeIntegration` project so that it can be built with Circle CI.

Reviewed By: Nathaaaalie

Differential Revision: D22309632

fbshipit-source-id: bce957c83961d017905566b4d97822d8842ab5f4
2020-06-30 15:46:31 -07:00