Skip to content

Commit c205bd4

Browse files
committed
refactor: replace Iterable-React-Native-SDK podspec with RNIterableAPI podspec and update related files for improved structure and functionality
1 parent f68e771 commit c205bd4

6 files changed

Lines changed: 952 additions & 845 deletions

File tree

Iterable-React-Native-SDK.podspec

Lines changed: 0 additions & 44 deletions
This file was deleted.

RNIterableAPI.podspec

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
require "json"
2+
3+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4+
5+
Pod::Spec.new do |s|
6+
s.name = "RNIterableAPI"
7+
s.version = package["version"]
8+
s.summary = package["description"]
9+
s.homepage = package["homepage"]
10+
s.license = package["license"]
11+
s.authors = package["author"]
12+
13+
s.platforms = { :ios => min_ios_version_supported }
14+
s.source = { :git => "https://github.com/Iterable/react-native-sdk.git", :tag => "#{s.version}" }
15+
16+
s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"
17+
s.private_header_files = "ios/**/*.h"
18+
19+
# Load Iterables iOS SDK as a dependency
20+
s.dependency "Iterable-iOS-SDK", "6.5.4"
21+
22+
# Basic Swift support
23+
s.pod_target_xcconfig = {
24+
'DEFINES_MODULE' => 'YES',
25+
'CLANG_ENABLE_MODULES' => 'YES',
26+
'SWIFT_VERSION' => '5.0',
27+
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
28+
}
29+
30+
install_modules_dependencies(s)
31+
32+
end

example/ios/ReactNativeSdkExample.xcodeproj/project.pbxproj

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
779227342DFA3FB500D69EC0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 779227332DFA3FB500D69EC0 /* AppDelegate.swift */; };
1313
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
1414
A3A40C20801B8F02005FA4C0 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 1FC6B09E65A7BD9F6864C5D8 /* PrivacyInfo.xcprivacy */; };
15-
BE277777A73E9108C50DE4EB /* libPods-ReactNativeSdkExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 973DE20AE7D1571DDAC48802 /* libPods-ReactNativeSdkExample.a */; };
15+
D541D7F1086475E327DC0479 /* libPods-ReactNativeSdkExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 92B099A27C368A5D5761B647 /* libPods-ReactNativeSdkExample.a */; };
1616
/* End PBXBuildFile section */
1717

1818
/* Begin PBXContainerItemProxy section */
@@ -34,13 +34,13 @@
3434
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ReactNativeSdkExample/Info.plist; sourceTree = "<group>"; };
3535
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = ReactNativeSdkExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
3636
1FC6B09E65A7BD9F6864C5D8 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = ReactNativeSdkExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
37-
319A77F763063B5643ADF8DD /* Pods-ReactNativeSdkExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeSdkExample.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample.release.xcconfig"; sourceTree = "<group>"; };
37+
285162A17606BA7196269891 /* Pods-ReactNativeSdkExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeSdkExample.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample.debug.xcconfig"; sourceTree = "<group>"; };
3838
779227312DFA3FB500D69EC0 /* ReactNativeSdkExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ReactNativeSdkExample-Bridging-Header.h"; sourceTree = "<group>"; };
3939
779227322DFA3FB500D69EC0 /* ReactNativeSdkExampleTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ReactNativeSdkExampleTests-Bridging-Header.h"; sourceTree = "<group>"; };
4040
779227332DFA3FB500D69EC0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = ReactNativeSdkExample/AppDelegate.swift; sourceTree = "<group>"; };
4141
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = ReactNativeSdkExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
42-
8FE34013461CBFBDFF5ADF04 /* Pods-ReactNativeSdkExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeSdkExample.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample.debug.xcconfig"; sourceTree = "<group>"; };
43-
973DE20AE7D1571DDAC48802 /* libPods-ReactNativeSdkExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativeSdkExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
42+
92B099A27C368A5D5761B647 /* libPods-ReactNativeSdkExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativeSdkExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
43+
92BE65A9CF5E146D2550AEB8 /* Pods-ReactNativeSdkExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeSdkExample.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample.release.xcconfig"; sourceTree = "<group>"; };
4444
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
4545
/* End PBXFileReference section */
4646

