Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24186] Hyperloop: iOS - Allow Obj-C categories in generated metabase

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2017-03-03T14:55:59.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsHyperloop, iOS
Labelslook1
ReporterFrancisco Ruaro Varisco
AssigneeEric Merriman
Created2016-11-02T07:53:49.000+0000
Updated2017-03-31T22:49:08.000+0000

Description

I'm trying to use the Dropbox Official cocoa pod with Hyperloop and found an issue while trying to require an specific file with a special character "+". The official Dropbox documentation tells us to require only one file:
#import <ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h>
I know I can't require only this single file with Hyperloop (Which make the things harder for developers) and I have to require every single file I'm willing to use, so I've created the following requires:
var DropboxClient = require('ObjectiveDropboxOfficial/DropboxClient');
var DropboxClientsManager = require('ObjectiveDropboxOfficial/DropboxClientsManager');
var DropboxTeamClient = require('ObjectiveDropboxOfficial/DropboxTeamClient');
var ObjectiveDropboxOfficial = require('ObjectiveDropboxOfficial/ObjectiveDropboxOfficial');
var MobileAuth = require('ObjectiveDropboxOfficial/DropboxClientsManager+MobileAuth');
All of them work fine apart from the last one "/DropboxClientsManager+MobileAuth". All of them are specified as a "public header". I do think the issue might be the special character when Hyperloop created the wrappers. This is my podfile:
install! 'cocoapods',
         :integrate_targets => false

platform :ios, '8.0'
target 'tidropbox' do
    pod 'ObjectiveDropboxOfficial'
end

Comments

  1. Hans Knöchel 2016-11-02

    The "special character" indicates a category that should not be required directly. Instead, the metabase should add the functionality to the related class. So in your case, you would only need to require var DropboxClientsManager = require('ObjectiveDropboxOfficial/DropboxClientsManager'); and the related category methods should be available. If not, it's a new feature request to support categories in metabases.
  2. Francisco Ruaro Varisco 2016-11-02

    @hans I've just tried your and it didn't work. I believe the categories are not being generated in the metabase. My code to test:
       var DropboxClientsManager = require('ObjectiveDropboxOfficial/DropboxClientsManager');
       
       function doClick(e) {
           var test = DropboxClientsManager.setupWithAppKey('hs7wlr0a1d1chiy');
       }
       
       $.index.open();
       
       
    It did create the wrapper, but without the functions of its category.
       [ERROR] message = "undefined is not a function (evaluating 'DropboxClientsManager.setupWithAppKey(\"hs7wlr0a1d1chiy\")')";
       
    Hope it helps.
  3. Matthew Delmarter 2016-11-09

    Hoping this is given priority as the issue is blocking the development of a very important module...
  4. Francisco Ruaro Varisco 2016-11-14

    Nothing yet???
  5. Hans Knöchel 2016-11-14

    [~xicovarisco_orange] This ticket was created less than 2 weeks ago. We will look into it after the 6.0.0.GA release.
  6. Matthew Delmarter 2016-12-21

    Can this be included in 6.1.0 please? Similar to TIMOB-23853 (which has already been prioritised) this issue is blocking using HyperLoop with a key framework (in this case Dropbox), which is one of the main reasons I upgraded to the Pro subscription several weeks ago :/
  7. Hans Knöchel 2017-03-03

    This will be part of Hyperloop 2.0.1 already. The release is a bit behind schedule, since we took in more fixed then planned. Anyway, the Dropbox SDK causes a different issue, since they use generic types (e.g. NSArray<T>) which we are currently looking into. To speed-up the whole process, that one will rather be in 2.0.2. I hope that insight will help, thx! *EDIT*: For the specific Dropbox generics ticket, please follow-up in TIMOB-24450.
  8. Lee Morris 2017-03-31

    Closing ticket as duplicate, the relevant ticket is linked above.

JSON Source