-
Notifications
You must be signed in to change notification settings - Fork 136
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
fix all Framework imports that would break cocoapods installation #319
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
#import <Foundation/Foundation.h> | ||
|
||
@import AppCenterPush; | ||
|
||
// Support React Native headers both in the React namespace, where they are in RN version 0.40+, | ||
// and no namespace, for older versions of React Native | ||
#if __has_include(<React/RCTEventEmitter.h>) | ||
|
@@ -12,6 +10,8 @@ | |
|
||
@class AppCenterReactNativePush; | ||
|
||
@protocol MSPushDelegate; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing empty line before protocol There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ✅ |
||
|
||
@protocol AppCenterReactNativePushDelegate <MSPushDelegate> | ||
|
||
@required | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#import <Foundation/Foundation.h> | ||
|
||
@import AppCenterPush.MSPushNotification; | ||
@class MSPushNotification; | ||
|
||
NSDictionary* convertNotificationToJS(MSPushNotification* notification); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
#import "AppCenterReactNativePushUtils.h" | ||
|
||
#import <AppCenterPush/MSPushNotification.h> | ||
#import "AppCenterReactNativePushUtils.h" | ||
|
||
NSDictionary* convertNotificationToJS(MSPushNotification* pushNotification) { | ||
if (pushNotification == nil) { | ||
return @{}; | ||
} | ||
|
||
NSMutableDictionary * dict = [[NSMutableDictionary alloc] init]; | ||
NSString *message = pushNotification.message; | ||
NSString *title = pushNotification.title; | ||
|
||
dict[@"message"] = message; | ||
dict[@"title"] = title; | ||
|
||
NSMutableDictionary *customData = [[NSMutableDictionary alloc] init]; | ||
for (NSString *key in pushNotification.customData) { | ||
customData[key] = [pushNotification.customData objectForKey:key]; | ||
} | ||
|
||
dict[@"customProperties"] = customData; | ||
|
||
return dict; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need some header for MSWrapperSdk type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also in AppCenterReactNativeShared.m file we need header for MSAppCenter type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right.. I wasn't able to properly build the framework before, not sure why but it should be good to go now. Built and checked.
I've use forward declaration on the header and imported the right header in the
.m
file, still not requiring a@import
which has been the issue for our integration flow.