diff --git a/CHANGELOG.md b/CHANGELOG.md index 495cee44..d1cfb5e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ +## [1.2.2](https://github.com/JimmyDaddy/react-native-image-marker/compare/v1.2.1...v1.2.2) (2024-01-01) + +### Bug Fixes + +* remove debug fill red color in rect ([7ed675a](https://github.com/JimmyDaddy/react-native-image-marker/commit/7ed675aea5a4a3d4b42e181ec7ea6bd7327f834e)) + ## [1.2.1](https://github.com/JimmyDaddy/react-native-image-marker/compare/v1.2.0...v1.2.1) (2023-12-28) ### Bug Fixes diff --git a/example/Gemfile.lock b/example/Gemfile.lock deleted file mode 100644 index 2335afd1..00000000 --- a/example/Gemfile.lock +++ /dev/null @@ -1,99 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - CFPropertyList (3.0.6) - rexml - activesupport (7.0.8) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 1.6, < 2) - minitest (>= 5.1) - tzinfo (~> 2.0) - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) - algoliasearch (1.27.5) - httpclient (~> 2.8, >= 2.8.3) - json (>= 1.5.1) - atomos (0.1.3) - claide (1.1.0) - cocoapods (1.14.3) - addressable (~> 2.8) - claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.14.3) - cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 2.1, < 3.0) - cocoapods-plugins (>= 1.0.0, < 2.0) - cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.6.0, < 2.0) - cocoapods-try (>= 1.1.0, < 2.0) - colored2 (~> 3.1) - escape (~> 0.0.4) - fourflusher (>= 2.3.0, < 3.0) - gh_inspector (~> 1.0) - molinillo (~> 0.8.0) - nap (~> 1.0) - ruby-macho (>= 2.3.0, < 3.0) - xcodeproj (>= 1.23.0, < 2.0) - cocoapods-core (1.14.3) - activesupport (>= 5.0, < 8) - addressable (~> 2.8) - algoliasearch (~> 1.0) - concurrent-ruby (~> 1.1) - fuzzy_match (~> 2.0.4) - nap (~> 1.0) - netrc (~> 0.11) - public_suffix (~> 4.0) - typhoeus (~> 1.0) - cocoapods-deintegrate (1.0.5) - cocoapods-downloader (2.1) - cocoapods-plugins (1.0.0) - nap - cocoapods-search (1.0.1) - cocoapods-trunk (1.6.0) - nap (>= 0.8, < 2.0) - netrc (~> 0.11) - cocoapods-try (1.2.0) - colored2 (3.1.2) - concurrent-ruby (1.2.2) - escape (0.0.4) - ethon (0.16.0) - ffi (>= 1.15.0) - ffi (1.16.3) - fourflusher (2.3.1) - fuzzy_match (2.0.4) - gh_inspector (1.1.3) - httpclient (2.8.3) - i18n (1.14.1) - concurrent-ruby (~> 1.0) - json (2.7.1) - minitest (5.20.0) - molinillo (0.8.0) - nanaimo (0.3.0) - nap (1.1.0) - netrc (0.11.0) - public_suffix (4.0.7) - rexml (3.2.6) - ruby-macho (2.5.1) - typhoeus (1.4.1) - ethon (>= 0.9.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - xcodeproj (1.23.0) - CFPropertyList (>= 2.3.3, < 4.0) - atomos (~> 0.1.3) - claide (>= 1.0.2, < 2.0) - colored2 (~> 3.1) - nanaimo (~> 0.3.0) - rexml (~> 3.2.4) - -PLATFORMS - ruby - -DEPENDENCIES - activesupport (>= 6.1.7.3, < 7.1.0) - cocoapods (~> 1.13) - -RUBY VERSION - ruby 3.0.0p0 - -BUNDLED WITH - 2.4.14 diff --git a/example/ios/ImageMarkerExample.xcodeproj/project.pbxproj b/example/ios/ImageMarkerExample.xcodeproj/project.pbxproj index 1836cfd1..6a5818eb 100644 --- a/example/ios/ImageMarkerExample.xcodeproj/project.pbxproj +++ b/example/ios/ImageMarkerExample.xcodeproj/project.pbxproj @@ -12,7 +12,6 @@ 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 */; }; - 552FE0025890E32E99AF119A /* libPods-ImageMarkerExample-ImageMarkerExampleUITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 744A2F230C283E0D140F997B /* libPods-ImageMarkerExample-ImageMarkerExampleUITests.a */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; A119E9E12B162437000C0527 /* ImageMarkerExampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A119E9E02B162437000C0527 /* ImageMarkerExampleUITests.swift */; }; A119E9E32B162437000C0527 /* ImageMarkerExampleUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A119E9E22B162437000C0527 /* ImageMarkerExampleUITestsLaunchTests.swift */; }; @@ -38,7 +37,6 @@ 15E0FEF5E88EB5BA856E015A /* Pods-ImageMarkerExample-ImageMarkerExampleUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ImageMarkerExample-ImageMarkerExampleUITests.release.xcconfig"; path = "Target Support Files/Pods-ImageMarkerExample-ImageMarkerExampleUITests/Pods-ImageMarkerExample-ImageMarkerExampleUITests.release.xcconfig"; sourceTree = ""; }; 3B4392A12AC88292D35C810B /* Pods-ImageMarkerExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ImageMarkerExample.debug.xcconfig"; path = "Target Support Files/Pods-ImageMarkerExample/Pods-ImageMarkerExample.debug.xcconfig"; sourceTree = ""; }; 5709B34CF0A7D63546082F79 /* Pods-ImageMarkerExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ImageMarkerExample.release.xcconfig"; path = "Target Support Files/Pods-ImageMarkerExample/Pods-ImageMarkerExample.release.xcconfig"; sourceTree = ""; }; - 5AF9B3B6D62946E1E270EDB8 /* Pods-ImageMarkerExample-ImageMarkerExampleUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ImageMarkerExample-ImageMarkerExampleUITests.debug.xcconfig"; path = "Target Support Files/Pods-ImageMarkerExample-ImageMarkerExampleUITests/Pods-ImageMarkerExample-ImageMarkerExampleUITests.debug.xcconfig"; sourceTree = ""; }; 5DCACB8F33CDC322A6C60F78 /* libPods-ImageMarkerExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ImageMarkerExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 6F2EF2314753552DE3ED8A96 /* libPods-ImageMarkerExample-ImageMarkerExampleUITests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ImageMarkerExample-ImageMarkerExampleUITests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = ImageMarkerExample/LaunchScreen.storyboard; sourceTree = ""; }; @@ -151,7 +149,6 @@ buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ImageMarkerExample" */; buildPhases = ( C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, - FD10A7F022414F080027D42C /* Start Packager */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, @@ -246,23 +243,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 00D2AD9DAE49776B6A95E7C2 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ImageMarkerExample-ImageMarkerExampleUITests/Pods-ImageMarkerExample-ImageMarkerExampleUITests-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ImageMarkerExample-ImageMarkerExampleUITests/Pods-ImageMarkerExample-ImageMarkerExampleUITests-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ImageMarkerExample-ImageMarkerExampleUITests/Pods-ImageMarkerExample-ImageMarkerExampleUITests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -391,25 +371,6 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ImageMarkerExample-ImageMarkerExampleUITests/Pods-ImageMarkerExample-ImageMarkerExampleUITests-resources.sh\"\n"; showEnvVarsInLog = 0; }; - FD10A7F022414F080027D42C /* Start Packager */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = "Start Packager"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index a558fd88..17b76699 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -946,7 +946,7 @@ PODS: - React-debug - react-native-blob-util (0.19.6): - React-Core - - react-native-image-marker (1.1.11): + - react-native-image-marker (1.2.1): - React-Core - react-native-image-picker (5.7.0): - React-Core @@ -1320,7 +1320,7 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - boost: 26fad476bfa736552bbfa698a06cc530475c1505 + boost: 69c3d61aee7f5f7facabe24312f0302003b5af29 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 FBLazyVector: 2296bacb2fa157a43991048b0a9d71c1c8b65083 @@ -1360,7 +1360,7 @@ SPEC CHECKSUMS: React-logger: e0c1e918d9588a9f39c9bc62d9d6bfe9ca238d9d React-Mapbuffer: 9731a0a63ebaf8976014623c4d637744d7353a7c react-native-blob-util: d8fa1a7f726867907a8e43163fdd8b441d4489ea - react-native-image-marker: d58c3e046b75e3302fd4f365cd7c32051badfef2 + react-native-image-marker: c2352e04b9c5322c47154bd54430182889f4ebd3 react-native-image-picker: 3269f75c251cdcd61ab51b911dd30d6fff8c6169 React-nativeconfig: 37aecd26d64b79327c3f10e43b2e9a6c425e0a60 React-NativeModulesApple: 9ca6d2eaa1dd5606588262195b46d0774bdec83a @@ -1385,6 +1385,6 @@ SPEC CHECKSUMS: SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: 4f53dc50008d626fa679c7a1cb4bed898f8c0bde -PODFILE CHECKSUM: 8c3f9c33c24df0951c16c5461728b73f75674df3 +PODFILE CHECKSUM: 2eb44bc264b7eac4758d0059314683cceb10a876 -COCOAPODS: 1.12.1 +COCOAPODS: 1.14.3 diff --git a/example/ios/scripts.sh b/example/ios/scripts.sh new file mode 100755 index 00000000..2a2e9d94 --- /dev/null +++ b/example/ios/scripts.sh @@ -0,0 +1,12 @@ +export RCT_METRO_PORT="${RCT_METRO_PORT:=8081}" +echo "export RCT_METRO_PORT=${RCT_METRO_PORT}" > "${SRCROOT}/../node_modules/react-native/scripts/.packager.env" +if [ -z "${RCT_NO_LAUNCH_PACKAGER+xxx}" ] ; then + if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then + if ! curl -s "http://localhost:${RCT_METRO_PORT}/status" | grep -q "packager-status:running" ; then + echo "Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly" + exit 2 + fi + else + open "$SRCROOT/../node_modules/react-native/scripts/launchPackager.command" || echo "Can't start packager automatically" + fi +fi diff --git a/example/package.json b/example/package.json index a7ced6a0..8f21eae1 100644 --- a/example/package.json +++ b/example/package.json @@ -7,7 +7,8 @@ "ios": "react-native run-ios", "start": "react-native start", "pods": "pod-install", - "m1-pods": "cd ios && arch -x86_64 pod install" + "m1-pods": "cd ios && arch -x86_64 pod install", + "postinstall": "patch-package" }, "dependencies": { "@expo/react-native-action-sheet": "^4.0.1", @@ -23,13 +24,15 @@ "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", - "babel-plugin-module-resolver": "^4.1.0", - "@react-native/typescript-config": "^0.73.1", "@react-native/babel-preset": "^0.73.18", "@react-native/eslint-config": "^0.73.1", "@react-native/metro-config": "^0.73.2", + "@react-native/typescript-config": "^0.73.1", "@types/react": "^18.2.6", + "babel-plugin-module-resolver": "^4.1.0", + "prettier": "2.8.8", "typescript": "5.0.4", - "prettier": "2.8.8" + "patch-package": "^8.0.0", + "postinstall-postinstall": "^2.1.0" } } diff --git a/example/patches/react-native+0.73.1.patch b/example/patches/react-native+0.73.1.patch new file mode 100644 index 00000000..49cc2d36 --- /dev/null +++ b/example/patches/react-native+0.73.1.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/react-native/third-party-podspecs/boost.podspec b/node_modules/react-native/third-party-podspecs/boost.podspec +index 3950fce..7089b21 100644 +--- a/node_modules/react-native/third-party-podspecs/boost.podspec ++++ b/node_modules/react-native/third-party-podspecs/boost.podspec +@@ -10,7 +10,7 @@ Pod::Spec.new do |spec| + spec.homepage = 'http://www.boost.org' + spec.summary = 'Boost provides free peer-reviewed portable C++ source libraries.' + spec.authors = 'Rene Rivera' +- spec.source = { :http => 'https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2', ++ spec.source = { :http => 'https://sourceforge.net/projects/boost/files/boost/1.83.0/boost_1_83_0.tar.bz2', + :sha256 => '6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e' } + + # Pinning to the same version as React.podspec. diff --git a/ios/RCTImageMarker/ImageMarker.swift b/ios/RCTImageMarker/ImageMarker.swift index 6bd600f4..509fd9d0 100644 --- a/ios/RCTImageMarker/ImageMarker.swift +++ b/ios/RCTImageMarker/ImageMarker.swift @@ -343,8 +343,6 @@ public final class ImageMarker: NSObject, RCTBridgeModule { UIGraphicsBeginImageContextWithOptions(CGSize(width: diagonal, height: diagonal), false, 1) let markerContext = UIGraphicsGetCurrentContext() - markerContext?.setFillColor(UIColor.red.cgColor) - markerContext?.fill(rect) markerContext?.saveGState() if watermarkOptions.imageOption.alpha != 1.0 { diff --git a/package.json b/package.json index 5009446c..3a7cd802 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-image-marker", - "version": "1.2.1", + "version": "1.2.2", "description": "Add text or icon watermark to your images", "main": "lib/commonjs/index", "module": "lib/module/index", @@ -76,7 +76,7 @@ "pod-install": "^0.1.0", "prettier": "^2.0.5", "react": "18.2.0", - "react-native": "0.71.11", + "react-native": "0.73.1", "react-native-builder-bob": "^0.20.0", "release-it": "^16.2.0", "typedoc": "^0.24.8", @@ -167,5 +167,9 @@ } ] ] + }, + "dependencies": { + "patch-package": "^8.0.0", + "postinstall-postinstall": "^2.1.0" } }