Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update library (iOS/Android) #415

Merged
merged 3 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ buildscript {
}

dependencies {
implementation 'com.facebook.android:facebook-android-sdk:15.1.0'
implementation 'com.facebook.android:facebook-android-sdk:16.0.0'
}
2 changes: 1 addition & 1 deletion android/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 12.0.0
version: 12.1.0
apiversion: 4
architectures: arm64-v8a armeabi-v7a x86 x86_64
description: facebook
Expand Down
17 changes: 8 additions & 9 deletions android/src/facebook/TiFacebookModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ public class TiFacebookModule extends KrollModule implements OnActivityResultEve
@Kroll.constant
public static final int LOGIN_BEHAVIOR_DEVICE_AUTH = 2;
@Kroll.constant
public static final int LOGIN_BEHAVIOR_WEB = 3;
@Kroll.constant
public static final int LOGIN_BEHAVIOR_NATIVE = 4;
// TODO: Expose DIALOG_ONLY and KATANA_ONLY?

Expand Down Expand Up @@ -466,9 +464,6 @@ public void setLoginBehavior(int behaviorConstant)
case LOGIN_BEHAVIOR_BROWSER:
loginBehavior = LoginBehavior.WEB_ONLY;
break;
case LOGIN_BEHAVIOR_WEB:
loginBehavior = LoginBehavior.WEB_VIEW_ONLY;
break;
case LOGIN_BEHAVIOR_DEVICE_AUTH:
loginBehavior = LoginBehavior.DEVICE_AUTH;
break;
Expand All @@ -491,8 +486,6 @@ public int getLoginBehavior()
switch (loginBehavior) {
case WEB_ONLY:
return LOGIN_BEHAVIOR_BROWSER;
case WEB_VIEW_ONLY:
return LOGIN_BEHAVIOR_WEB;
case DEVICE_AUTH:
return LOGIN_BEHAVIOR_DEVICE_AUTH;
case NATIVE_ONLY:
Expand Down Expand Up @@ -812,8 +805,14 @@ public void onSuccess(Sharer.Result results)
}

if (link != null) {
shareContent =
new ShareLinkContent.Builder().setContentUrl(Uri.parse(link)).setPlaceId(placeId).setRef(ref).build();
ShareLinkContent.Builder builder = new ShareLinkContent.Builder().setContentUrl(Uri.parse(link));
if (placeId != null) {
builder.setPlaceId(placeId);
}
if (ref != null) {
builder.setRef(ref);
}
shareContent = builder.build();
} else {
Log.e(TAG, "The \"link\" property is required when showing a share dialog.");
}
Expand Down
2 changes: 1 addition & 1 deletion ios/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 13.0.0
version: 14.0.0
apiversion: 2
description: Use the native Facebook iOS SDK in Axway Titanium.
author: Mark Mokryn, Ng Chee Kiat and Hans Knoechel
Expand Down
47 changes: 5 additions & 42 deletions ios/platform/FBAEMKit.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,8 @@
<key>AvailableLibraries</key>
<array>
<dict>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>FBAEMKit.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>ios-arm64_x86_64-maccatalyst</string>
<key>LibraryPath</key>
<string>FBAEMKit.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -33,30 +17,23 @@
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
<string>maccatalyst</string>
</dict>
<dict>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-maccatalyst</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>FBAEMKit.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
</dict>
<dict>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>tvos-arm64_x86_64-simulator</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>FBAEMKit.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -65,24 +42,10 @@
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>tvos</string>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>tvos-arm64</string>
<key>LibraryPath</key>
<string>FBAEMKit.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>tvos</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
Expand Down
Binary file modified ios/platform/FBAEMKit.xcframework/ios-arm64/FBAEMKit.framework/FBAEMKit
100755 → 100644
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Generated by Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
#ifndef FBAEMKIT_SWIFT_H
#define FBAEMKIT_SWIFT_H
#pragma clang diagnostic push
Expand All @@ -21,11 +23,20 @@
# include <swift/objc-prologue.h>
#endif

