-
Notifications
You must be signed in to change notification settings - Fork 9
feat: Implement Rokt selectPlacements #34
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
94b622a
Copy relevant file when adding platform
jamesnrokt 3cd9445
Add a clean script
jamesnrokt 5d0f151
Bump mParticle versions
jamesnrokt 58fa9cb
Update cordova versions and add instructions
jamesnrokt ea241db
Ensure folder exists before copy
jamesnrokt cb446c3
Change import method to fix issue MPGDPRConsent
jamesnrokt 0609445
Adjust cocoapods and deployment target
jamesnrokt 7557302
Correct location of AppDelegate.m
jamesnrokt f3abc94
Make logs and events cordova specific
jamesnrokt 6bf44b4
Fix Invalid (non-string) key crash
jamesnrokt 3fecd7c
Update pull request
jamesnrokt 4291bf2
Add package lock files
jamesnrokt d430f18
Update plugin/src/ios/CDVMParticle.m
jamesnrokt 583c8f8
Add kit dependencies
jamesnrokt a0b55da
Add button to trigger selectPlacements
jamesnrokt 22bf579
Add Android select placements functionality
jamesnrokt 1705e78
Add iOS impl of selectPlacements
jamesnrokt 3ec6af1
Merge branch 'main' into feat/SQDSDKS-7523-Implement-Rokt
jamesnrokt 79e5837
Fix lint issues
jamesnrokt 0d52284
Change iOS runner and xcode version
jamesnrokt f9f3843
Harden against invalid color mode
jamesnrokt cc32f1b
Lint fixes
jamesnrokt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| var shell = require('child_process'); | ||
| var path = require('path'); | ||
| var fs = require('fs'); | ||
|
|
||
| module.exports = function(context) { | ||
| // Skip if not iOS | ||
| if (context.opts.platforms.indexOf('ios') === -1) { | ||
| return; | ||
| } | ||
|
|
||
| console.log('Setting up iOS pods...'); | ||
|
|
||
| // Get the paths | ||
| var iosPath = path.join(context.opts.projectRoot, 'platforms', 'ios'); | ||
| var customPodfilePath = path.join(context.opts.projectRoot, 'platform_overrides', 'ios', 'Podfile'); | ||
| var platformPodfilePath = path.join(iosPath, 'Podfile'); | ||
|
|
||
| return new Promise((resolve, reject) => { | ||
| // Copy custom Podfile if it exists | ||
| if (fs.existsSync(customPodfilePath)) { | ||
| try { | ||
| fs.copyFileSync(customPodfilePath, platformPodfilePath); | ||
| console.log('Copied custom Podfile'); | ||
| } catch (error) { | ||
| console.error('Error copying Podfile: ' + error); | ||
| reject(error); | ||
| return; | ||
| } | ||
| } | ||
|
|
||
| // Run pod install | ||
| shell.exec('pod install', { cwd: iosPath }, function(error, stdout, stderr) { | ||
| if (error) { | ||
| console.error('Error running pod install: ' + error); | ||
| console.error('stderr: ' + stderr); | ||
| reject(error); | ||
| return; | ||
| } | ||
| console.log('pod install output: ' + stdout); | ||
| resolve(); | ||
| }); | ||
| }); | ||
| }; |
32 changes: 32 additions & 0 deletions
32
example/hooks/after_platform_add/030_update_android_gradle.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| var fs = require('fs'); | ||
| var path = require('path'); | ||
|
|
||
| module.exports = function(context) { | ||
| // Skip if not Android | ||
| if (context.opts.platforms.indexOf('android') === -1) { | ||
| return; | ||
| } | ||
|
|
||
| console.log('Copying Android build-extras.gradle...'); | ||
|
|
||
| // Source and destination paths | ||
| var srcFile = path.join(context.opts.projectRoot, 'platform_overrides', 'android', 'build-extras.gradle'); | ||
| var destFile = path.join(context.opts.projectRoot, 'platforms', 'android', 'app', 'build-extras.gradle'); | ||
|
|
||
| try { | ||
| // Ensure the source file exists | ||
| if (!fs.existsSync(srcFile)) { | ||
| console.error('build-extras.gradle not found in platform_overrides'); | ||
| return; | ||
| } | ||
|
|
||
| // Copy the file | ||
| fs.copyFileSync(srcFile, destFile); | ||
| console.log('Successfully copied build-extras.gradle to platform directory'); | ||
| } catch (error) { | ||
| console.error('Error copying build-extras.gradle:', error); | ||
| throw error; | ||
| } | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| dependencies { | ||
| implementation 'com.mparticle:android-rokt-kit:5.71.0' | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| platform :ios, '12.0' | ||
| use_frameworks! | ||
|
|
||
| target 'MParticleExample' do | ||
| pod 'mParticle-Rokt', '8.2.0' | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.