|
| 1 | +# Apple Silicon Simulator Support |
| 2 | + |
| 3 | +If you're using Swift Package Manager or the zip file, everything should work for you |
| 4 | +using Xcode 12.0 or above. See the instructions below for CocoaPods and Carthage. |
| 5 | + |
| 6 | +## CocoaPods |
| 7 | + |
| 8 | +All source-based Firebase CocoaPods work as expected. Binary pods require CocoaPopds version 1.10.0 |
| 9 | +and are listed below with the current status. |
| 10 | + |
| 11 | +### Analytics + GoogleAppMeasurement |
| 12 | + |
| 13 | +As of Firebase 7.2.0, FirebaseAnalytics and GoogleAppMeasurement provide a separate distribution of |
| 14 | +an XCFramework in order to work around an issue with CocoaPods and static XCFrameworks. |
| 15 | + |
| 16 | +**IMPORTANT**: After adding the CocoaPod, you must manually add `-ObjC` to your `Other Linker Flags` |
| 17 | +in order to avoid a runtime crash. |
| 18 | + |
| 19 | +This is a temporary workaround while Analytics is affected by the CocoaPods bug. |
| 20 | + |
| 21 | +When specifying which version of Firebase you'd like in your Podfile, append `-M1` to the version. |
| 22 | +See the following examples: |
| 23 | + |
| 24 | +``` |
| 25 | +# Explicitly require the special `M1` tagged Firebase version, locked to the major version. |
| 26 | +pod 'Firebase/Analytics', '~> 7.2-M1' |
| 27 | +
|
| 28 | +# Do the same for any other Firebase pod used. |
| 29 | +pod 'Firebase/Database', '~> 7.2-M1' |
| 30 | +
|
| 31 | +# You can also lock on the minor or patch versions like so: |
| 32 | +pod 'Firebase/Analytics, '~> 7.2.0-M1' |
| 33 | +pod 'Firebase/Analytics, '7.2.0-M1' |
| 34 | +``` |
| 35 | + |
| 36 | +Remember: now you need to manually add `-ObjC` to avoid a runtime crash. This CocoaPods issue has |
| 37 | +been fixed in |
| 38 | +[CocoaPods/CocoaPods#10234](https://github.com/CocoaPods/CocoaPods/pull/10234) and is merged for |
| 39 | +the upcoming CocoaPods 1.10.1 patch release. |
| 40 | + |
| 41 | +### Performance |
| 42 | + |
| 43 | +As of Firebase 7.2.0, FirebasePerformance uses an XCFramework for distribution that works with |
| 44 | +Apple silicon. |
| 45 | + |
| 46 | +### FirebaseML |
| 47 | + |
| 48 | +FirebaseML does not yet work with the simulator on Apple silicon Macs. |
| 49 | + |
| 50 | +## Carthage |
| 51 | + |
| 52 | +XCFrameworks are required to include the arm64 slice for iOS devices and the macOS simulator for |
| 53 | +Macs running on Apple silicon. Unfortunately, Carthage does not support XCFrameworks yet which |
| 54 | +prevents us from being able to include support. See |
| 55 | +[Carthage/Carthage#2799](https://github.com/Carthage/Carthage/issues/2799) for progress. |
| 56 | + |
0 commit comments