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

refactor: update sample apps with newer RN syntax #212

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

levibostian
Copy link
Contributor

  • Update the syntax of sample apps to align with docs changes.
  • APN app had an error at runtime. I fixed it with App.js changes.
  • Rest of files are caused because of running pod update in sample apps.

Comment on lines +2 to +5
#import <FCMSampleApp-Swift.h>
#import <React/RCTLinkingManager.h>
#import <React/RCTBundleURLProvider.h>
#import <FirebaseCore.h>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These imports were moved here from AppDelegate.h file.

These imports are not mentioned in our SDK docs code samples for a valid AppDelegate.h file. I think it's best for our sample apps to align with our docs so I moved imports to this file.

Comment on lines 2 to +5
#import <UIKit/UIKit.h>
#import <UserNotifications/UNUserNotificationCenter.h>
#import <UserNotifications/UserNotifications.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate, UNUserNotificationCenterDelegate>

@property (nonatomic, strong) UIWindow *window;
@interface AppDelegate: RCTAppDelegate<UNUserNotificationCenterDelegate>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the major change in this PR. Updating syntax to align with our docs changes.

@levibostian levibostian requested a review from a team October 27, 2023 16:12
</SafeAreaView>
</UserStateContext.Provider>
</CustomerIoSdkContext.Provider>
<GestureHandlerRootView style={{ flex: 1 }}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes were indeed required ! Thanks for making this PR!

@levibostian levibostian merged commit 1749d63 into main Nov 1, 2023
6 checks passed
@levibostian levibostian deleted the levi/update-appdelegate-syntax branch November 1, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants