Skip to content

Commit 37c8636

Browse files
fixed run issue 1.7.2
1 parent 86e495e commit 37c8636

File tree

15 files changed

+327
-76
lines changed

15 files changed

+327
-76
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-square-reader-sdk",
3-
"version": "1.4.3",
3+
"version": "1.7.2",
44
"description": "A React Native plugin for Square Reader SDK",
55
"homepage": "https://github.com/square/react-native-square-reader-sdk",
66
"repository": {
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AvailableLibraries</key>
6+
<array>
7+
<dict>
8+
<key>LibraryIdentifier</key>
9+
<string>ios-arm64</string>
10+
<key>LibraryPath</key>
11+
<string>SquareReaderSDK.framework</string>
12+
<key>SupportedArchitectures</key>
13+
<array>
14+
<string>arm64</string>
15+
</array>
16+
<key>SupportedPlatform</key>
17+
<string>ios</string>
18+
</dict>
19+
<dict>
20+
<key>LibraryIdentifier</key>
21+
<string>ios-arm64_x86_64-simulator</string>
22+
<key>LibraryPath</key>
23+
<string>SquareReaderSDK.framework</string>
24+
<key>SupportedArchitectures</key>
25+
<array>
26+
<string>arm64</string>
27+
<string>x86_64</string>
28+
</array>
29+
<key>SupportedPlatform</key>
30+
<string>ios</string>
31+
<key>SupportedPlatformVariant</key>
32+
<string>simulator</string>
33+
</dict>
34+
</array>
35+
<key>CFBundlePackageType</key>
36+
<string>XFWK</string>
37+
<key>XCFrameworkFormatVersion</key>
38+
<string>1.0</string>
39+
</dict>
40+
</plist>

reader-sdk-react-native-quickstart/android/app/build.gradle

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616
apply plugin: "com.android.application"
17+
apply plugin: "com.facebook.react"
1718

1819
import com.android.build.OutputFile
1920

@@ -96,7 +97,7 @@ project.ext.react = [
9697
enableHermes: false, // clean and rebuild if changing
9798
]
9899

99-
apply from: "../../node_modules/react-native/react.gradle"
100+
// apply from: "../../node_modules/react-native/react.gradle"
100101

101102
/**
102103
* Set this to true to create two separate APKs instead of one:
@@ -142,9 +143,8 @@ def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitect
142143

143144
android {
144145
ndkVersion rootProject.ext.ndkVersion
146+
namespace 'com.rnreadersdksample'
145147

146-
compileSdkVersion rootProject.ext.compileSdkVersion
147-
148148

149149
defaultConfig {
150150
applicationId "com.rnreadersdksample"
@@ -206,18 +206,23 @@ android {
206206
lint {
207207
baseline = file("lint-baseline.xml")
208208
}
209+
209210
}
210211

211212
dependencies {
212213
implementation fileTree(dir: "libs", include: ["*.jar"])
213214
//noinspection GradleDynamicVersion
214-
implementation "com.facebook.react:react-native:+" // From node_modules
215215
// Old version
216216
implementation ("androidx.appcompat:appcompat:1.3.1") {
217217
version {
218218
strictly '1.3.1'
219219
}
220220
}
221+
// The version of react-native is set by the React Native Gradle Plugin
222+
implementation("com.facebook.react:react-android")
223+
// implementation 'com.reactnative:react-native-square-reader-sdk:1.7.2'
224+
225+
221226
implementation "androidx.multidex:multidex:2.0.1"
222227
implementation "androidx.compose.foundation:foundation:1.2.1"
223228
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"

reader-sdk-react-native-quickstart/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ limitations under the License.
1212
-->
1313
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
1414
xmlns:tools="http://schemas.android.com/tools"
15-
package="com.rnreadersdksample">
15+
>
1616

1717
<uses-permission android:name="android.permission.INTERNET" />
1818
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />

reader-sdk-react-native-quickstart/android/build.gradle

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,19 @@ buildscript {
1717
afterEvaluate {project ->
1818
if (project.hasProperty("android")) {
1919
android {
20-
compileSdkVersion 33
21-
buildToolsVersion "33.0.0"
20+
compileSdkVersion 34
21+
buildToolsVersion "34.0.0"
22+
// if (namespace == null) {
23+
// namespace project.group
24+
// }
2225
}
2326
}
2427
}
2528
}
2629
ext {
2730
buildToolsVersion = "33.0.0"
2831
minSdkVersion = 24
29-
compileSdkVersion = 33
32+
compileSdkVersion = 34
3033
targetSdkVersion = 33
3134
readerSdkVersion = "[1.7.5, 2.0)"
3235
ndkVersion = "21.4.7075529"
@@ -40,25 +43,19 @@ buildscript {
4043
}
4144
}
4245
dependencies {
43-
classpath("com.android.tools.build:gradle:7.2.2")
46+
47+
classpath('com.android.tools.build:gradle:8.5.1')
4448
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21")
49+
classpath("com.facebook.react:react-native-gradle-plugin")
50+
4551
// NOTE: Do not place your application dependencies here; they belong
4652
// in the individual module build.gradle files
4753
}
4854
}
4955

5056
allprojects {
5157
repositories {
52-
exclusiveContent {
53-
filter {
54-
includeGroup "com.facebook.react"
55-
}
56-
forRepository {
57-
maven {
58-
url "$rootDir/../node_modules/react-native/android"
59-
}
60-
}
61-
}
58+
6259
maven {
6360
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
6461
url("$rootDir/../node_modules/react-native/android")
@@ -70,15 +67,8 @@ allprojects {
7067
maven {
7168
url "https://sdk.squareup.com/android"
7269
credentials {
73-
username SQUARE_READER_SDK_APPLICATION_ID
74-
password SQUARE_READER_SDK_REPOSITORY_PASSWORD
75-
}
76-
}
77-
mavenCentral {
78-
// We don't want to fetch react-native from Maven Central as there are
79-
// older versions over there.
80-
content {
81-
excludeGroup "com.facebook.react"
70+
username "sq0idp-ZEe0gjVrSrPSE1YMM4T75A"
71+
password "35mywk6inosfvr4zgudkmssu5tvtuiwnicjvc2vn7xwf7ujtd22q"
8272
}
8373
}
8474
google()
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#Thu Aug 01 16:15:50 IST 2024
12
distributionBase=GRADLE_USER_HOME
23
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

reader-sdk-react-native-quickstart/android/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ limitations under the License.
2525
rootProject.name = 'RNReaderSDKSample'
2626
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
2727
include ':app'
28+
includeBuild('../node_modules/@react-native/gradle-plugin')
29+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: ['module:metro-react-native-babel-preset'],
2+
presets: ['module:@react-native/babel-preset'],
33
};

reader-sdk-react-native-quickstart/ios/File.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1010
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1111
let jsCodeLocation: URL
1212

13-
jsCodeLocation = RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index", fallbackResource:nil)
13+
jsCodeLocation = RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index", fallbackExtension:nil)!
1414
let rootView = RCTRootView(bundleURL: jsCodeLocation, moduleName: "RNReaderSDKSample", initialProperties: nil, launchOptions: launchOptions)
1515
let rootViewController = UIViewController()
1616
rootViewController.view = rootView

reader-sdk-react-native-quickstart/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ target 'RNReaderSDKSample' do
6565
# ...but if you bump iOS deployment target, Flipper barfs again "Time.h:52:17: error: typedef redefinition with different types"
6666
# We need to make one crude patch to RCT-Folly - set `__IPHONE_10_0` to our iOS target + 1
6767
# https://github.com/facebook/flipper/issues/834 - 84 comments and still going...
68-
__apply_Xcode_12_5_M1_post_install_workaround(installer)
68+
# __apply_Xcode_12_5_M1_post_install_workaround(installer)
6969
`sed -i -e $'s/__IPHONE_10_0/__IPHONE_12_0/' Pods/RCT-Folly/folly/portability/Time.h`
7070
end
7171
end

0 commit comments

Comments
 (0)