Skip to content
This repository was archived by the owner on Aug 28, 2023. It is now read-only.

Commit c213ddc

Browse files
authored
Release 3.0.0
Release 3.0.0
1 parent 95e5cde commit c213ddc

242 files changed

Lines changed: 17377 additions & 50871 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525
- 1-gems-{{ checksum "ios/Gemfile.lock" }}
2626

2727
# make sure we're on the right version of cocoapods
28+
- run:
29+
name: Install latest Cocoapods
30+
command: sudo gem install cocoapods
31+
2832
- run:
2933
name: Verify Cocoapods Version
3034
command: cd ios && bundle check || bundle install --path vendor/bundle
@@ -72,7 +76,9 @@ jobs:
7276

7377
- run:
7478
name: Building Android Sample App
75-
command: make build-sample-android
79+
command: |
80+
export NODE_OPTIONS=--max-old-space-size=8192
81+
make build-sample-android
7682
7783
7884
build-sample-app-ios:
@@ -86,6 +92,10 @@ jobs:
8692
name: Install react-native-cli
8793
command: npm install -g react-native-cli
8894

95+
- run:
96+
name: Install latest Cocoapods
97+
command: sudo gem install cocoapods
98+
8999
- run:
90100
name: Copy changes into sample app
91101
command: make copy-to-sample

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ build-ios: setup
1616
(cd ios && xcodebuild build -workspace RCT${PROJECT_NAME}.xcworkspace -scheme RCT${PROJECT_NAME})
1717

1818
build-sample-android:
19-
(cd sample/ACP*Sample/android && ./gradlew assembleRelease)
19+
(cd sample/ACP*SampleApp/android && ./gradlew clean assembleRelease -x bundleReleaseJsAndAssets)
2020

2121
build-sample-ios:
22-
(cd sample/ACP*Sample/ios && xcodebuild build -project ACPMediaSample.xcodeproj -scheme ACPMediaSample CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED="NO" CODE_SIGNING_ALLOWED="NO")
22+
(cd sample/ACP*SampleApp/ios && pod update)
23+
(cd sample/ACP*SampleApp && npx react-native run-ios)
2324

2425
run-tests:
2526
jest --testPathIgnorePatterns sample/ node_modules/ --modulePathIgnorePatterns sample/ --runInBand
@@ -28,7 +29,7 @@ run-tests-locally: setup
2829
./node_modules/.bin/jest --testPathIgnorePatterns sample/ node_modules/ --modulePathIgnorePatterns sample/
2930

3031
copy-to-sample:
31-
cd sample/ACP*Sample/ && sh copy-changes-to-sample.sh
32+
(cd sample/ACP*SampleApp/ && make sync)
3233

3334
# fetches the latest iOS & Android SDK and put them in the project
3435
update-libs:

RCTACPMedia.podspec

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,5 @@ Pod::Spec.new do |s|
1818
s.requires_arc = true
1919

2020
s.dependency "React"
21-
22-
s.ios.vendored_frameworks = 'ios/libs/ACPMedia.xcframework'
23-
s.ios.frameworks = 'UIKit', 'SystemConfiguration', 'WebKit', 'UserNotifications'
24-
s.ios.library = 'sqlite3.0', 'c++', 'z'
25-
26-
s.tvos.vendored_frameworks = 'ios/libs/ACPMediaTV.xcframework'
27-
s.tvos.frameworks = 'SystemConfiguration'
28-
s.tvos.library = 'sqlite3.0', 'c++', 'z'
29-
21+
s.dependency "ACPMedia"
3022
end

