Giter VIP home page Giter VIP logo

tidev / ti.facebook Goto Github PK

View Code? Open in Web Editor NEW
50.0 30.0 70.0 635.13 MB

Support for the native Facebook SDK in Titanium using JavaScript

Home Page: http://docs.appcelerator.com/platform/latest/#!/api/Modules.Facebook

License: Other

JavaScript 1.56% Java 1.86% Objective-C 95.95% C 0.62% Shell 0.01%
facebook-sdk appcelerator ios android native facebook-graph-api facebook-dialogs titanium titanium-module

ti.facebook's Introduction

Titanium Facebook Module Build Status @titanium-sdk/facebook

The Facebook module is used for connecting your application with Facebook. This module supports the following features:

  • Logging in to Facebook and authorizing your application
  • Requesting read and publish permissions
  • Refreshing existing permission
  • Making requests through the Facebook Graph API using the requestWithGraphPath method
  • Posting web and native share dialogs
  • Posting send request dialogs

Getting Started

Note that the min SDK for this module is 5.0.0.GA and later. You do not need to download or unpack it. Edit the modules section of your tiapp.xml file to include this module:

<modules>
    <module platform="android">facebook</module>
    <module platform="iphone">facebook</module>
</modules>

Also you will need a Facebook App ID ready. To create a Facebook App ID, go to the Facebook Developer App: developers.facebook.com/apps

iOS

On the iOS platform, add the following property to the <ios><plist><dict> section in tiapp.xml:

<key>FacebookAppID</key>
<string>1234567890123456</string>
<key>FacebookDisplayName</key>
<string>SomeName</string>
<!-- This one is required since Ti.Facebook iOS 12.0.0 -->
<!-- you can find it under your Facebook App Settings > Advanced > Security > Client Token -->
<key>FacebookClientToken</key>
<string>YOUR_FACEBOOK_CLIENT_TOKEN</string>

where SomeName is exactly as appears in the Facebook developer settings page

Also make sure you have a URL Scheme in tiapp.xml that looks like fb1234567890123456. See Facebook docs for details on this. Add an entry to <ios><plist><dict> that looks like this, modify it for your app:

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLName</key>
        <string>com.appcelerator.kitchensink</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>kitchensink</string>
            <string>fb1234567890123456</string>
        </array>
    </dict>
</array>

To define a url scheme suffix for multiple apps sharing the same facebook app ID, simply add the suffix (in lower case and must start with a letter) to the relevant string under the CFBundleURLSchemes key. In this example, it will look like fb1234567890123456foo if you are adding the suffix foo. This will also require additional configurations in the facebook dashboard, see https://developers.facebook.com/docs/ios/troubleshooting#sharedappid for details.

To enable the use of Facebook dialogs (e.g., Login, Share), you also need to include the following key and values in tiapp.xml to handle the switching in and out of your app:

<key>LSApplicationQueriesSchemes</key>
    <array>
        <string>fbapi</string>
        <string>fb-messenger-api</string>
        <string>fbauth2</string>
        <string>fbshareextension</string>
    </array>

For iOS 9+ and Titanium 5.0.0.GA and above, App Transport Security is disabled by default so you don't need these keys. If you choose to enable it, you have to set the following keys and values in tiapp.xml:

<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSExceptionDomains</key>
            <dict>
                <key>facebook.com</key>
                    <dict>
                        <key>NSIncludesSubdomains</key> 
                        <true/>        
                        <key>NSExceptionRequiresForwardSecrecy</key> 
                        <false/>
                    </dict>
                <key>fbcdn.net</key>
                    <dict>
                        <key>NSIncludesSubdomains</key> 
                        <true/>
                        <key>NSExceptionRequiresForwardSecrecy</key>  
                        <false/>
                    </dict>
                <key>akamaihd.net</key>
                    <dict>
                        <key>NSIncludesSubdomains</key> 
                        <true/>
                        <key>NSExceptionRequiresForwardSecrecy</key> 
                        <false/>
                    </dict>
            </dict>
    </dict>

Android

On the android platform, in tiapp.xml or AndroidManifest.xml you must declare the following inside the <application/> node

<activity android:name="com.facebook.FacebookActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:label="YourAppName" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" />

