Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defaults:
nodeJob: &nodeJob
<<: *job
docker:
- image: circleci/node:8
- image: circleci/node:12.18

version: 2
jobs:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"npm-run-all": "^4.1.3",
"prettier": "^1.14.2",
"react": "16.8.3",
"react-native": "0.59.2",
"react-native": "0.62.2",
"rimraf": "^2.6.2"
}
}
4 changes: 2 additions & 2 deletions packages/core/RNAnalytics.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Pod::Spec.new do |s|
s.author = { 'Segment' => 'friends@segment.com' }
s.source = { :git => 'https://github.com/segmentio/analytics-react-native.git', :tag => s.version.to_s }

s.platform = :ios, '10.0'
s.platform = :ios, '11.0'
Copy link

@oomathias oomathias Sep 1, 2020

Choose a reason for hiding this comment

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

@bsneed @prayansh Is this required? It's a breaking change.

https://github.com/facebook/react-native#-requirements still supports 10.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is required. Our iOS lib minimum is now 11.0. That's my bad on not bumping the version #'s appropriately given it was indeed a breaking change. My apologies for that. If you need 10.x support, we recommend you move back to a previous version.

Copy link

@oomathias oomathias Sep 15, 2020

Choose a reason for hiding this comment

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

@bsneed Ok thanks but unfortunately I can't because we upgraded to the latest react native version (which the previous version doesn't support) and I also need to support iOS 10.
I will try to see if it works for us by patching this file back to iOS 10 (at least it builds, but I need to do regression testing).

s.source_files = 'ios/**/*.{m,h}'
s.static_framework = true

s.dependency 'Analytics'
s.dependency 'Analytics', '~> 4.0.4'
s.dependency 'React'
end

10 changes: 10 additions & 0 deletions packages/integrations/applyPatches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,13 @@ cp "./patches/@segment/analytics-react-native-appsflyer/ios/main.m" "./build/@se
# applied to the Android file, IntegrationModule.kt

cp "./patches/@segment/analytics-react-native-adjust/android/src/main/java/com/segment/analytics/reactnative/integration/adjust/IntegrationModule.kt" "./build/@segment/analytics-react-native-adjust/android/src/main/java/com/segment/analytics/reactnative/integration/adjust/IntegrationModule.kt"

### Facebook App Events patch
#
# Q: Why?
#
# A: RN 0.62 changes how imports end up getting spit out and opts for static lib pods, which
# Xcode then uses the directory name for rather than the module name, and thus it breaks. :(

cp "./patches/@segment/analytics-react-native-facebook-app-events-ios/ios/main.m" "./build/@segment/analytics-react-native-facebook-app-events-ios/ios/main.m"

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// main.m
// RNAnalyticsIntegration
//
// Created by fathy on 05/08/2018.
// Copyright © 2020 Segment.io, Inc. All rights reserved.
//

#import <React/RCTBridgeModule.h>
#import <RNAnalytics/RNAnalytics.h>
#if defined(__has_include) && __has_include(<Segment_FacebookAppEvents/SEGFacebookAppEventsIntegrationFactory.h>)
#import <Segment_FacebookAppEvents/SEGFacebookAppEventsIntegrationFactory.h>
#elif defined(__has_include) && __has_include(<Segment-Facebook-App-Events/SEGFacebookAppEventsIntegrationFactory.h>)
#import <Segment-Facebook-App-Events/SEGFacebookAppEventsIntegrationFactory.h>
#else
#import <Segment-FacebookAppEvents/SEGFacebookAppEventsIntegrationFactory.h>
#endif

@interface RNAnalyticsIntegration_Facebook_App_Events: NSObject<RCTBridgeModule>
@end

@implementation RNAnalyticsIntegration_Facebook_App_Events

RCT_EXPORT_MODULE()

RCT_EXPORT_METHOD(setup) {
[RNAnalytics addIntegration:SEGFacebookAppEventsIntegrationFactory.instance];
}

@end
2 changes: 1 addition & 1 deletion packages/integrations/template/Pod.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/segmentio/analytics-react-native.git", :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/segment'

s.platform = :ios, "9.0"
s.platform = :ios, "11.0"
s.source_files = 'ios/main.m'
s.static_framework = true

