Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2203] Facebook: Module should inject tiapp.xml requirements for user

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 5.2.0
Fix Version/sn/a
ComponentsFacebook
Labelsn/a
ReporterFokke Zandbergen
AssigneeUnknown
Created2016-03-02T10:17:19.000+0000
Updated2018-03-06T18:52:39.000+0000

Description

To use the Facebook module the user has to add a whole set of properties to tiapp.xml: http://docs.appcelerator.com/platform/latest/#!/api/Modules.Facebook However, except for maybe those that depend on the linked Facebook app (ID, name) all of this should be injected by the module itself using the timodule.xml.

Comments

  1. Hans Knöchel 2016-03-02

    {quote} Right now, the timodule.xml is only used in Android, and it supports all of the tags listed in the Android section above. Any custom metadata your Android module defines in it's timodule.xml section will automatically be merged with a Titanium application that installs your module. {quote} http://docs.appcelerator.com/platform/latest/#!/guide/tiapp.xml_and_timodule.xml_Reference-section-29004921_tiapp.xmlandtimodule.xmlReference-timodule.xml That's why it's currently not implemented.
  2. Fokke Zandbergen 2016-03-02

    So for Android we could still do this right?
  3. Hans Knöchel 2016-03-02

    Yes, but there are no android-specific manifest settings required by ti.facebook as far as I know.
  4. Fokke Zandbergen 2016-03-02

    We do at http://docs.appcelerator.com/platform/latest/#!/api/Modules.Facebook :
       <ti:app>
           <android xmlns:android="http://schemas.android.com/apk/res/android">
               <manifest>
                   <application>
                       <activity android:label="@string/app_name"
                           android:name="com.facebook.LoginActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
                       <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
                   </application>
               </manifest>
           </android>
       <ti:app>
       
  5. Hans Knöchel 2016-03-02

    But those are user-specific values that we cannot pre-fill. :-) Tell me that exactly can be added and I'll add it. Simple as that.
  6. Fokke Zandbergen 2016-03-02

    They are not user-specific. The only user-specific thing is the value of @string/facebook_app_id which you set via strings.xml. See the linked doc.
  7. Hans Knöchel 2016-03-09

    PR: https://github.com/appcelerator-modules/ti.facebook/pull/44 We need to ensure the values get merged with the values set in the tiapp.xml correctly.
  8. Fokke Zandbergen 2016-03-09

    Well, there's one way to find out ;)
  9. Chris Barber 2016-03-09

    As stated on Flowdock, the timodule.xml and tiapp.xml are not merged and nor will they ever be. Only in the Android builds will the timodule.xml's <application><android><manifest> be scrubbed and merged with the final AndroidManifest.xml. I'm not sold that setting the @string/facebook_app_id via strings.xml is a good idea. First it's Android only. Second we should have all settings in one place, namely the tiapp.xml. Since this is a module, it must not modify the Titanium app. The module's documentation should be clear as to what settings the user must add to the tiapp.xml.
  10. Fokke Zandbergen 2016-03-10

    [~cbarber] we actually do the same with modules like [ti.map](https://github.com/appcelerator-modules/ti.map/blob/master/android/timodule.xml) and it's much more user friendly (and less likely to give errors) then letting the user add those. I agree it shouldn't use string though. Just like the linked ti.map it should refer to a tiapp property.
  11. Fokke Zandbergen 2016-03-10

    Plus.. iOS modules should be able to do the same: TIMOB-20542
  12. Hans Knöchel 2016-04-17

    Removing from review, since it's currently not technically possible to inject it properly.

JSON Source