You must also reference the string containing your Facebook app ID and client token, inside the <application/> node as well:

<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id"/>
<!-- This one is required since Ti.Facebook iOS 12.0.0 -->
<!-- you can find it under your Facebook App Settings > Advanced > Security > Client Token -->
<meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token" />

The app id goes into the the file /platform/android/res/values/strings.xml (classic) or app/platform/android/res/values/strings.xml, where you should define:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- ... -->
    <string name="app_id">1234567890123456</string>
    <string name="facebook_client_token">FACEBOOK_CLIENT_TOKEN</string>
    <!-- ... -->
</resources>

where the number is of course the app ID. The app ID is not set programmatically.

Finally, if using sharing capabilities, you should add the content provider settings as well:

<provider android:name="com.facebook.FacebookContentProvider"
          android:authorities="com.facebook.app.FacebookContentProvider<YOUR_APP_ID>"
          android:exported="true" />

Android Key Hash for Facebook Developer Profile

Facebook requires you to add the Key Hash of the Android app in order for you to use the module. Steps to get the Key Hash as follows. Alternatively, if you do not have the correct Key Hash on the Android App, the App will give an error message when you login with the Key Hash of the App which you can then copy.

Use the following command to generate and receive the key-hashpath of your app. To do do, replace <sdk-version> with your SDK-version and run:

keytool -exportcert -alias tidev -storepass tirocks -keystore ~/Library/Application\ Support/Titanium/mobilesdk/osx/<sdk-version>/android/dev_keystore | openssl sha1 -binary | openssl base64

If you use your own keystore, update the alias, password and name of your keystore file of course.

You would also require, to fill up the Google Play Package Name which is the Application ID and the Class Name which is the Application ID followed by the Application Name concatenated with the word Activity. Example, an App called Kitchensink with Application ID of com.appcelerator.kitchensink will have the Class Name as com.appcelerator.kitchensink.KitchensinkActivity. Alternatively, you can check the Class Name in /build/android/AndroidManifest.xml which is generated when you build the project. The launcher activity is the Class Name of the Application.

For more info, please see https://developers.facebook.com/docs/android/getting-started

Proxy required per Android activity

Unlike iOS, where the entire app is active in memory, in Android only a single Activity is active at any time. In Titanium, an Activity corresponds to a standalone (i.e. not a Tab window) Ti.UI.Window or Ti.UI.TabGroup. The Facebook SDK contains tools to synchronize state between the various activities in the app, and this module implements that functionality, but for this to work we need to tell the module which is the currently active Activity. Thus the following is required:

All Windows/TabGroup in your app must create a proxy, e.g. :

myWindow.fbProxy = fb.createActivityWorker({
    lifecycleContainer: myWindow
});

where fb is the required module. We must pass to the proxy the Ti.UI.Window or Ti.UI.TabGroup that will be using the proxy, so that the proxy can attach itself to the window's or tabgroup's activity. The proxy object must be created prior to calling open() on the window or tabgroup in order to make sure the Activity onCreate event is captured correctly. This proxy has no APIs (new since version 3.20.05), its sole function is to signal the Facebook SDK for the various Activity transitions. So just create it and attach it to the window/tabgroup.

Facebook Login and Authorization

To use Facebook, a user must log in to Facebook and explicitly authorize the application to perform certain actions, such as accessing profile information or posting status messages.

Before calling authorize() it is possible to set the behavior that facebook will try to use when logging users in. The following behaviors are available:

  • LOGIN_BEHAVIOR_BROWSER
  • LOGIN_BEHAVIOR_NATIVE
  • LOGIN_BEHAVIOR_SYSTEM_ACCOUNT (iOS only)
  • LOGIN_BEHAVIOR_WEB (iOS only)
  • LOGIN_BEHAVIOR_NATIVE_WITH_FALLBACK (Android only - NATIVE will attempt to fallback on iOS)
  • LOGIN_BEHAVIOR_DEVICE_AUTH (Android only)

These constants correspond to the ones exposed the by the Facebook SDK on each platform - for more information, see the Facebook documentation.

    var fb = require('facebook');
    fb.initialize();
    fb.setLoginBehavior(fb.LOGIN_BEHAVIOR_NATIVE);
    fb.permissions = ['email'];
    fb.authorize();

