Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cocoapods occasionally processes Info.plist *after* RNFB configuration #5152

Closed
mikehardy opened this issue Apr 10, 2021 · 0 comments · Fixed by #5153
Closed

Cocoapods occasionally processes Info.plist *after* RNFB configuration #5152

mikehardy opened this issue Apr 10, 2021 · 0 comments · Fixed by #5153
Labels
impact: crash Behaviour causing app to crash. platform: ios plugin: admob Google AdMob type: bug New bug report

Comments

@mikehardy
Copy link
Collaborator

Issue

I have noticed in testing that sometimes the test app will crash on start with GAD identifiers not present, but sometimes it will work.

Clearly the firebase.json contains the identifiers, and if it works sometimes, then the Cocoapods script that interpolates the identifiers in the Info.plist is working...but it fails sometimes?

I think it is related to order of operations in Cocoapods, the ones that fail look like:


▸ Running script 'Start Packager'
▸ Running script 'Bundle React Native code and images'
▸ Running script '[CP-User] [RNFB] Core Configuration'
▸ Processing Info.plist
▸ Generating 'rnfbdemo.app.dSYM'

The ones that work look like:

▸ Running script 'Start Packager'
▸ Linking rnfbdemo
▸ Running script 'Bundle React Native code and images'
▸ Processing Info.plist
▸ Running script '[CP-User] [RNFB] Core Configuration'
▸ Generating 'rnfbdemo.app.dSYM'
▸ Running script '[CP-User] [RNFB] Crashlytics Configuration'

Note where Processing Info.plist is in relation to Running script '[CP-User] [RNFB] Core Configuration'


@mikehardy mikehardy added type: bug New bug report help: needs-triage Issue needs additional investigation/triaging. impact: crash Behaviour causing app to crash. platform: ios plugin: admob Google AdMob labels Apr 10, 2021
mikehardy added a commit that referenced this issue Apr 10, 2021
Previously there was no dependency stated on Info.plist, so occasionally we would "lose the race"
and attempt to interpolate values prior to it existing

Since ads requires the Info.plist admob ids in the Info.plist, this resulted in crashes on startup occasionally
for users of the admob module

Fixes #5152
mikehardy added a commit that referenced this issue Apr 10, 2021
Previously there was no dependency stated on Info.plist, so occasionally we would "lose the race"
and attempt to interpolate values prior to it existing

Since ads requires the Info.plist admob ids in the Info.plist, this resulted in crashes on startup occasionally
for users of the admob module

Fixes #5152
@mikehardy mikehardy removed the help: needs-triage Issue needs additional investigation/triaging. label Apr 10, 2021
mikehardy added a commit that referenced this issue Apr 11, 2021
Previously there was no dependency stated on Info.plist, so occasionally we would "lose the race"
and attempt to interpolate values prior to it existing

Since ads requires the Info.plist admob ids in the Info.plist, this resulted in crashes on startup occasionally
for users of the admob module

Fixes #5152
androidIsForVivek pushed a commit to androidIsForVivek/react-native-firebase that referenced this issue Aug 9, 2021
Previously there was no dependency stated on Info.plist, so occasionally we would "lose the race"
and attempt to interpolate values prior to it existing

Since ads requires the Info.plist admob ids in the Info.plist, this resulted in crashes on startup occasionally
for users of the admob module

Fixes invertase#5152
mikehardy pushed a commit that referenced this issue Sep 2, 2021
…5677)

The path used in the script is `_TARGET_PLIST="${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}"`, but the path specified as "input files" was `$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)`. This caused that sometimes values from `firebase.json` were not taken into account on iOS, because build step "Processing Info.plist" could be executed after "[RNFB] Core Configuration" and it could overwrite the `Info.plist` file.

Related #5152 
Related #5153
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact: crash Behaviour causing app to crash. platform: ios plugin: admob Google AdMob type: bug New bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant