Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-24009

Hyperloop: iOS - Protocols are not generated properly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Hyperloop 2.0.0
    • Fix Version/s: Hyperloop 2.0.1
    • Component/s: Hyperloop, iOS
    • Labels:
      None
    • Sprint:
      2017 Sprint 02 Tooling

      Description

      I am currently testing the Facebook iOS SDK with Hyperloop and trying to bridge the presentMessengerDialog method to Hyperloop. Here is the JS-call:

      app.js

      var fb = require('facebook');
       
      var win = Ti.UI.createWindow({
        backgroundColor: "#fff"
      });
       
      var btn = Ti.UI.createButton({
        title: "Open Messenger Dialog"
      });
       
      btn.addEventListener("click", function() {
          fb.presentMessengerDialog({
                 title: "Appcelerator Titanium rocks!", // The title of the link
                 description: "Shared from my Titanium application", // The description of the link
                 link: "https://appcelerator.com", // The link you want to share
                 referal: "ti_app", // The referal to be added as a suffix to your link
                 placeID: "my_id", // The ID for a place to tag with this content
                 to: [] // List of IDs for taggable people to tag with this content
             });
      });
       
      win.add(btn);
      win.open();
      

      and the Hyperloop implementation is:

      facebook.js

      var FBSDKShareLinkContent = require("FBSDKShareKit/FBSDKShareLinkContent"),
      	FBSDKMessageDialog = require("FBSDKShareKit/FBSDKMessageDialog"),
      	NSURL = require("Foundation/NSURL");
       
      exports.presentMessengerDialog = function(params) {
         var content = new FBSDKShareLinkContent();
            
         content.setContentURL(NSURL.URLWithString(params["link"]));
         content.setContentDescription(params["description"]);
         content.setContentTitle(params["title"]);
         content.setPlaceID(params["placeID"]);
         content.setRef(params["referal"]);
         content.setPeopleIDs(params["to"]);
         
         FBSDKMessageDialog.showWithContentDelegate(content, null); // TODO: Add delegate
      };
      

      The FBSDKShareLinkContent class is an NSObject and implements the FBSDKSharingContent protocol. The build succeeds, but as soon as we click on the button, the method fails because setContentURL is undefined. A look into the generated metabase confirms that all properties from the FBSDKSharingContent are not generated, the ones from FBSDKShareLinkContent are.

      I am linking the frameworks locally (in /src and appc.js), so it might be something related to locally embedded frameworks only.

        Attachments

          Activity

            People

            • Assignee:
              jvennemann Jan Vennemann
              Reporter:
              hknoechel Hans Knöchel
              Reviewer:
              Hans Knöchel
              Tester:
              Harry Bryant
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-10184
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code