Skip to content

Commit 3bb9a4c

Browse files
authored
[Crashlytics] Fix missing Swift header error (#12659)
1 parent d566a0d commit 3bb9a4c

File tree

5 files changed

+30
-7
lines changed

5 files changed

+30
-7
lines changed

.github/workflows/crashlytics.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ jobs:
2626
matrix:
2727
target: [ios, tvos, macos, watchos --skip-tests]
2828
os: [macos-12, macos-13]
29+
flags: [
30+
'--use-modular-headers',
31+
''
32+
]
2933
include:
3034
- os: macos-12
3135
xcode: Xcode_14.2
@@ -47,7 +51,7 @@ jobs:
4751
max_attempts: 3
4852
retry_on: error
4953
retry_wait_seconds: 120
50-
command: scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.tests }}
54+
command: scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.tests }} ${{ matrix.flags }}
5155

5256
spm:
5357
# Don't run on private repo unless it is a PR.

Crashlytics/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Unreleased
2+
- [fixed] Fix `'FirebaseCrashlytics/FirebaseCrashlytics-Swift.h' file not found`
3+
errors (#12611).
4+
15
# 10.23.0
26
- [added] Updated upload-symbols to 13.7 with VisionPro build phase support. (#12306)
37
- [changed] Added support for Crashlytics to report metadata about Remote Config keys and values.

Crashlytics/Crashlytics/Controllers/FIRCLSRolloutsPersistenceManager.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@
1414

1515
#if SWIFT_PACKAGE
1616
@import FirebaseCrashlyticsSwift;
17-
#else // Swift Package Manager
17+
#elif __has_include(<FirebaseCrashlytics/FirebaseCrashlytics-Swift.h>)
1818
#import <FirebaseCrashlytics/FirebaseCrashlytics-Swift.h>
19-
#endif // CocoaPods
19+
#elif __has_include("FirebaseCrashlytics-Swift.h")
20+
// If frameworks are not available, fall back to importing the header as it
21+
// should be findable from a header search path pointing to the build
22+
// directory. See #12611 for more context.
23+
#import "FirebaseCrashlytics-Swift.h"
24+
#endif
2025

2126
@interface FIRCLSRolloutsPersistenceManager : NSObject <FIRCLSPersistenceLog>
2227

Crashlytics/Crashlytics/Controllers/FIRCLSRolloutsPersistenceManager.m

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,14 @@
2121

2222
#if SWIFT_PACKAGE
2323
@import FirebaseCrashlyticsSwift;
24-
#else // Swift Package Manager
24+
#elif __has_include(<FirebaseCrashlytics/FirebaseCrashlytics-Swift.h>)
2525
#import <FirebaseCrashlytics/FirebaseCrashlytics-Swift.h>
26-
#endif // CocoaPods
26+
#elif __has_include("FirebaseCrashlytics-Swift.h")
27+
// If frameworks are not available, fall back to importing the header as it
28+
// should be findable from a header search path pointing to the build
29+
// directory. See #12611 for more context.
30+
#import "FirebaseCrashlytics-Swift.h"
31+
#endif
2732

2833
@interface FIRCLSRolloutsPersistenceManager : NSObject <FIRCLSPersistenceLog>
2934
@property(nonatomic, readonly) FIRCLSFileManager *fileManager;

Crashlytics/Crashlytics/FIRCrashlytics.m

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,14 @@
6363
@import FirebaseRemoteConfigInterop;
6464
#if SWIFT_PACKAGE
6565
@import FirebaseCrashlyticsSwift;
66-
#else // Swift Package Manager
66+
#elif __has_include(<FirebaseCrashlytics/FirebaseCrashlytics-Swift.h>)
6767
#import <FirebaseCrashlytics/FirebaseCrashlytics-Swift.h>
68-
#endif // CocoaPods
68+
#elif __has_include("FirebaseCrashlytics-Swift.h")
69+
// If frameworks are not available, fall back to importing the header as it
70+
// should be findable from a header search path pointing to the build
71+
// directory. See #12611 for more context.
72+
#import "FirebaseCrashlytics-Swift.h"
73+
#endif
6974

7075
#if TARGET_OS_IPHONE
7176
#import <UIKit/UIKit.h>

0 commit comments

Comments
 (0)