There are two ways to initiate the login process:

Create a Facebook LoginButton to allow the user to log in if desired. You can also add either readPermissions or publishPermissions, otherwise the default is request for public_profile. Doing so will let the LoginButton request for permissions when logging in. Note that Facebook does not support setting both parameters at the same time to the LoginButton. For a complete list of permissions, see the official Facebook Permissions Reference.

    var fb = require('facebook');
    fb.initialize();
    var loginButton = fb.createLoginButton({
        readPermissions: ['read_stream','email']
    });

Call authorize to prompt the user to login and authorize the application. This method can be considered if you prefer to use custom UI instead of the loginButton.

    var fb = require('facebook');
    fb.initialize(); 
    fb.permissions = ['email'];
    facebook.authorize();

Which approach you take depends on your UI and how central Facebook is to your application. Both approaches fire a login event.

Requesting read and publish permissions

For a complete list of permissions, see the official Facebook Permissions Reference.

requestNewReadPermissions

var fb = require('facebook');
fb.requestNewReadPermissions(['read_stream','user_hometown', etc...], function(e){
    if(e.success) {
        fb.requestWithGraphPath(...);
    } else if (e.cancelled) {
        ....
    } else {
        Ti.API.debug('Failed authorization due to: ' + e.error);
    }
});

requestNewPublishPermissions

You must use the audience constants from the module, either AUDIENCE_NONE, AUDIENCE_ONLY_ME, AUDIENCE_FRIENDS, or AUDIENCE_EVERYONE. Note that it is not an error for the user to 'Skip' your requested permissions, so you should check the module's permissions property following the call.

var fb = require('facebook');
fb.requestNewPublishPermissions(['read_stream','user_hometown', etc...], fb.AUDIENCE_FRIENDS, function(e) {
    if (e.success) {
        fb.requestWithGraphPath(...);
    } else if (e.cancelled) {
    ....
    } else {
        Ti.API.debug('Failed authorization due to: ' + e.error);
    }
});

Refreshing Permissions

Facebook now grants total control over granted permissions, and if the user modified the permissions outside of your app your cached token may not be updated. To get the current permissions from Facebook's servers you can call fb.refreshPermissionsFromServer(). You may listen for the tokenUpdated event to be notified of this operation's successful completion.

Facebook Graph API

The Facebook Graph API is the preferred method for getting information about a user's friends, news feed, and so on. Each object in the Facebook social graph is represented by a graph API object, such as a user, photo, or status message. The Graph API allows you to make requests on behalf of the user, such as posting a picture or status message. Use the requestWithGraphPath method to make a request to the Graph API.

For details on each of the Graph API objects and the supported operations, see the official Facebook Graph API documentation. Note: fql is no longer supported by Facebook beginning April 2015, so this module does not support fql. This module supports Facebook Graph API v2.2 and above.

