From 40fe7de8b6d5a21e780044d7cb26734f55e7f333 Mon Sep 17 00:00:00 2001 From: Aman Kumar Date: Sat, 3 Feb 2024 23:53:01 +0530 Subject: [PATCH] chore: update README.md --- README.md | 68 ++++++--- example/ios/Podfile.lock | 4 +- .../project.pbxproj | 134 +++++++++--------- example/package.json | 3 +- example/src/App.tsx | 2 +- yarn.lock | 3 +- 6 files changed, 119 insertions(+), 95 deletions(-) diff --git a/README.md b/README.md index c046197..c816771 100755 --- a/README.md +++ b/README.md @@ -1,31 +1,53 @@ -# rn-unique-identifier +# React Native Unique Identifier +### Overview +The `rn-unique-identifier-oldarch` npm package is designed to provide a simple and effective solution for generating unique and persistent identifiers in React Native applications. The identifier generated by this package remains consistent across uninstallation and reinstallation of the same application on both Android and iOS platforms. -React Native Unique Identifier Package +### New Architecture Support +use `rn-unique-identifier` npm package for new architecture support -## Installation +### Features +Cross-Platform Support: Works seamlessly on both Android and iOS platforms. +Unique and Persistent: Generates identifiers that persist across application uninstallations and reinstalls. +Simple Integration: Easily integrate the package by importing and calling getPersistentIdentifier(callback: (string) => void). -```sh -npm install rn-unique-identifier +### Installation +Install the package using npm: ``` - -## Usage - -```js -import { multiply } from 'rn-unique-identifier'; - -// ... - -const result = await multiply(3, 7); +npm install rn-unique-identifier-oldarch ``` +### Usage +Import the module in your React Native application and use it to obtain the persistent identifier: -## Contributing - -See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow. - -## License - -MIT +Example App.jsx(javascript) +``` +import React, { useEffect } from 'react'; +import { View, Text } from 'react-native'; +import { getPersistentIdentifier } from 'rn-unique-identifier-oldarch'; + +const App = () => { + const [result, setResult] = useState(""); + useEffect(() => { + getPersistentIdentifier( + (deviceId) => { + console.log('Persistent Identifier:', identifier); + setResult(deviceId) + } + ); + }, []); + + return ( + + Check the console for the Persistent Identifier. + Btw the value is: {result} + + ); +}; + +export default App; +``` ---- +### Contribution +Contributions to the project are welcome! Feel free to create issues or pull requests on the GitHub repository. -Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob) +### License +This project is licensed under the MIT License. diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index b051402..b45cb96 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1111,7 +1111,7 @@ PODS: - React-jsi (= 0.73.3) - React-logger (= 0.73.3) - React-perflogger (= 0.73.3) - - rn-unique-identifier (0.1.0): + - rn-unique-identifier (1.1.0): - glog - RCT-Folly (= 2022.05.16.00) - React-Core @@ -1371,7 +1371,7 @@ SPEC CHECKSUMS: React-runtimescheduler: aa382ce525689b88459e1181b3649220f175dc31 React-utils: b22b4a51aa578b3aac1e7c19501c0b9ba358ed79 ReactCommon: e708b8be8cb317b83e31c6ccfeda8bf6c0d1a2b3 - rn-unique-identifier: 2be3e01b58b6fbf82a54053072a96c35af7b7f3c + rn-unique-identifier: 6636d488189fc1c3b11c33a5c762514cb2d78ed7 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: ff0382b894475dba0b4d2a5fda860bfee5a9afad diff --git a/example/ios/RnUniqueIdentifierExample.xcodeproj/project.pbxproj b/example/ios/RnUniqueIdentifierExample.xcodeproj/project.pbxproj index ad9a402..497dc07 100644 --- a/example/ios/RnUniqueIdentifierExample.xcodeproj/project.pbxproj +++ b/example/ios/RnUniqueIdentifierExample.xcodeproj/project.pbxproj @@ -11,9 +11,9 @@ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 31EFFA78C26CB2B30D7DBE8D /* libPods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E5CB29C4F467441990D20CEB /* libPods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.a */; }; + 70CF254C346F81D08377EA32 /* libPods-RnUniqueIdentifierExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C3F61BEDBFE0681033392EE1 /* libPods-RnUniqueIdentifierExample.a */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; - 8A3D18A1C0235A21B72012ED /* libPods-RnUniqueIdentifierExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B29F95629B14558F862B87BD /* libPods-RnUniqueIdentifierExample.a */; }; - C0DA657A6E6FAE5B7C29B07D /* libPods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C2BF81E6D8C1724C44E6174 /* libPods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -30,20 +30,20 @@ 00E356EE1AD99517003FC87E /* RnUniqueIdentifierExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RnUniqueIdentifierExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 00E356F21AD99517003FC87E /* RnUniqueIdentifierExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RnUniqueIdentifierExampleTests.m; sourceTree = ""; }; + 01DA294DECC0C4B5895F5545 /* Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.release.xcconfig"; path = "Target Support Files/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.release.xcconfig"; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* RnUniqueIdentifierExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RnUniqueIdentifierExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = RnUniqueIdentifierExample/AppDelegate.h; sourceTree = ""; }; 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = RnUniqueIdentifierExample/AppDelegate.mm; sourceTree = ""; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = RnUniqueIdentifierExample/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RnUniqueIdentifierExample/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = RnUniqueIdentifierExample/main.m; sourceTree = ""; }; - 567DE5520100E9D123191C79 /* Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.release.xcconfig"; path = "Target Support Files/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.release.xcconfig"; sourceTree = ""; }; - 7C2BF81E6D8C1724C44E6174 /* libPods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 44D93BD2B55FD82402679615 /* Pods-RnUniqueIdentifierExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RnUniqueIdentifierExample.debug.xcconfig"; path = "Target Support Files/Pods-RnUniqueIdentifierExample/Pods-RnUniqueIdentifierExample.debug.xcconfig"; sourceTree = ""; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = RnUniqueIdentifierExample/LaunchScreen.storyboard; sourceTree = ""; }; - AF8858EECE140659B73C7AFD /* Pods-RnUniqueIdentifierExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RnUniqueIdentifierExample.release.xcconfig"; path = "Target Support Files/Pods-RnUniqueIdentifierExample/Pods-RnUniqueIdentifierExample.release.xcconfig"; sourceTree = ""; }; - B29F95629B14558F862B87BD /* libPods-RnUniqueIdentifierExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RnUniqueIdentifierExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - E038C44968E7A900CA783FE8 /* Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.debug.xcconfig"; sourceTree = ""; }; - E55577412D1256628E8C6D05 /* Pods-RnUniqueIdentifierExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RnUniqueIdentifierExample.debug.xcconfig"; path = "Target Support Files/Pods-RnUniqueIdentifierExample/Pods-RnUniqueIdentifierExample.debug.xcconfig"; sourceTree = ""; }; + C05288BB9A42DD93CAD4FA5A /* Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.debug.xcconfig"; sourceTree = ""; }; + C3F61BEDBFE0681033392EE1 /* libPods-RnUniqueIdentifierExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RnUniqueIdentifierExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + E5CB29C4F467441990D20CEB /* libPods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; + F74DFED68D12E6C3D8CC68ED /* Pods-RnUniqueIdentifierExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RnUniqueIdentifierExample.release.xcconfig"; path = "Target Support Files/Pods-RnUniqueIdentifierExample/Pods-RnUniqueIdentifierExample.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -51,7 +51,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C0DA657A6E6FAE5B7C29B07D /* libPods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.a in Frameworks */, + 31EFFA78C26CB2B30D7DBE8D /* libPods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -59,7 +59,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 8A3D18A1C0235A21B72012ED /* libPods-RnUniqueIdentifierExample.a in Frameworks */, + 70CF254C346F81D08377EA32 /* libPods-RnUniqueIdentifierExample.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -100,8 +100,8 @@ isa = PBXGroup; children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - B29F95629B14558F862B87BD /* libPods-RnUniqueIdentifierExample.a */, - 7C2BF81E6D8C1724C44E6174 /* libPods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.a */, + C3F61BEDBFE0681033392EE1 /* libPods-RnUniqueIdentifierExample.a */, + E5CB29C4F467441990D20CEB /* libPods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.a */, ); name = Frameworks; sourceTree = ""; @@ -140,10 +140,10 @@ BBD78D7AC51CEA395F1C20DB /* Pods */ = { isa = PBXGroup; children = ( - E55577412D1256628E8C6D05 /* Pods-RnUniqueIdentifierExample.debug.xcconfig */, - AF8858EECE140659B73C7AFD /* Pods-RnUniqueIdentifierExample.release.xcconfig */, - E038C44968E7A900CA783FE8 /* Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.debug.xcconfig */, - 567DE5520100E9D123191C79 /* Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.release.xcconfig */, + 44D93BD2B55FD82402679615 /* Pods-RnUniqueIdentifierExample.debug.xcconfig */, + F74DFED68D12E6C3D8CC68ED /* Pods-RnUniqueIdentifierExample.release.xcconfig */, + C05288BB9A42DD93CAD4FA5A /* Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.debug.xcconfig */, + 01DA294DECC0C4B5895F5545 /* Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -155,12 +155,12 @@ isa = PBXNativeTarget; buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "RnUniqueIdentifierExampleTests" */; buildPhases = ( - 0F80658CC351B44AA76E15AF /* [CP] Check Pods Manifest.lock */, + 0010C38CDB15328EC48AC6F5 /* [CP] Check Pods Manifest.lock */, 00E356EA1AD99517003FC87E /* Sources */, 00E356EB1AD99517003FC87E /* Frameworks */, 00E356EC1AD99517003FC87E /* Resources */, - 164B3988CDD00D049D72EDE8 /* [CP] Embed Pods Frameworks */, - 128A4B028BBBF4BB575417DC /* [CP] Copy Pods Resources */, + 752729F94B7EB84D8812D4B0 /* [CP] Embed Pods Frameworks */, + 0D718F1AB87B339A27B11792 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -176,13 +176,13 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RnUniqueIdentifierExample" */; buildPhases = ( - 4AB2D6EE6118E50D693B117D /* [CP] Check Pods Manifest.lock */, + 35D4228B662759C40D227ADD /* [CP] Check Pods Manifest.lock */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - E325AC2EC6A72F0593C34C8D /* [CP] Embed Pods Frameworks */, - 00F14A812D52DA6BD5CFCB10 /* [CP] Copy Pods Resources */, + BAF9658A29DE0C18B7B10DD6 /* [CP] Embed Pods Frameworks */, + C893F93CFB67339FC12C8DC3 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -250,6 +250,28 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 0010C38CDB15328EC48AC6F5 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + 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"; + showEnvVarsInLog = 0; + }; 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -266,24 +288,24 @@ shellPath = /bin/sh; shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; }; - 00F14A812D52DA6BD5CFCB10 /* [CP] Copy Pods Resources */ = { + 0D718F1AB87B339A27B11792 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample/Pods-RnUniqueIdentifierExample-resources-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests-resources-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Copy Pods Resources"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample/Pods-RnUniqueIdentifierExample-resources-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample/Pods-RnUniqueIdentifierExample-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 0F80658CC351B44AA76E15AF /* [CP] Check Pods Manifest.lock */ = { + 35D4228B662759C40D227ADD /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -298,31 +320,14 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-RnUniqueIdentifierExample-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; 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"; showEnvVarsInLog = 0; }; - 128A4B028BBBF4BB575417DC /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 164B3988CDD00D049D72EDE8 /* [CP] Embed Pods Frameworks */ = { + 752729F94B7EB84D8812D4B0 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -339,43 +344,38 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests/Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 4AB2D6EE6118E50D693B117D /* [CP] Check Pods Manifest.lock */ = { + BAF9658A29DE0C18B7B10DD6 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample/Pods-RnUniqueIdentifierExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RnUniqueIdentifierExample-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample/Pods-RnUniqueIdentifierExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - 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"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample/Pods-RnUniqueIdentifierExample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - E325AC2EC6A72F0593C34C8D /* [CP] Embed Pods Frameworks */ = { + C893F93CFB67339FC12C8DC3 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample/Pods-RnUniqueIdentifierExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample/Pods-RnUniqueIdentifierExample-resources-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + name = "[CP] Copy Pods Resources"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample/Pods-RnUniqueIdentifierExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample/Pods-RnUniqueIdentifierExample-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample/Pods-RnUniqueIdentifierExample-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RnUniqueIdentifierExample/Pods-RnUniqueIdentifierExample-resources.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -411,7 +411,7 @@ /* Begin XCBuildConfiguration section */ 00E356F61AD99517003FC87E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E038C44968E7A900CA783FE8 /* Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.debug.xcconfig */; + baseConfigurationReference = C05288BB9A42DD93CAD4FA5A /* Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -438,7 +438,7 @@ }; 00E356F71AD99517003FC87E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 567DE5520100E9D123191C79 /* Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.release.xcconfig */; + baseConfigurationReference = 01DA294DECC0C4B5895F5545 /* Pods-RnUniqueIdentifierExample-RnUniqueIdentifierExampleTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; @@ -462,7 +462,7 @@ }; 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E55577412D1256628E8C6D05 /* Pods-RnUniqueIdentifierExample.debug.xcconfig */; + baseConfigurationReference = 44D93BD2B55FD82402679615 /* Pods-RnUniqueIdentifierExample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -490,7 +490,7 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AF8858EECE140659B73C7AFD /* Pods-RnUniqueIdentifierExample.release.xcconfig */; + baseConfigurationReference = F74DFED68D12E6C3D8CC68ED /* Pods-RnUniqueIdentifierExample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -547,7 +547,7 @@ COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; @@ -624,7 +624,7 @@ COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; diff --git a/example/package.json b/example/package.json index 6fb8292..77c8494 100755 --- a/example/package.json +++ b/example/package.json @@ -11,7 +11,8 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "0.73.3" + "react-native": "0.73.3", + "rn-unique-identifier-oldarch": "workspace:^" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/example/src/App.tsx b/example/src/App.tsx index 62c46e7..acde1a3 100755 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { StyleSheet, View, Text } from 'react-native'; -import { getPersistentIdentifier } from 'rn-unique-identifier'; +import { getPersistentIdentifier } from 'rn-unique-identifier-oldarch'; export default function App() { const [result, setResult] = React.useState(); diff --git a/yarn.lock b/yarn.lock index 83f695d..0b25428 100755 --- a/yarn.lock +++ b/yarn.lock @@ -11392,10 +11392,11 @@ __metadata: pod-install: ^0.1.0 react: 18.2.0 react-native: 0.73.3 + rn-unique-identifier-oldarch: "workspace:^" languageName: unknown linkType: soft -"rn-unique-identifier-oldarch@workspace:.": +"rn-unique-identifier-oldarch@workspace:., rn-unique-identifier-oldarch@workspace:^": version: 0.0.0-use.local resolution: "rn-unique-identifier-oldarch@workspace:." dependencies: