-
Notifications
You must be signed in to change notification settings - Fork 11
Bridge geofencing methods #277
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
Changes from all commits
b56cadd
9c2f5b3
d04d131
635a2da
5ed098c
a2baba4
98624f8
7c61165
d7ae33d
96d7dc2
b96670e
2363dcb
01de64b
685595d
4ace88a
9168d24
620887c
4274a7d
bcf9559
cb840f7
62809aa
03bbef6
f4f7221
0a9bed4
fca51fc
066427c
3cd9544
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ - (BOOL)application:(UIApplication *)application | |
| // iOS Installation Step 3: Initialize the SDK with public key, if | ||
| // initializing from native code Exclude if initializing from react native | ||
| // layer | ||
| [PushNotificationsHelper initializeSDK:@"Xr5bFG"]; | ||
| [PushNotificationsHelper initializeSDK:@"YOUR_KLAVIYO_PUBLIC_API_KEY"]; | ||
|
Contributor
Author
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. just cleaning this up, guess this has been in here for a while
Contributor
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. Lol, @ajaysubra maybe that's why your company had so many profiles...
Collaborator
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. 🤦🏽♂️
Contributor
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. Maybe a github action or pre-commit rule could help us avoid doing that again |
||
|
|
||
| // iOS Installation Step 4: Request notification permission from the user | ||
| // Exclude if handling permissions from react native layer | ||
|
|
@@ -33,6 +33,11 @@ - (BOOL)application:(UIApplication *)application | |
| // Initialize cross-platform push library, e.g. Firebase | ||
| } | ||
|
|
||
| // Start monitoring geofences from background | ||
| dispatch_async(dispatch_get_main_queue(), ^{ | ||
| [KlaviyoBridge monitorGeofencesFromBackground]; | ||
| }); | ||
belleklaviyo marked this conversation as resolved.
Show resolved
Hide resolved
belleklaviyo marked this conversation as resolved.
Show resolved
Hide resolved
belleklaviyo marked this conversation as resolved.
Show resolved
Hide resolved
belleklaviyo marked this conversation as resolved.
Show resolved
Hide resolved
evan-masseau marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| // refer to installation step 16 below | ||
| NSMutableDictionary *launchOptionsWithURL = | ||
| [self getLaunchOptionsWithURL:launchOptions]; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,17 @@ | ||
| # Resolve react_native_pods.rb with node to allow for hoisting | ||
| require Pod::Executable.execute_command('node', ['-p', | ||
| 'require.resolve( | ||
| "react-native/scripts/react_native_pods.rb", | ||
| {paths: [process.argv[1]]}, | ||
| )', __dir__]).strip | ||
| def node_require(script) | ||
| require Pod::Executable.execute_command('node', ['-p', | ||
| "require.resolve( | ||
| '#{script}', | ||
| {paths: [process.argv[1]]}, | ||
| )", __dir__]).strip | ||
| end | ||
|
|
||
| node_require('react-native/scripts/react_native_pods.rb') | ||
belleklaviyo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| node_require('react-native-permissions/scripts/setup.rb') | ||
|
Contributor
Author
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. these podfile changes were necessary for the
Contributor
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. Wonder if we should update the example app to use this for push permissions too. Not blocking for this PR though. Maybe I could take a look at it in the UI overhaul branch I have in draft. |
||
|
|
||
| platform :ios, min_ios_version_supported | ||
| prepare_react_native_project! | ||
|
|
||
|
|
||
| linkage = ENV['USE_FRAMEWORKS'] | ||
| if linkage != nil | ||
| Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green | ||
|
|
@@ -21,6 +24,17 @@ target 'KlaviyoReactNativeSdkExample' do | |
| use_frameworks! :linkage => :static | ||
|
|
||
| # Insert override klaviyo-swift-sdk pods below this line when needed | ||
| # Using remote branch feat/geofencing from GitHub | ||
| pod 'KlaviyoCore', :git => 'https://github.com/klaviyo/klaviyo-swift-sdk.git', :branch => 'feat/geofencing' | ||
| pod 'KlaviyoSwift', :git => 'https://github.com/klaviyo/klaviyo-swift-sdk.git', :branch => 'feat/geofencing' | ||
| pod 'KlaviyoForms', :git => 'https://github.com/klaviyo/klaviyo-swift-sdk.git', :branch => 'feat/geofencing' | ||
| pod 'KlaviyoLocation', :git => 'https://github.com/klaviyo/klaviyo-swift-sdk.git', :branch => 'feat/geofencing' | ||
|
|
||
| # Setup permissions for react-native-permissions | ||
| setup_permissions([ | ||
| 'LocationWhenInUse', | ||
| 'LocationAlways', | ||
| ]) | ||
|
|
||
| use_react_native!( | ||
| :path => config[:reactNativePath], | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.