@react-native-kakao/user 1.3.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,11 +41,11 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
41
41
  scopes: ReadableArray?,
42
42
  promise: Promise,
43
43
  ) = onMain {
44
- val context = currentActivity
45
- if (context == null) {
46
- promise.rejectWith(ActivityNotFoundException())
47
- return@onMain
48
- }
44
+ val context =
45
+ currentActivity ?: run {
46
+ promise.rejectWith(ActivityNotFoundException())
47
+ return@onMain
48
+ }
49
49
  val callback: (OAuthToken?, Throwable?) -> Unit = { token, error ->
50
50
  if (error != null) {
51
51
  promise.rejectWith(error)
@@ -14,10 +14,9 @@ RCT_EXPORT_METHOD(isKakaoTalkLoginAvailable
14
14
  : (RCTPromiseRejectBlock)reject) {
15
15
  [[self manager] isKakaoTalkLoginAvailable:resolve reject:reject];
16
16
  }
17
-
18
17
  RCT_EXPORT_METHOD(login
19
18
  : (NSArray*)serviceTerms prompts
20
- : (NSArray*)prompts useKakaoAccountLoginIos
19
+ : (NSArray*)prompts useKakaoAccountLogin
21
20
  : (BOOL)useKakaoAccountLogin scopes
22
21
  : (NSArray*)scopes resolve
23
22
  : (RCTPromiseResolveBlock)resolve reject
@@ -67,7 +67,7 @@ import RNCKakaoCore
67
67
  .loginWithKakaoTalk(serviceTerms: emptyArrayToNil(serviceTerms), completion: callback)
68
68
  } else {
69
69
  var _prompts: [Prompt] = []
70
- prompts.forEach { p in
70
+ for p in prompts {
71
71
  if p == "Login" { _prompts.append(.Login) }
72
72
  if p == "Cert" { _prompts.append(.Cert) }
73
73
  if p == "Create" { _prompts.append(.Create) }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-native-kakao/user",
3
3
  "description": "React Native Kakao User SDK",
4
- "version": "1.3.0",
4
+ "version": "1.4.1",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
7
7
  "types": "lib/typescript/src/index.d.ts",
@@ -62,7 +62,7 @@
62
62
  "access": "public"
63
63
  },
64
64
  "devDependencies": {
65
- "@react-native-kakao/core": "^1.3.0",
65
+ "@react-native-kakao/core": "^1.4.0",
66
66
  "@types/invariant": "^2",
67
67
  "@types/jest": "^29.5.5",
68
68
  "@types/react": "^18.2.44",
@@ -74,7 +74,7 @@
74
74
  "typescript": "5.1.6"
75
75
  },
76
76
  "peerDependencies": {
77
- "@react-native-kakao/core": "^1.3.0",
77
+ "@react-native-kakao/core": "^1.4.0",
78
78
  "react": "*",
79
79
  "react-native": "*"
80
80
  },
@@ -110,7 +110,7 @@
110
110
  "javaPackageName": "net.mjstudio.rnkakao.user"
111
111
  }
112
112
  },
113
- "gitHead": "04bb32e6fbbcedf020894aee18c056abf1bc8d6f",
113
+ "gitHead": "bc72edecde84fcd58873323b6f0cb1dccf63aeb7",
114
114
  "dependencies": {
115
115
  "@mj-studio/js-util": "^1.0.34"
116
116
  }