Skip to content

Commit

Permalink
Merge pull request #145 from trinitiwowka/hotfix-logEvent-name
Browse files Browse the repository at this point in the history
fix:replace name to eventName in logEvent definition
  • Loading branch information
rdlabo authored Apr 21, 2024
2 parents a7d62bc + ea5992d commit 0c64cd2
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,12 @@ getProfile<T extends Record<string, unknown>>(options: { fields: readonly string
### logEvent(...)

```typescript
logEvent(options: { name: string; }) => Promise<void>
logEvent(options: { eventName: string; }) => Promise<void>
```

| Param | Type |
| ------------- | ------------------------------ |
| **`options`** | <code>{ name: string; }</code> |
| Param | Type |
| ------------- | ----------------------------------- |
| **`options`** | <code>{ eventName: string; }</code> |

--------------------

Expand Down
8 changes: 8 additions & 0 deletions ios/Plugin.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,19 @@
"${PODS_ROOT}/Target Support Files/Pods-PluginTests/Pods-PluginTests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Capacitor/Capacitor.framework",
"${BUILT_PRODUCTS_DIR}/CapacitorCordova/Cordova.framework",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/FBAEMKit/FBAEMKit.framework/FBAEMKit",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework/FBSDKCoreKit",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/FBSDKCoreKit_Basics/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework/FBSDKLoginKit",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Capacitor.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cordova.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBAEMKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKCoreKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKCoreKit_Basics.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKLoginKit.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down
4 changes: 2 additions & 2 deletions ios/Plugin/Plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ public class FacebookLogin: CAPPlugin {
}

@objc func logEvent(_ call: CAPPluginCall) {
if let name = call.getString("name") {
AppEvents.shared.logEvent(AppEvents.Name(name))
if let eventName = call.getString("eventName") {
AppEvents.shared.logEvent(AppEvents.Name(eventName))
}

call.resolve()
Expand Down
43 changes: 43 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
PODS:
- Capacitor (5.0.0):
- CapacitorCordova
- CapacitorCordova (5.0.0)
- FBAEMKit (16.1.3):
- FBSDKCoreKit_Basics (= 16.1.3)
- FBSDKCoreKit (16.1.3):
- FBAEMKit (= 16.1.3)
- FBSDKCoreKit_Basics (= 16.1.3)
- FBSDKCoreKit_Basics (16.1.3)
- FBSDKLoginKit (16.1.3):
- FBSDKCoreKit (= 16.1.3)

DEPENDENCIES:
- "Capacitor (from `../node_modules/@capacitor/ios`)"
- "CapacitorCordova (from `../node_modules/@capacitor/ios`)"
- FBSDKCoreKit (= 16.1.3)
- FBSDKLoginKit (= 16.1.3)

SPEC REPOS:
trunk:
- FBAEMKit
- FBSDKCoreKit
- FBSDKCoreKit_Basics
- FBSDKLoginKit

EXTERNAL SOURCES:
Capacitor:
:path: "../node_modules/@capacitor/ios"
CapacitorCordova:
:path: "../node_modules/@capacitor/ios"

SPEC CHECKSUMS:
Capacitor: b332cb737d447561e854039fb72195206685dce2
CapacitorCordova: 4ea17670ee562680988a7ce9db68dee5160fe564
FBAEMKit: af2972f39bb0f3f7c45998f435b007833c32ffb2
FBSDKCoreKit: 19e2e18b3be578d7a51fed8fdd8c152bef0b9511
FBSDKCoreKit_Basics: dd9826ce3c9fd9f8cdf8dbbd0ef0a53e6c0c9e7e
FBSDKLoginKit: c395c63a1a6cf4a8a1e6103fd94b8c46329ee81c

PODFILE CHECKSUM: 84bd0ef43d21cc257916d7be16544e4f2fe7d24d

COCOAPODS: 1.12.1
2 changes: 1 addition & 1 deletion src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface FacebookLoginPlugin {
getProfile<T extends Record<string, unknown>>(options: {
fields: readonly string[];
}): Promise<T>;
logEvent(options: { name: string }): Promise<void>;
logEvent(options: { eventName: string }): Promise<void>;
setAutoLogAppEventsEnabled(options: { enabled: boolean }): Promise<void>;
setAdvertiserTrackingEnabled(options: { enabled: boolean }): Promise<void>;
setAdvertiserIDCollectionEnabled(options: {
Expand Down
2 changes: 1 addition & 1 deletion src/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ declare interface Facebook {
params: TParams,
callback: (response: TResponse) => void,
): void;
logEvent(handle: (response: any) => void, options: { name: string }): void;
logEvent(handle: (response: any) => void, options: { eventName: string }): void;
setAutoLogAppEventsEnabled(
handle: (response: any) => void,
options: { enabled: boolean },
Expand Down

0 comments on commit 0c64cd2

Please sign in to comment.