README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
`@adobe/react-native-acpmedia` is a wrapper around the iOS, tvOS and Android [AEP Media SDK](https://aep-sdks.gitbook.io/docs/using-mobile-extensions/adobe-media-analytics) to allow for integration with React Native applications. Functionality to enable Adobe Media Analytics is provided entirely through JavaScript documented below.
1010

11-
1211
## Installation
1312

1413
You need to install the SDK with [npm](https://www.npmjs.com/) and configure the native Android/iOS project in your react native project. Before installing the Media extension it is recommended to begin by installing the [Core extension](https://github.com/adobe/react-native-acpcore) and the [Analytics extension](https://github.com/adobe/react-native-acpanalytics).
@@ -77,7 +76,7 @@ ACPMedia.extensionVersion().then(version => console.log("AdobeExperienceSDK: ACP
7776

7877
##### Registering the extension with ACPCore:
7978

80-
> Note: It is recommended to initialize the SDK via native code inside your AppDelegate and MainApplication in iOS and Android respectively. However, you can still initialize the SDK in Javascript. For more information see how to initialize [Core](https://github.com/adobe/react-native-acpcore#initializing-the-sdk).
79+
> Note: It is recommended to initialize the SDK via native code inside your AppDelegate and MainApplication in iOS and Android respectively.
8180
8281
##### **iOS**
8382
```objective-c
@@ -93,13 +92,6 @@ import com.adobe.marketing.mobile.Media;
9392
Media.registerExtension();
9493
```
9594

96-
##### **Javascript:**
97-
```javascript
98-
import {ACPMedia} from '@adobe/react-native-acpmedia';
99-
100-
ACPMedia.registerExtension();
101-
```
102-
10395
#### Media API:
10496

10597
##### Create a media tracker:

__tests__/ACPMediaTests.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ describe('ACPMedia', () => {
2525
expect(spy).toHaveBeenCalled();
2626
});
2727

28-
test('registerExtension is called', async () => {
29-
const spy = jest.spyOn(NativeModules.ACPMedia, 'registerExtension');
30-
await ACPMedia.registerExtension();
31-
expect(spy).toHaveBeenCalled();
32-
});
33-
3428
test('createMediaObject returns correct value', async () => {
3529
let name = "mediaName";
3630
let mediaId = "mediaId";

android/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@ android {
2929

3030
repositories {
3131
google()
32-
jcenter()
3332
mavenCentral()
3433
}
3534

3635
dependencies {
3736
implementation "com.facebook.react:react-native:+"
38-
api "com.adobe.marketing.mobile:media:2.1.1"
37+
api "com.adobe.marketing.mobile:media:2.+"
3938
}

android/src/main/java/com/adobe/marketing/mobile/reactnative/media/RCTACPMediaModule.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,6 @@ public void extensionVersion(final Promise promise) {
4949
promise.resolve(Media.extensionVersion());
5050
}
5151

52-
@ReactMethod
53-
public void registerExtension() {
54-
try {
55-
Media.registerExtension();
56-
} catch (InvalidInitException e) {
57-
Log.d(getName(), "Registering Media extension failed with error: " + e.getMessage());
58-
}
59-
}
60-
6152
@ReactMethod
6253
public void createTracker(final Promise promise) {
6354
MediaTracker mediaTracker = Media.createTracker();

ios/Podfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,26 @@ target 'RCTACPMedia' do
1616
pod 'DoubleConversion', :podspec => "#{react_native_path}/third-party-podspecs/DoubleConversion.podspec"
1717
pod "yoga", :path => "#{react_native_path}/ReactCommon/yoga"
1818
pod "Folly", :podspec => "#{react_native_path}/third-party-podspecs/Folly.podspec"
19+
20+
pod "ACPMedia"
21+
1922
end
23+
24+
post_install do |installer|
25+
## Fix for XCode 12.5 beta
26+
find_and_replace("../node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm",
27+
"_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules", "_initializeModules:(NSArray<Class> *)modules")
28+
end
29+
30+
def find_and_replace(dir, findstr, replacestr)
31+
Dir[dir].each do |name|
32+
text = File.read(name)
33+
replace = text.gsub(findstr,replacestr)
34+
if text != replace
35+
puts "Fix: " + name
36+
File.open(name, "w") { |file| file.puts replace }
37+
STDOUT.flush
38+
end
39+
end
40+
Dir[dir + '*/'].each(&method(:find_and_replace))
41+
end

ios/Podfile.lock

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
PODS:
2+
- ACPCore (2.9.4):
3+
- ACPCore/main (= 2.9.4)
4+
- ACPCore/main (2.9.4)
5+
- ACPMedia (2.3.1):
6+
- ACPCore (>= 2.9.0)
7+
- ACPMedia/xcframeworks (= 2.3.1)
8+
- ACPMedia/xcframeworks (2.3.1):
9+
- ACPCore (>= 2.9.0)
210
- boost-for-react-native (1.63.0)
311
- DoubleConversion (1.1.6)
412
- Folly (2018.10.22.00):
@@ -43,6 +51,7 @@ PODS:
4351
- yoga (0.60.6.React)
4452

4553
DEPENDENCIES:
54+
- ACPMedia
4655
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
4756
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
4857
- React-Core (from `../node_modules/react-native/React`)
@@ -56,6 +65,9 @@ SPEC REPOS:
5665
https://github.com/CocoaPods/Specs.git:
5766
- boost-for-react-native
5867
- glog
68+
trunk:
69+
- ACPCore
70+
- ACPMedia
5971

6072
EXTERNAL SOURCES:
6173
DoubleConversion:
@@ -76,6 +88,8 @@ EXTERNAL SOURCES:
7688
:path: "../node_modules/react-native/ReactCommon/yoga"
7789

7890
SPEC CHECKSUMS:
91+
ACPCore: 7d09a5b7233d72fa7cb4369c99a8250fd7240305
92+
ACPMedia: 3868c04bb540b50ee54a4a75eae2765a58a406ee
7993
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
8094
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
8195
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
@@ -87,6 +101,6 @@ SPEC CHECKSUMS:
87101
React-jsinspector: a58b86545a0185f69768e78ac96ca9fe43fa3694
88102
yoga: 5079887aa3e4c62142d6bcee493022643ee4d730
89103

90-
PODFILE CHECKSUM: 40e2652abd49702929f97ffd00b43cc4b5478c92
104+
PODFILE CHECKSUM: 87ad4590f588059d49ce8f60aa92fdf9adbee7a0
91105

92-
COCOAPODS: 1.10.0
106+
COCOAPODS: 1.10.1

ios/RCTACPMedia.xcodeproj/project.pbxproj

Lines changed: 49 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 52;
6+
objectVersion = 46;
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
21B629FD2590482F0039CE4D /* ACPMedia.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21B629FB2590482F0039CE4D /* ACPMedia.xcframework */; };
11-
21B62A02259048440039CE4D /* ACPMedia.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 21B62A01259048390039CE4D /* ACPMedia.h */; };
12-
21B62A03259048440039CE4D /* ACPMediaConstants.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 21B62A00259048390039CE4D /* ACPMediaConstants.h */; };
1310
21D0CC3B235F8F94002043A2 /* ACPMedia+ACPMediaEventConversion.m in Sources */ = {isa = PBXBuildFile; fileRef = 21D0CC3A235F8F94002043A2 /* ACPMedia+ACPMediaEventConversion.m */; };
11+
27806D4094C56DFAA8E6D2D6 /* libPods-RCTACPMedia.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C5AC1BB6D9542D0CA53F615E /* libPods-RCTACPMedia.a */; };
1412
B3E7B58A1CC2AC0600A0062D /* RCTACPMedia.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RCTACPMedia.m */; };
1513
/* End PBXBuildFile section */
1614

@@ -21,31 +19,28 @@
2119
dstPath = "include/$(PRODUCT_NAME)";
2220
dstSubfolderSpec = 16;
2321
files = (
24-
21B62A02259048440039CE4D /* ACPMedia.h in CopyFiles */,
25-
21B62A03259048440039CE4D /* ACPMediaConstants.h in CopyFiles */,
2622
);
2723
runOnlyForDeploymentPostprocessing = 0;
2824
};
2925
/* End PBXCopyFilesBuildPhase section */
3026

3127
/* Begin PBXFileReference section */
3228
134814201AA4EA6300B7C361 /* libRCTACPMedia.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTACPMedia.a; sourceTree = BUILT_PRODUCTS_DIR; };
33-
21B629FB2590482F0039CE4D /* ACPMedia.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = ACPMedia.xcframework; sourceTree = "<group>"; };
34-
21B629FC2590482F0039CE4D /* ACPMediaTV.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = ACPMediaTV.xcframework; sourceTree = "<group>"; };
35-
21B62A00259048390039CE4D /* ACPMediaConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ACPMediaConstants.h; path = "ACPMedia.xcframework/ios-arm64_armv7_armv7s/Headers/ACPMediaConstants.h"; sourceTree = "<group>"; };
36-
21B62A01259048390039CE4D /* ACPMedia.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ACPMedia.h; path = "ACPMedia.xcframework/ios-arm64_armv7_armv7s/Headers/ACPMedia.h"; sourceTree = "<group>"; };
3729
21D0CC39235F8F94002043A2 /* ACPMedia+ACPMediaEventConversion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "ACPMedia+ACPMediaEventConversion.h"; path = "src/ACPMedia+ACPMediaEventConversion.h"; sourceTree = "<group>"; };
3830
21D0CC3A235F8F94002043A2 /* ACPMedia+ACPMediaEventConversion.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "ACPMedia+ACPMediaEventConversion.m"; path = "src/ACPMedia+ACPMediaEventConversion.m"; sourceTree = "<group>"; };
31+
A69E3A6B88D8914BB533944E /* Pods-RCTACPMedia.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RCTACPMedia.release.xcconfig"; path = "Target Support Files/Pods-RCTACPMedia/Pods-RCTACPMedia.release.xcconfig"; sourceTree = "<group>"; };
3932
B3E7B5881CC2AC0600A0062D /* RCTACPMedia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RCTACPMedia.h; path = src/RCTACPMedia.h; sourceTree = "<group>"; };
4033
B3E7B5891CC2AC0600A0062D /* RCTACPMedia.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RCTACPMedia.m; path = src/RCTACPMedia.m; sourceTree = "<group>"; };
34+
C3CE1379015D4DE99EAD9D38 /* Pods-RCTACPMedia.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RCTACPMedia.debug.xcconfig"; path = "Target Support Files/Pods-RCTACPMedia/Pods-RCTACPMedia.debug.xcconfig"; sourceTree = "<group>"; };
35+
C5AC1BB6D9542D0CA53F615E /* libPods-RCTACPMedia.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RCTACPMedia.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4136
/* End PBXFileReference section */
4237

4338
/* Begin PBXFrameworksBuildPhase section */
4439
58B511D81A9E6C8500147676 /* Frameworks */ = {
4540
isa = PBXFrameworksBuildPhase;
4641
buildActionMask = 2147483647;
4742
files = (
48-
21B629FD2590482F0039CE4D /* ACPMedia.xcframework in Frameworks */,
43+
27806D4094C56DFAA8E6D2D6 /* libPods-RCTACPMedia.a in Frameworks */,
4944
);
5045
runOnlyForDeploymentPostprocessing = 0;
5146
};
@@ -60,15 +55,14 @@
6055
name = Products;
6156
sourceTree = "<group>";
6257
};
63-
211D500F235F51160067234A /* libs */ = {
58+
2B632DD416224E334850ED87 /* Pods */ = {
6459
isa = PBXGroup;
6560
children = (
66-
21B62A01259048390039CE4D /* ACPMedia.h */,
67-
21B62A00259048390039CE4D /* ACPMediaConstants.h */,
68-
21B629FB2590482F0039CE4D /* ACPMedia.xcframework */,
69-
21B629FC2590482F0039CE4D /* ACPMediaTV.xcframework */,
61+
C3CE1379015D4DE99EAD9D38 /* Pods-RCTACPMedia.debug.xcconfig */,
62+
A69E3A6B88D8914BB533944E /* Pods-RCTACPMedia.release.xcconfig */,
7063
);
71-
path = libs;
64+
name = Pods;
65+
path = Pods;
7266
sourceTree = "<group>";
7367
};
7468
58B511D21A9E6C8500147676 = {
@@ -78,18 +72,28 @@
7872
B3E7B5891CC2AC0600A0062D /* RCTACPMedia.m */,
7973
21D0CC39235F8F94002043A2 /* ACPMedia+ACPMediaEventConversion.h */,
8074
21D0CC3A235F8F94002043A2 /* ACPMedia+ACPMediaEventConversion.m */,
81-
211D500F235F51160067234A /* libs */,
8275
134814211AA4EA7D00B7C361 /* Products */,
76+
2B632DD416224E334850ED87 /* Pods */,
77+
B2635C28CD6C3F2460EA6B4D /* Frameworks */,
8378
);
8479
sourceTree = "<group>";
8580
};
81+
B2635C28CD6C3F2460EA6B4D /* Frameworks */ = {
82+
isa = PBXGroup;
83+
children = (
84+
C5AC1BB6D9542D0CA53F615E /* libPods-RCTACPMedia.a */,
85+
);
86+
name = Frameworks;
87+
sourceTree = "<group>";
88+
};
8689
/* End PBXGroup section */
8790

8891
/* Begin PBXNativeTarget section */
8992
58B511DA1A9E6C8500147676 /* RCTACPMedia */ = {
9093
isa = PBXNativeTarget;
9194
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RCTACPMedia" */;
9295
buildPhases = (
96+
52434F35F072FA7B27A787AD /* [CP] Check Pods Manifest.lock */,
9397
58B511D91A9E6C8500147676 /* CopyFiles */,
9498
58B511D71A9E6C8500147676 /* Sources */,
9599
58B511D81A9E6C8500147676 /* Frameworks */,
@@ -135,6 +139,31 @@
135139
};
136140
/* End PBXProject section */
137141

142+
/* Begin PBXShellScriptBuildPhase section */
143+
52434F35F072FA7B27A787AD /* [CP] Check Pods Manifest.lock */ = {
144+
isa = PBXShellScriptBuildPhase;
145+
buildActionMask = 2147483647;
146+
files = (
147+
);
148+
inputFileListPaths = (
149+
);
150+
inputPaths = (
151+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
152+
"${PODS_ROOT}/Manifest.lock",
153+
);
154+
name = "[CP] Check Pods Manifest.lock";
155+
outputFileListPaths = (
156+
);
157+
outputPaths = (
158+
"$(DERIVED_FILE_DIR)/Pods-RCTACPMedia-checkManifestLockResult.txt",
159+
);
160+
runOnlyForDeploymentPostprocessing = 0;
161+
shellPath = /bin/sh;
162+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
163+
showEnvVarsInLog = 0;
164+
};
165+
/* End PBXShellScriptBuildPhase section */
166+
138167
/* Begin PBXSourcesBuildPhase section */
139168
58B511D71A9E6C8500147676 /* Sources */ = {
140169
isa = PBXSourcesBuildPhase;
@@ -231,6 +260,7 @@
231260
};
232261
58B511F01A9E6C8500147676 /* Debug */ = {
233262
isa = XCBuildConfiguration;
263+
baseConfigurationReference = C3CE1379015D4DE99EAD9D38 /* Pods-RCTACPMedia.debug.xcconfig */;
234264
buildSettings = {
235265
HEADER_SEARCH_PATHS = (
236266
"$(inherited)",
@@ -251,6 +281,7 @@
251281
};
252282
58B511F11A9E6C8500147676 /* Release */ = {
253283
isa = XCBuildConfiguration;
284+
baseConfigurationReference = A69E3A6B88D8914BB533944E /* Pods-RCTACPMedia.release.xcconfig */;
254285
buildSettings = {
255286
HEADER_SEARCH_PATHS = (
256287
"$(inherited)",

0 commit comments

Comments
 (0)