Skip to content

Commit

Permalink
Add support for stripping debug symbols for libraries included via Co…
Browse files Browse the repository at this point in the history
…coapods. Resolves #28.
  • Loading branch information
Dave Alden committed Jul 1, 2019
1 parent 5ac1344 commit 7d6851b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ To help ensure this plugin is kept updated, new features are added and bugfixes
- [Migrating from cordova-plugin-firebase](#migrating-from-cordova-plugin-firebase)
- [Installation](#installation)
- [Specifying dependent library versions](#specifying-dependent-library-versions)
- [AndroidX](#androidx)
- [iOS minimum version](#ios-minimum-version)
- [Cocoapods](#cocoapods)
- [Usage notes](#usage-notes)
- [Android](#android)
- [AndroidX](#androidx)
- [iOS](#ios)
- [iOS minimum version](#ios-minimum-version)
- [Cocoapods](#cocoapods)
- [Strip debug symbols](#strip-debug-symbols)
- [Guides](#guides)
- [Setup](#setup)
- [IMPORTANT NOTES](#important-notes)
Expand Down Expand Up @@ -117,7 +121,9 @@ For example, to explicitly specify all the component versions at plugin install
--variable IOS_FABRIC_VERSION=1.9.0 \
--variable IOS_CRASHLYTICS_VERSION=3.12.0

### AndroidX
## Usage notes
### Android
#### AndroidX
This plugin has been migrated to use [AndroidX (Jetpack)](https://developer.android.com/jetpack/androidx/migrate) which is the successor to the [Android Support Library](https://developer.android.com/topic/libraries/support-library/index).
This is implemented by adding a dependency on [cordova-plugin-androidx](https://github.com/dpa99c/cordova-plugin-androidx) which enables AndroidX in the Android platform of a Cordova project.

Expand All @@ -126,12 +132,13 @@ This is because the [major release of the Firebase and Play Services libraries o
Therefore if your project includes any plugins which are dependent on the legacy Android Support Library, you should add [cordova-plugin-androidx-adapter](https://github.com/dpa99c/cordova-plugin-androidx-adapter) to your project.
This plugin will dynamically migrate any plugin code from the Android Support Library to AndroidX equivalents.

### iOS minimum version
### iOS
#### iOS minimum version
This plugin sets a default minimum iOS version in the Pod file (see `<preference name="IOS_MIN_VERSION">` in `plugin.xml`) which can be overriden using a plugin variable of the same name, e.g.:

cordova plugin add cordova-plugin-firebasex --variable IOS_MIN_VERSION=10.0

### Cocoapods
#### Cocoapods
This plugin depends on [cordova-plugin-cocoapod-supportx](https://github.com/dpa99c/cordova-plugin-cocoapods-support) which adds Cordova support for the [CocoaPods dependency manager]( https://cocoapods.org/) in order to satify the iOS Firebase SDK library dependencies.

Therefore please make sure you have Cocopods installed in your iOS build environemnt - setup instructions can be found [here](https://cocoapods.org/).
Expand All @@ -145,6 +152,19 @@ You can list the pod dependencies in your Cordova iOS project by installing [coc
cd platforms/ios/
pod dependencies

#### Strip debug symbols
If your iOS app build contains too many debug symbols (i.e. because you include lots of libraries via a Cocoapods), you might get an error (e.g. [issue #28](https://github.com/dpa99c/cordova-plugin-firebase/issues/28)) when you upload your binary to App Store Connect, e.g.:

ITMS-90381: Too many symbol files - These symbols have no corresponding slice in any binary [16EBC8AC-DAA9-39CF-89EA-6A58EB5A5A2F.symbols, 1B105D69-2039-36A4-A04D-96C1C5BAF235.symbols, 476EACDF-583B-3B29-95B9-253CB41097C8.symbols, 9789B03B-6774-3BC9-A8F0-B9D44B08DCCB.symbols, 983BAE60-D245-3291-9F9C-D25E610846AC.symbols].

To prevent this, you can set the `IOS_STRIP_DEBUG` plugin variable which prevents symbolification of all libraries included via Cocoapods (see here)[https://stackoverflow.com/a/48518656/777265]:

cordova plugin add cordova-plugin-firebasex --variable IOS_STRIP_DEBUG=true

By default this preference is set to `false`.

Note: if you enable this setting, any crashes that occur within libraries included via Cocopods will not be recorded in Crashlytics or other crash reporting services.

## Guides
Great installation and setup guide by Medium.com - [https://medium.com/@felipepucinelli/how-to-add-push...](https://medium.com/@felipepucinelli/how-to-add-push-notifications-in-your-cordova-application-using-firebase-69fac067e821)

Expand Down
3 changes: 2 additions & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@


<preference name="IOS_MIN_VERSION" default="9.0" />
<pods-config ios-min-version="$IOS_MIN_VERSION" use-frameworks="true"/>
<preference name="IOS_STRIP_DEBUG" default="false" />
<pods-config ios-min-version="$IOS_MIN_VERSION" use-frameworks="true" strip-debug="$IOS_STRIP_DEBUG"/>

<preference name="IOS_FIREBASE_CORE_VERSION" default="6.3.0" />
<preference name="IOS_FIREBASE_AUTH_VERSION" default="6.3.0" />
Expand Down

0 comments on commit 7d6851b

Please sign in to comment.