@@ -56,7 +56,7 @@
5656
isa = PBXFrameworksBuildPhase;
5757
buildActionMask = 2147483647;
5858
files = (
59-
BE277777A73E9108C50DE4EB /* libPods-ReactNativeSdkExample.a in Frameworks */,
59+
D541D7F1086475E327DC0479 /* libPods-ReactNativeSdkExample.a in Frameworks */,
6060
);
6161
runOnlyForDeploymentPostprocessing = 0;
6262
};
@@ -99,7 +99,7 @@
9999
isa = PBXGroup;
100100
children = (
101101
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
102-
973DE20AE7D1571DDAC48802 /* libPods-ReactNativeSdkExample.a */,
102+
92B099A27C368A5D5761B647 /* libPods-ReactNativeSdkExample.a */,
103103
);
104104
name = Frameworks;
105105
sourceTree = "<group>";
@@ -138,8 +138,8 @@
138138
BBD78D7AC51CEA395F1C20DB /* Pods */ = {
139139
isa = PBXGroup;
140140
children = (
141-
8FE34013461CBFBDFF5ADF04 /* Pods-ReactNativeSdkExample.debug.xcconfig */,
142-
319A77F763063B5643ADF8DD /* Pods-ReactNativeSdkExample.release.xcconfig */,
141+
285162A17606BA7196269891 /* Pods-ReactNativeSdkExample.debug.xcconfig */,
142+
92BE65A9CF5E146D2550AEB8 /* Pods-ReactNativeSdkExample.release.xcconfig */,
143143
);
144144
path = Pods;
145145
sourceTree = "<group>";
@@ -169,13 +169,13 @@
169169
isa = PBXNativeTarget;
170170
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativeSdkExample" */;
171171
buildPhases = (
172-
20B326C04992EEC006FD601B /* [CP] Check Pods Manifest.lock */,
172+
F1346D817BB0971FE7273FBD /* [CP] Check Pods Manifest.lock */,
173173
13B07F871A680F5B00A75B9A /* Sources */,
174174
13B07F8C1A680F5B00A75B9A /* Frameworks */,
175175
13B07F8E1A680F5B00A75B9A /* Resources */,
176176
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
177-
CDB95CBF6F1E1693CBFEC194 /* [CP] Embed Pods Frameworks */,
178-
84171D58128F84EC4ED7D163 /* [CP] Copy Pods Resources */,
177+
F7B30F51BDA449AFE8BB742D /* [CP] Embed Pods Frameworks */,
178+
861560374D1CE97F9DB2B212 /* [CP] Copy Pods Resources */,
179179
);
180180
buildRules = (
181181
);
@@ -260,46 +260,46 @@
260260
shellPath = /bin/sh;
261261
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
262262
};
263-
20B326C04992EEC006FD601B /* [CP] Check Pods Manifest.lock */ = {
263+
861560374D1CE97F9DB2B212 /* [CP] Copy Pods Resources */ = {
264264
isa = PBXShellScriptBuildPhase;
265265
buildActionMask = 2147483647;
266266
files = (
267267
);
268268
inputFileListPaths = (
269+
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources-${CONFIGURATION}-input-files.xcfilelist",
269270
);
270-
inputPaths = (
271-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
272-
"${PODS_ROOT}/Manifest.lock",
273-
);
274-
name = "[CP] Check Pods Manifest.lock";
271+
name = "[CP] Copy Pods Resources";
275272
outputFileListPaths = (
276-
);
277-
outputPaths = (
278-
"$(DERIVED_FILE_DIR)/Pods-ReactNativeSdkExample-checkManifestLockResult.txt",
273+
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources-${CONFIGURATION}-output-files.xcfilelist",
279274
);
280275
runOnlyForDeploymentPostprocessing = 0;
281276
shellPath = /bin/sh;
282-
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";
277+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources.sh\"\n";
283278
showEnvVarsInLog = 0;
284279
};
285-
84171D58128F84EC4ED7D163 /* [CP] Copy Pods Resources */ = {
280+
F1346D817BB0971FE7273FBD /* [CP] Check Pods Manifest.lock */ = {
286281
isa = PBXShellScriptBuildPhase;
287282
buildActionMask = 2147483647;
288283
files = (
289284
);
290285
inputFileListPaths = (
291-
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources-${CONFIGURATION}-input-files.xcfilelist",
292286
);
293-
name = "[CP] Copy Pods Resources";
287+
inputPaths = (
288+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
289+
"${PODS_ROOT}/Manifest.lock",
290+
);
291+
name = "[CP] Check Pods Manifest.lock";
294292
outputFileListPaths = (
295-
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources-${CONFIGURATION}-output-files.xcfilelist",
293+
);
294+
outputPaths = (
295+
"$(DERIVED_FILE_DIR)/Pods-ReactNativeSdkExample-checkManifestLockResult.txt",
296296
);
297297
runOnlyForDeploymentPostprocessing = 0;
298298
shellPath = /bin/sh;
299-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources.sh\"\n";
299+
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";
300300
showEnvVarsInLog = 0;
301301
};
302-
CDB95CBF6F1E1693CBFEC194 /* [CP] Embed Pods Frameworks */ = {
302+
F7B30F51BDA449AFE8BB742D /* [CP] Embed Pods Frameworks */ = {
303303
isa = PBXShellScriptBuildPhase;
304304
buildActionMask = 2147483647;
305305
files = (
@@ -406,7 +406,7 @@
406406
};
407407
13B07F941A680F5B00A75B9A /* Debug */ = {
408408
isa = XCBuildConfiguration;
409-
baseConfigurationReference = 8FE34013461CBFBDFF5ADF04 /* Pods-ReactNativeSdkExample.debug.xcconfig */;
409+
baseConfigurationReference = 285162A17606BA7196269891 /* Pods-ReactNativeSdkExample.debug.xcconfig */;
410410
buildSettings = {
411411
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
412412
CLANG_ENABLE_MODULES = YES;
@@ -436,7 +436,7 @@
436436
};
437437
13B07F951A680F5B00A75B9A /* Release */ = {
438438
isa = XCBuildConfiguration;
439-
baseConfigurationReference = 319A77F763063B5643ADF8DD /* Pods-ReactNativeSdkExample.release.xcconfig */;
439+
baseConfigurationReference = 92BE65A9CF5E146D2550AEB8 /* Pods-ReactNativeSdkExample.release.xcconfig */;
440440
buildSettings = {
441441
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
442442
CLANG_ENABLE_MODULES = YES;

ios/RNIterableAPI/RNIterableAPI.h

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1-
//
2-
// RNIterableAPI.h
3-
// RNIterableAPI
4-
//
5-
// Created by Loren Posen on 6/11/25.
6-
// Copyright © 2025 Iterable. All rights reserved.
7-
//
1+
#import <RNIterableAPISpec/RNIterableAPISpec.h>
2+
#import <React/RCTEventEmitter.h>
83
#import <React/RCTBridgeModule.h>
94

5+
@interface RNIterableAPI : RCTEventEmitter <NativeRNIterableAPISpec>
6+
7+
@end
8+
9+
/**
10+
* OLD BELOW
11+
*/
12+
// //
13+
// // RNIterableAPI.h
14+
// // RNIterableAPI
15+
// //
16+
// // Created by Loren Posen on 6/11/25.
17+
// // Copyright © 2025 Iterable. All rights reserved.
18+
// //
19+
// #import <React/RCTBridgeModule.h>
20+

0 commit comments

Comments
 (0)