-
Notifications
You must be signed in to change notification settings - Fork 13
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
chore: add client info for react native user agent on ios #345
Conversation
Sample app builds 📱Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.
|
@@ -19,7 +19,7 @@ target 'SampleApp' do | |||
flags = get_default_flags() | |||
|
|||
# TODO: Remove this once iOS Native SDK is released and revert to original code | |||
install_non_production_ios_sdk_git_branch(branch_name: 'feature/react-native-cdp', is_app_extension: false, push_service: "apn") | |||
install_non_production_ios_sdk_git_branch(branch_name: 'rehan/rn-ios-user-agent', is_app_extension: false, push_service: "apn") |
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.
TODO: Revert this to feature branch once iOS PR is merged
# TODO: Remove this once iOS Native SDK is released and revert to original code | ||
install_non_production_ios_sdk_git_branch(branch_name: 'feature/react-native-cdp', is_app_extension: true, push_service: "apn") | ||
# pod 'customerio-reactnative-richpush/apn', :path => '../node_modules/customerio-reactnative' | ||
pod 'customerio-reactnative-richpush/apn', :path => '../node_modules/customerio-reactnative' |
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.
Since pods are already installed, I think we can revert this to original implementation. This should give us more confidence in the changes.
@@ -47,7 +47,7 @@ target 'FCMSampleApp' do | |||
) | |||
|
|||
# TODO: Remove this once iOS Native SDK is released and revert to original code | |||
install_non_production_ios_sdk_git_branch(branch_name: 'feature/react-native-cdp', is_app_extension: false, push_service: "fcm") | |||
install_non_production_ios_sdk_git_branch(branch_name: 'rehan/rn-ios-user-agent', is_app_extension: false, push_service: "fcm") |
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.
TODO: Revert this to feature branch once iOS PR is merged
@@ -15,17 +15,23 @@ Pod::Spec.new do |s| | |||
s.platforms = { :ios => "13.0" } | |||
s.source = { :git => "https://github.com/customerio/customerio-ios.git", :tag => "#{s.version}" } | |||
|
|||
s.source_files = "ios/**/*.{h,m,mm,swift}" | |||
s.source_files = "ios/wrappers/**/*.{h,m,mm,swift}" |
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.
Updated it to match with default podspec
|
||
# s.dependency "X", "X" | ||
# Careful when declaring dependencies here. All dependencies will be included in the App Extension target in Xcode, not the host iOS app. | ||
|
||
# Subspecs allow customers to choose between multiple options of what type of version of this rich push package they would like to install. | ||
s.subspec 'apn' do |ss| | ||
ss.dependency "CustomerIO/MessagingPushAPN", package["cioNativeiOSSdkVersion"] | ||
end | ||
ss.resource_bundles = { |
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.
I tried keeping it in parent podspec
to avoid duplication, but it didn't work for some reason. So added it to each subspec
.
|
||
# s.dependency "X", "X" | ||
# Careful when declaring dependencies here. All dependencies will be included in the App Extension target in Xcode, not the host iOS app. | ||
|
||
# Subspecs allow customers to choose between multiple options of what type of version of this rich push package they would like to install. | ||
s.subspec 'apn' do |ss| | ||
ss.dependency "CustomerIO/MessagingPushAPN", package["cioNativeiOSSdkVersion"] | ||
end | ||
ss.resource_bundles = { | ||
'CustomerIO_NSEResources' => ['ios/resources/*'] |
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.
Having resources with the same name was causing failures in CI, so I added resource with different name for NSE to avoid any risks.
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.
We discussed this on team call and we would not be opting for this choice for now.
Closing this as we’ve decided to proceed with other solutions for now. We’ll continue discussing this internally and will open PRs once we finalize further changes. |
part of MBL-540
blocked by customerio/customerio-ios#825
Changes
CIOClientInfo.json
so native iOS SDK can generate a user agent based on itclientVersion
fromCIOClientInfo.json
asCFBundleShortVersionString
in resourcesplist
is synced with React Native package version, removing the need for version updates in multiple placescustomerio-reactnative-richpush.podspec
to include same files and resources as the defaultcustomerio-reactnative.podspec
Podfile
to align more closely with the live implementation for NSE