@react-native-kakao/share 0.4.0 → 0.5.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.
@@ -48,6 +48,8 @@ Pod::Spec.new do |s|
48
48
  sdk_version = $KakaoShareSDKVersion
49
49
  end
50
50
 
51
+ s.dependency 'RNCKakaoCore'
52
+
51
53
  # Kakao dependencies
52
54
  s.dependency 'KakaoSDKShare', sdk_version
53
55
  end
@@ -2,10 +2,6 @@ package net.mjstudio.rnkakao.share
2
2
 
3
3
  import com.facebook.react.bridge.ReactApplicationContext
4
4
  import com.facebook.react.bridge.ReactContextBaseJavaModule
5
- import com.facebook.react.bridge.Promise
6
5
 
7
6
  abstract class KakaoShareSpec internal constructor(context: ReactApplicationContext) :
8
- ReactContextBaseJavaModule(context) {
9
-
10
- abstract fun multiply(a: Double, b: Double, promise: Promise)
11
- }
7
+ ReactContextBaseJavaModule(context)
@@ -5,37 +5,37 @@ import KakaoSDKShare
5
5
  @objc public static let shared = RNCKakaoShareManager()
6
6
 
7
7
  @objc public func go() {
8
- // 카카오톡 설치여부 확인
9
- if ShareApi.isKakaoTalkSharingAvailable() {
10
- // 카카오톡으로 카카오톡 공유 가능
11
- ShareApi.shared.shareCustom(
12
- templateId: templateId,
13
- templateArgs: ["title": "제목입니다.", "description": "설명입니다."]
14
- ) { sharingResult, error in
15
- if let error {
16
- print(error)
17
- } else {
18
- print("shareCustom() success.")
19
- if let sharingResult {
20
- UIApplication.shared.open(sharingResult.url, options: [:], completionHandler: nil)
21
- }
22
- }
23
- }
24
- } else {
25
- // 카카오톡 미설치: 웹 공유 사용 권장
26
- // Custom WebView 또는 디폴트 브라우져 사용 가능
27
- // 웹 공유 예시 코드
28
- if let url = ShareApi.shared.makeCustomUrl(
29
- templateId: templateId,
30
- templateArgs: ["title": "제목입니다.", "description": "설명입니다."]
31
- ) {
32
- safariViewController = SFSafariViewController(url: url)
33
- safariViewController?.modalTransitionStyle = .crossDissolve
34
- safariViewController?.modalPresentationStyle = .overCurrentContext
35
- present(safariViewController!, animated: true) {
36
- print("웹 present success")
37
- }
38
- }
39
- }
8
+ // // 카카오톡 설치여부 확인
9
+ // if ShareApi.isKakaoTalkSharingAvailable() {
10
+ // // 카카오톡으로 카카오톡 공유 가능
11
+ // ShareApi.shared.shareCustom(
12
+ // templateId: templateId,
13
+ // templateArgs: ["title": "제목입니다.", "description": "설명입니다."]
14
+ // ) { sharingResult, error in
15
+ // if let error {
16
+ // print(error)
17
+ // } else {
18
+ // print("shareCustom() success.")
19
+ // if let sharingResult {
20
+ // UIApplication.shared.open(sharingResult.url, options: [:], completionHandler: nil)
21
+ // }
22
+ // }
23
+ // }
24
+ // } else {
25
+ // // 카카오톡 미설치: 웹 공유 사용 권장
26
+ // // Custom WebView 또는 디폴트 브라우져 사용 가능
27
+ // // 웹 공유 예시 코드
28
+ // if let url = ShareApi.shared.makeCustomUrl(
29
+ // templateId: templateId,
30
+ // templateArgs: ["title": "제목입니다.", "description": "설명입니다."]
31
+ // ) {
32
+ // safariViewController = SFSafariViewController(url: url)
33
+ // safariViewController?.modalTransitionStyle = .crossDissolve
34
+ // safariViewController?.modalPresentationStyle = .overCurrentContext
35
+ // present(safariViewController!, animated: true) {
36
+ // print("웹 present success")
37
+ // }
38
+ // }
39
+ // }
40
40
  }
41
41
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-native-kakao/share",
3
3
  "description": "React Native Kakao Share SDK",
4
- "version": "0.4.0",
4
+ "version": "0.5.1",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
7
7
  "types": "lib/typescript/src/index.d.ts",
@@ -103,5 +103,5 @@
103
103
  "javaPackageName": "net.mjstudio.rnkakao.share"
104
104
  }
105
105
  },
106
- "gitHead": "fd38451fc878185b6e1809a518dbfe185efce549"
106
+ "gitHead": "fdde4feb0d2c64dda2c30077a3e3e68fdab739c7"
107
107
  }
package/ios/Utils.swift DELETED
@@ -1,22 +0,0 @@
1
- //
2
- // Utils.swift
3
- // RNCKakaoCore
4
- //
5
- // Created by mj on 4/20/24.
6
- //
7
-
8
- import Foundation
9
-
10
- func debugE(_ msg : Any...){
11
- #if DEBUG
12
- if msg.count == 0{
13
- print("🧩",msg,"🧩")
14
- }else{
15
- var msgs = ""
16
- for i in msg{
17
- msgs += "\(i) "
18
- }
19
- print("🧩",msgs,"🧩")
20
- }
21
- #endif
22
- }