#pragma clang diagnostic ignored "-Wduplicate-method-match"
#pragma clang diagnostic ignored "-Wauto-import"
#if defined(__OBJC__)
#include <Foundation/Foundation.h>
#endif
#if defined(__cplusplus)
#include <cstdint>
#include <cstddef>
#include <cstdbool>
#else
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#endif

#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
Expand Down Expand Up @@ -181,16 +192,40 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if defined(__OBJC__)
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#endif
#if !defined(SWIFT_EXTERN)
# if defined(__cplusplus)
# define SWIFT_EXTERN extern "C"
# else
# define SWIFT_EXTERN extern
# endif
#endif
#if !defined(SWIFT_CALL)
# define SWIFT_CALL __attribute__((swiftcall))
#endif
#if defined(__cplusplus)
#if !defined(SWIFT_NOEXCEPT)
# define SWIFT_NOEXCEPT noexcept
#endif
#else
#if !defined(SWIFT_NOEXCEPT)
# define SWIFT_NOEXCEPT
#endif
#endif
#if defined(__cplusplus)
#if !defined(SWIFT_CXX_INT_DEFINED)
#define SWIFT_CXX_INT_DEFINED
namespace swift {
using Int = ptrdiff_t;
using UInt = size_t;
}
#endif
#endif
#if defined(__OBJC__)
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
Expand All @@ -199,13 +234,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
@import ObjectiveC;
#endif

#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"

#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
Expand All @@ -214,18 +251,23 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# pragma pop_macro("any")
#endif

#if defined(__OBJC__)
@class NSString;

SWIFT_PROTOCOL_NAMED("AEMNetworking")
@protocol FBAEMNetworking
- (void)startGraphRequestWithGraphPath:(NSString * _Nonnull)graphPath parameters:(NSDictionary<NSString *, id> * _Nonnull)parameters tokenString:(NSString * _Nullable)tokenString HTTPMethod:(NSString * _Nullable)method completion:(void (^ _Nonnull)(id _Nullable, NSError * _Nullable))completion;
@end

@protocol FBSKAdNetworkReporting;
@protocol FBSDKDataPersisting;
@class NSURL;
@class NSNumber;

SWIFT_CLASS_NAMED("AEMReporter")
@interface FBAEMReporter : NSObject
+ (void)configureWithNetworker:(id <FBAEMNetworking> _Nullable)networker appID:(NSString * _Nullable)appID reporter:(id <FBSKAdNetworkReporting> _Nullable)reporter;
+ (void)configureWithNetworker:(id <FBAEMNetworking> _Nullable)networker appID:(NSString * _Nullable)appID reporter:(id <FBSKAdNetworkReporting> _Nullable)reporter analyticsAppID:(NSString * _Nullable)analyticsAppID store:(id <FBSDKDataPersisting> _Nullable)store;
/// Enable AEM reporting
/// This function should be called in application(_:open:options:) from ApplicationDelegate
+ (void)enable;
Expand All @@ -241,7 +283,7 @@ SWIFT_CLASS_NAMED("AEMReporter")
+ (void)setAdvertiserRuleMatchInServerEnabled:(BOOL)enabled;
/// Handle deeplink
/// This function should be called in <code>application(_:open:options:) </code>from ApplicationDelegate
+ (void)handle:(NSURL * _Nonnull)url;
+ (void)handle:(NSURL * _Nullable)url;
/// Calculate the conversion value for the app event based on the AEM configuration
/// This function should be called when you log any in-app events
+ (void)recordAndUpdateEvent:(NSString * _Nonnull)event currency:(NSString * _Nullable)currency value:(NSNumber * _Nullable)value parameters:(NSDictionary<NSString *, id> * _Nullable)parameters;
Expand All @@ -256,8 +298,15 @@ SWIFT_PROTOCOL_NAMED("SKAdNetworkReporting")
- (void)checkAndRevokeTimer;
@end

#endif
#if defined(__cplusplus)
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif

#else
#error unsupported Swift architecture
#endif
Binary file not shown.
Loading