Example 1:

    var fb = require('facebook');
    fb.requestWithGraphPath('me/groups', {}, 'GET',  function(e) {
        if (!e.success) {
            if (e.error) {
                alert(e.error);
            } else {
                alert("call was unsuccessful");
            }
            return;
        }
        var result = JSON.parse(e.result).data;
    }

Example 2:

    var fb = require('facebook');
    fb.requestWithGraphPath('me/picture', {'redirect': 'false'}, 'GET',  function(e) {
        if (!e.success) {
            if (e.error) {
                alert(e.error);
            } else {
                alert("call was unsuccessful");
            }
            return;
        }
        var result = JSON.parse(e.result)
    }

Share Dialog

You don't need permissions. You can either use presentShareDialog which requires facebook app to be preinstalled, or presentWebStareDialog that uses the web browser instead. Both approaches fire a shareCompleted event. To share a user's status just call fb.share({}); To share a link call fb.share({url: 'http://example.com' }); To share more information, example:

    var fb = require('facebook');
    fb.presentShareDialog({
        link: 'https://appcelerator.com/',
        title: 'great product',
        description: 'Titanium is a great product',
        picture: 'http://www.appcelerator.com/wp-content/uploads/scale_triangle1.png'
    });

Send Requests Dialog

Sends an application request. Fires a sendRequestCompleted event. You can optionally include a title key with the title string, or customized parameters in the data dictionary. To preselect users to send the invite to, you can optionally add a to key with a string of values containing the facebook ids, seperated by commas. See below for example. See official Facebook Dialogs documentation for more details.

    var fb = require('facebook');
    fb.presentSendRequestDialog({
        message: 'Go to https://appcelerator.com/',
        title: 'Invitation to Appcelerator',
        recipients: ['123456789', '123456788'],
        data: {
            badge_of_awesomeness: '1',
            social_karma: '5'
        }
    });

Deferred App links

Deferred deep linking allows you to send people to a custom view after they installed your app via the app store.

You can simply call fetchDeferredAppLink on startup to open eventually incoming app links.

var fb = require('facebook');
fb.fetchDeferredAppLink(function(e) {
    if (e.success) {
        // Dispatch internal routes
    }
});

Log App Events

fb.logCustomEvent('handsClapped'); // Pass a string for the event name, view the events on Facebook Insights

Log Purchases

fb.logPurchase(13.37, 'USD'); // Pass a number of the amound and a string for the currency.

Notes

  • The FBSDKCoreKit.framework, FBSDKLoginKit.framework, FBSDKShareKit.framework directory is the prebuilt Facebook SDK directly downloaded from Facebook, zero modifications.
  • Facebook is moving away from the native iOS login, and towards login through the Facebook app. The default behavior of this module is the same as in the Facebook SDK: app login with a fallback to webview. The advantages of the app login are: User control over individual permissions, and a uniform login experience over iOS, Android, and web.
  • AppEvents are automatically logged. Check out the app Insights on Facebook. We can also log custom events for Insights.
  • Choose to use the LoginButton, rather than a customized UI, since it's directly from Facebook and it's easier in maintaining Facebook sessions.

Events and error handling

The error handling adheres to the new Facebook guideline for events such as login, shareCompleted and requestSendCompleted. Here is how to handle login events:

    var fb = require('facebook');
    fb.addEventListener('login', function(e) {
        // You *will* get this event if loggedIn == false below
        // Make sure to handle all possible cases of this event
        if (e.success) {
            alert('login from uid: '+e.uid+', name: '+JSON.parse(e.data).name);
            label.text = 'Logged In = ' + fb.loggedIn;
        } else if (e.cancelled) {
            // user cancelled 
            alert('cancelled');
        } else {
            alert(e.error);         
        }
    });
    fb.addEventListener('logout', function(e) {
        alert('logged out');
        label.text = 'Logged In = ' + fb.loggedIn;
    });

Credits

Big shout-out to @mokesmokes for the initial version of this module, great work! ๐Ÿš€

Contributors

ti.facebook's People

Contributors

andreavitale avatar angelkpetkov avatar annakozy2011 avatar ashcoding avatar boarnoah avatar caspahouzer avatar cb1kenobi avatar cheekiatng avatar danghy avatar dependabot-preview[bot] avatar dependabot[bot] avatar ewanharris avatar fokkezb avatar garymathews avatar gitter-badger avatar hansemannn avatar hieupham007 avatar ingo avatar janvennemann avatar jawa9000 avatar jmannau avatar jquick-axway avatar m1ga avatar pec1985 avatar protossoario avatar sajoha avatar satinder-singh-bamrah avatar sgtcoolguy avatar trey-jones avatar vijaysingh-axway avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ti.facebook's Issues

Crash - Facebook - Android - 11.1.0

Hello..Good afternoon / evening / morning.

It was gotten the following issue: The app is crashing when it is using the latest version of the module (11.1.0)
Working all good with the previous version (11.02)

Specs:
<module platform="android" version="11.1.0">facebook</module>
Node: v14.17.0
Ti SDK: 10.1.1.GA
Device: Huawei P20 Pro
Android Version: 10

It seems that it is something related about: libfacebook.so

2022-04-04 14:45:03.437 11839-11839/? I/.clmbty: Late-enabling -Xcheck:jni 2022-04-04 14:45:03.482 11839-11839/? E/.clmbty: Unknown bits set in runtime_flags: 0x8000 2022-04-04 14:45:03.484 11839-11839/? I/.clmbty: Reinit property: dalvik.vm.checkjni= false 2022-04-04 14:45:03.503 11839-11839/? W/re-initialized>: type=1400 audit(0.0:1286004): avc: denied { read } for pid=11839 name="u:object_r:mmi_prop:s0" dev="tmpfs" ino=12085 scontext=u:r:untrusted_app:s0:c54,c256,c512,c768 tcontext=u:object_r:mmi_prop:s0 tclass=file permissive=0 2022-04-04 14:45:03.507 11839-11839/? E/libc: Access denied finding property "runtime.mmitest.isrunning" 2022-04-04 14:45:03.511 11839-11839/? D/ActivityThread: Attach thread to application 2022-04-04 14:45:04.027 11839-11839/com.c.clmbty I/.clmbty: QarthPatchMonintor::Init 2022-04-04 14:45:04.027 11839-11839/com.c.clmbty I/.clmbty: QarthPatchMonintor::StartWatch 2022-04-04 14:45:04.028 11839-11839/com.c.clmbty I/.clmbty: QarthPatchMonintor::WatchPackage: /data/hotpatch/fwkhotpatch/ 2022-04-04 14:45:04.028 11839-11839/com.c.clmbty I/.clmbty: QarthPatchMonintor::CheckAndWatchPatch: /data/hotpatch/fwkhotpatch/com.c.clmbty 2022-04-04 14:45:04.028 11839-11839/com.c.clmbty I/.clmbty: QarthPatchMonintor::CheckAndWatchPatch: /data/hotpatch/fwkhotpatch/all 2022-04-04 14:45:04.028 11839-11839/com.c.clmbty I/.clmbty: QarthPatchMonintor::Run 2022-04-04 14:45:04.028 11839-11858/com.c.clmbty I/HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=com.c.clmbty#10054#256 2022-04-04 14:45:04.029 11839-11873/com.c.clmbty I/.clmbty: QarthPatchMonintor::Reading 2022-04-04 14:45:04.029 11839-11873/com.c.clmbty I/.clmbty: QarthPatchMonintor::CheckNotifyEvent 2022-04-04 14:45:04.029 11839-11873/com.c.clmbty I/.clmbty: QarthPatchMonintor::CheckNotifyEvent before read 2022-04-04 14:45:04.030 11839-11858/com.c.clmbty I/HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=com.c.clmbty#10054#0 2022-04-04 14:45:04.045 11839-11839/com.c.clmbty I/TiApplication: (main) [0,0] checkpoint, app created. 2022-04-04 14:45:04.072 11839-11858/com.c.clmbty I/AwareBitmapCacher: init processName:com.c.clmbty pid=11839 uid=10054 2022-04-04 14:45:04.075 11839-11875/com.c.clmbty E/AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@3264b9 2022-04-04 14:45:04.076 11839-11875/com.c.clmbty E/AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@3b70fe 2022-04-04 14:45:04.152 11839-11839/com.c.clmbty W/com.facebook.UserSettingsManager: The value for AdvertiserIDCollectionEnabled is currently set to FALSE so you're sending app events without collecting Advertiser ID. This can affect the quality of your advertising and analytics results. 2022-04-04 14:45:04.166 11839-11880/com.c.clmbty D/HwFrameworkSecurityPartsFactory: HwFrameworkSecurityPartsFactory in. 2022-04-04 14:45:04.166 11839-11880/com.c.clmbty I/HwFrameworkSecurityPartsFactory: add HwFrameworkSecurityPartsFactory to memory. 2022-04-04 14:45:04.542 11839-11839/com.c.clmbty D/AndroidRuntime: Shutting down VM 2022-04-04 14:45:04.542 11839-11839/com.c.clmbty I/QarthLog: [PatchStore] createDisableExceptionQarthFile 2022-04-04 14:45:04.543 11839-11839/com.c.clmbty I/QarthLog: [PatchStore] create disable file for com.c.clmbty uid is 10054 2022-04-04 14:45:04.547 11839-11839/com.c.clmbty E/AndroidRuntime: FATAL EXCEPTION: main Process: com.c.clmbty, PID: 11839 java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN2v88internal20CanHaveInternalFieldEi" referenced by "/data/app/com.c.clmbty-HiUQUuZJcCedLuhgKYsMUg==/base.apk!/lib/arm64-v8a/libfacebook.so"... at java.lang.Runtime.loadLibrary0(Runtime.java:1071) at java.lang.Runtime.loadLibrary0(Runtime.java:1007) at java.lang.System.loadLibrary(System.java:1668) at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:135) at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:109) at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:217) at org.appcelerator.kroll.KrollRuntime.init(KrollRuntime.java:112) at com.c.clmbty.MyCountyApplication.onCreate(MyCountyApplication.java:85) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1195) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7202) at android.app.ActivityThread.access$2200(ActivityThread.java:296) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2208) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:213) at android.app.ActivityThread.main(ActivityThread.java:8178) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101) 2022-04-04 14:45:04.550 11839-11839/com.c.clmbty I/.clmbty: System.exit called, status: 0 2022-04-04 14:45:04.550 11839-11839/com.c.clmbty I/AndroidRuntime: VM exiting with result code 0, cleanup skipped.

Thanks, and best,
Antonio Duran.

Build Failure Using Module

First of all thanks for keeping this project going!

My issue: when I include the latest module build (v13), I get a build failure with the following message:

Environment:
Operating System Name=macOS Version=12.4 Architecture=64bit CPUs=8 Memory=8589934592 Node.js Version=16.16.0 npm Version=9.6.2 CLI TitaniumCLI Version=6.1.1 SDK Titanium SDK Version=10.1.1.GA SDK Path= /Users/unomahaus/Library/Application Support/Titanium/mobilesdk/osx/10.1.1.GA Target Platform= iphone

Error message:
ERROR] 2023-03-16 13:05:40.934 xcodebuild[86018:17876254] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore [ERROR] 2023-03-16 13:05:40.934 xcodebuild[86018:17876254] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore [ERROR] ** BUILD FAILED ** [ERROR] The following build commands failed: [ERROR] Ld /Users/unomahaus/Documents/Appcelerator_Studio_Workspace/Toolgetherness/build/iphone/build/Intermediates/Toolgetherness.build/Debug-iphonesimulator/Toolgetherness.build/Objects-normal/arm64/Binary/Toolgetherness normal arm64 (in target 'Toolgetherness' from project 'Toolgetherness') [ERROR] (1 failure)

When I remove the inclusion of the module from the tiapp.xml file and all code references, the compilation is successful. I'm assuming this has to do with 64-bit compatibility and the error message is not very helpful.

Any help on this issue would be appreciated!

Issue - Facebook - iOS - 12.0.0

Hello..Good afternoon..

It was gotten the following issue: The Facebook Module (12.0.0) does not allow to compile in a full way the app.
Working all good with the previous version (11.0.1) Facebook Module

Specs:
facebook
Node: v14.17.0
Ti SDK: 10.1.1.GA
Simulator: iPhone 13 Pro Max
iOS Version: 15

It seems that it is something related about:

[TRACE] Undefined symbols for architecture x86_64:
[TRACE]   "__swift_FORCE_LOAD_$_swiftCompatibilityConcurrency", referenced from:
[TRACE]       __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBSDKCoreKit in FBSDKCoreKit(FBSDKTransformerGraphRequestFactory.o)
[TRACE]       __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBSDKCoreKit in FBSDKCoreKit(FBSDKAppEventsCAPIManager.o)
[TRACE]       __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBSDKCoreKit in FBSDKCoreKit(AccessToken.o)
[TRACE]       __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBSDKCoreKit in FBSDKCoreKit(FBSDKAppEventConversionsAPITransformer.o)
[TRACE]       __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBSDKCoreKit in FBSDKCoreKit(Permission.o)
[TRACE]       __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBAEMKit in FBAEMKit(AEMSettings.o)
[TRACE]       __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBAEMKit in FBAEMKit(AEMEvent.o)
[TRACE]       ...
[TRACE]      (maybe you meant: __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBSDKShareKit, __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBSDKLoginKit , __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBAEMKit , __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBSDKCoreKit )
[TRACE] ld: symbol(s) not found for architecture x86_64
[TRACE] clang: error: linker command failed with exit code 1 (use -v to see invocation)

More about the log:

[TRACE] Ld /Users/tony/com.c.clmbty/build/iphone/build/Products/Debug-iphonesimulator/My\ Cy.app/My\ Cy normal (in target 'My Cy' from project 'My Cy')
[TRACE]     cd /Users/tony/com.c.clmbty/build/iphone
[TRACE]     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -target x86_64-apple-ios12.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk -L/Users/tony/com.c.clmbty/build/iphone/build/Products/Debug-iphonesimulator -L/Users/tony/com.c.clmbty/build/iphone/lib -F/Users/tony/com.c.clmbty/build/iphone/build/Products/Debug-iphonesimulator -FFrameworks -filelist /Users/tony/com.c.clmbty/build/iphone/build/Intermediates/My\ Cy.build/Debug-iphonesimulator/My\ Cy.build/Objects-normal/x86_64/My\ Cy.LinkFileList -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/tony/com.c.clmbty/build/iphone/build/Intermediates/My\ Cy.build/Debug-iphonesimulator/My\ Cy.build/Objects-normal/x86_64/My\ Cy_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -stdlib\=libc++ -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/tony/com.c.clmbty/build/iphone/build/Intermediates/My\ Cy.build/Debug-iphonesimulator/My\ Cy.build/Objects-normal/x86_64/My_County.swiftmodule -ObjC -weak_framework JavaScriptCore -framework QuartzCore -framework QuartzCore -weak_framework MapKit -weak_framework MapKit -framework Social -framework FBSDKCoreKit -framework FBSDKCoreKit_Basics -framework FBAEMKit -framework FBSDKLoginKit -framework FBSDKShareKit -framework Accelerate -framework Social -framework FBSDKCoreKit -framework FBSDKCoreKit_Basics -framework FBAEMKit -framework FBSDKLoginKit -framework FBSDKShareKit -framework Accelerate -framework StoreKit -framework StoreKit -framework AdSupport -framework Security -framework StoreKit -framework SystemConfiguration -framework AdSupport -framework Security -framework StoreKit -framework SystemConfiguration -weak_framework AuthenticationServices -weak_framework AuthenticationServices -lxml2 -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/tony/com.c.clmbty/build/iphone/build/Intermediates/My\ Cy.build/Debug-iphonesimulator/My\ Cy.build/My\ Cy.app-Simulated.xcent -framework CoreServices -framework Contacts -framework ContactsUI -framework CoreMedia -weak_framework CoreMotion -weak_framework CoreText -framework EventKit -framework EventKitUI -weak_framework Security -framework Foundation -weak_framework UIKit -framework CoreGraphics -framework CFNetwork -framework CoreLocation -weak_framework MapKit -framework MessageUI -framework QuartzCore -framework SystemConfiguration -framework AudioToolbox -weak_framework MediaPlayer -framework AVFoundation -framework TitaniumKit -ltiverify -ldk.napp.drawer -lfacebook -framework FBAEMKit -framework FBSDKCoreKit -framework FBSDKCoreKit_Basics -framework FBSDKLoginKit -framework FBSDKShareKit -lfirebase.analytics -lfirebase.core -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseInstallations -framework FirebaseInstanceID -framework GoogleAppMeasurement -framework GoogleDataTransport -framework GoogleUtilities -lhyperloop -framework nanopb -framework PromisesObjC -framework Protobuf -lti.imagefactory -lti.map -framework TiApplesignin -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/tony/com.c.clmbty/build/iphone/build/Intermediates/My\ Cy.build/Debug-iphonesimulator/My\ Cy.build/Objects-normal/x86_64/My\ Cy_dependency_info.dat -o /Users/tony/com.c.clmbty/build/iphone/build/Products/Debug-iphonesimulator/My\ Cy.app/My\ Cy
[TRACE] ld: warning: directory not found for option '-L/Users/tony/com.c.clmbty/build/iphone/lib'
[TRACE] ld: warning: object file (/Users/tony/com.c.clmbty/build/iphone/build/Products/Debug-iphonesimulator/libdk.napp.drawer.a(DkNappDrawerModule.o)) was built for newer iOS Simulator version (12.1) than being linked (12.0)
[TRACE] ld: warning: object file (/Users/tony/com.c.clmbty/build/iphone/build/Products/Debug-iphonesimulator/libdk.napp.drawer.a(DkNappDrawerDrawerProxy.o)) was built for newer iOS Simulator version (12.1) than being linked (12.0)
[TRACE] ld: warning: object file (/Users/tony/com.c.clmbty/build/iphone/build/Products/Debug-iphonesimulator/libdk.napp.drawer.a(CustomMMDrawerController.o)) was built for newer iOS Simulator version (12.1) than being linked (12.0)
[TRACE] ld: warning: object file (/Users/tony/com.c.clmbty/build/iphone/build/Products/Debug-iphonesimulator/libdk.napp.drawer.a(NappDrawerVisualState.o)) was built for newer iOS Simulator version (12.1) than being linked (12.0)
[TRACE] ld: warning: object file (/Users/tony/com.c.clmbty/build/iphone/build/Products/Debug-iphonesimulator/libdk.napp.drawer.a(MMDrawerVisualState.o)) was built for newer iOS Simulator version (12.1) than being linked (12.0)
[TRACE] ld: warning: object file (/Users/tony/com.c.clmbty/build/iphone/build/Products/Debug-iphonesimulator/libdk.napp.drawer.a(MMDrawerController.o)) was built for newer iOS Simulator version (12.1) than being linked (12.0)
[TRACE] ld: warning: object file (/Users/tony/com.c.clmbty/build/iphone/build/Products/Debug-iphonesimulator/libdk.napp.drawer.a(DkNappDrawerDrawer.o)) was built for newer iOS Simulator version (12.1) than being linked (12.0)
[TRACE] ld: warning: object file (/Users/tony/com.c.clmbty/build/iphone/build/Products/Debug-iphonesimulator/libdk.napp.drawer.a(DkNappDrawerModuleAssets.o)) was built for newer iOS Simulator version (12.1) than being linked (12.0)
[TRACE] ld: warning: object file (/Users/tony/com.c.clmbty/build/iphone/build/Products/Debug-iphonesimulator/libdk.napp.drawer.a(MMDrawerBarButtonItem.o)) was built for newer iOS Simulator version (12.1) than being linked (12.0)
[TRACE] ld: warning: object file (/Users/tony/com.c.clmbty/build/iphone/build/Products/Debug-iphonesimulator/libdk.napp.drawer.a(UIViewController+MMDrawerController.o)) was built for newer iOS Simulator version (12.1) than being linked (12.0)
[TRACE] ld: warning: Could not find or use auto-linked library 'swiftCompatibilityConcurrency'
[TRACE] Undefined symbols for architecture x86_64:
[TRACE]   "__swift_FORCE_LOAD_$_swiftCompatibilityConcurrency", referenced from:
[TRACE]       __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBSDKCoreKit in FBSDKCoreKit(FBSDKTransformerGraphRequestFactory.o)
[TRACE]       __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBSDKCoreKit in FBSDKCoreKit(FBSDKAppEventsCAPIManager.o)
[TRACE]       __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBSDKCoreKit in FBSDKCoreKit(AccessToken.o)
[TRACE]       __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBSDKCoreKit in FBSDKCoreKit(FBSDKAppEventConversionsAPITransformer.o)
[TRACE]       __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBSDKCoreKit in FBSDKCoreKit(Permission.o)
[TRACE]       __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBAEMKit in FBAEMKit(AEMSettings.o)
[TRACE]       __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBAEMKit in FBAEMKit(AEMEvent.o)
[TRACE]       ...
[TRACE]      (maybe you meant: __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBSDKShareKit, __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBSDKLoginKit , __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBAEMKit , __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FBSDKCoreKit )
[TRACE] ld: symbol(s) not found for architecture x86_64
[TRACE] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[ERROR] ** BUILD FAILED **
[ERROR] The following build commands failed:
[ERROR]         Ld /Users/tony/com.c.clmbty/build/iphone/build/Products/Debug-iphonesimulator/My\ Cy.app/My\ Cy normal (in target 'My Cy' from project 'My Cy')
[ERROR] (1 failure)

Thanks, and best,
Antonio Duran...

Facebook v12.1.0 issue

Facebook v12.1.0 doesn't share the link string in Facebook App or the "link" doesn't get carried over to the FB app.

Tested it on Ti SDK: 10.1.1.GA
Facebook: v12.1.0

Please help.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.