Expand Down
4 changes: 2 additions & 2 deletions packages/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
"binaryPath": "project/ios/build/Build/Products/Release-iphonesimulator/TestApp.app",
"build": "export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -project project/ios/TestApp.xcodeproj -scheme TestApp -configuration Release -sdk iphonesimulator -derivedDataPath project/ios/build -quiet -UseModernBuildSystem=NO",
"type": "ios.simulator",
"name": "iPhone X"
"name": "iPhone 8"
},
"ios-cocoapods": {
"binaryPath": "project/ios/build/Build/Products/Release-iphonesimulator/TestApp.app",
"build": "export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -workspace project/ios/TestApp.xcworkspace -scheme TestApp -configuration Release -sdk iphonesimulator -derivedDataPath project/ios/build -quiet -UseModernBuildSystem=NO",
"type": "ios.simulator",
"name": "iPhone X"
"name": "iPhone 8"
},
"android": {
"binaryPath": "project/android/app/build/outputs/apk/debug/app-debug.apk",
Expand Down
67 changes: 53 additions & 14 deletions packages/test-app/patches/Podfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,65 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
platform :ios, '11.0'

target 'TestApp' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!

# Pods for TestApp

pod 'Analytics', '~> 4.0.4'
pod 'RNAnalytics', :path => "../node_modules/@segment/analytics-react-native"

# Device Mode Integrations (iOS only of course)
pod 'RNAnalyticsIntegration-Adjust', :path => "../node_modules/@segment/analytics-react-native-adjust"
pod 'RNAnalyticsIntegration-Amplitude', :path => "../node_modules/@segment/analytics-react-native-amplitude"
pod 'RNAnalyticsIntegration-Appboy', :path => "../node_modules/@segment/analytics-react-native-appboy"
pod 'RNAnalyticsIntegration-AppsFlyer', :path => "../node_modules/@segment/analytics-react-native-appsflyer"
pod 'RNAnalyticsIntegration-Branch', :path => "../node_modules/@segment/analytics-react-native-branch"
pod 'RNAnalyticsIntegration-Bugsnag', :path => "../node_modules/@segment/analytics-react-native-bugsnag"
pod 'RNAnalyticsIntegration-CleverTap', :path => "../node_modules/@segment/analytics-react-native-clevertap"
pod 'RNAnalyticsIntegration-ComScore', :path => "../node_modules/@segment/analytics-react-native-comscore-ios"
pod 'RNAnalyticsIntegration-Countly', :path => "../node_modules/@segment/analytics-react-native-countly"
pod 'RNAnalyticsIntegration-Crittercism', :path => "../node_modules/@segment/analytics-react-native-crittercism"
pod 'RNAnalyticsIntegration-Facebook-App-Events', :path => "../node_modules/@segment/analytics-react-native-facebook-app-events-ios"
pod 'RNAnalyticsIntegration-Firebase', :path => "../node_modules/@segment/analytics-react-native-firebase"
pod 'RNAnalyticsIntegration-Flurry', :path => "../node_modules/@segment/analytics-react-native-flurry"
pod 'RNAnalyticsIntegration-Google-Analytics', :path => "../node_modules/@segment/analytics-react-native-google-analytics"
pod 'RNAnalyticsIntegration-Intercom', :path => "../node_modules/@segment/analytics-react-native-intercom"
pod 'RNAnalyticsIntegration-Localytics', :path => "../node_modules/@segment/analytics-react-native-localytics"
pod 'RNAnalyticsIntegration-Mixpanel', :path => "../node_modules/@segment/analytics-react-native-mixpanel"
pod 'RNAnalyticsIntegration-Taplytics', :path => "../node_modules/@segment/analytics-react-native-taplytics-ios"

# Your 'node_modules' directory is probably in the root of your project,
# but if not, adjust the `:path` accordingly
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge', # Include this for RN >= 0.47
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
'RCTText',
'RCTNetwork',
'RCTWebSocket', # Needed for debugging
'RCTAnimation', # Needed for FlatList and animations running on native UI thread
# Add any other subspecs you want to use in your project
]
# Explicitly include Yoga if you are using RN >= 0.42.0
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'

pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"

# Explicitly include Yoga if you are using RN >= 0.42.0
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

# Third party deps podspec link
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
Expand Down
Loading