Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28062] iOS: Titanium not compatible with new Facebook SDK versions due to missing Swift files

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2020-08-17T18:51:42.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.2.0
ComponentsiOS
Labelsswift, switf-compatible
ReporterHans Knöchel
AssigneeVijay Singh
Created2020-08-02T12:08:36.000+0000
Updated2020-09-13T19:44:35.000+0000

Description

Since Facebook SDK 7.0.0, their iOS SDK requires the project to contain at least one ".swift" file. Otherwise the build fails due to missing Swift standard libraries. And although Titanium already enables Swift for module compatibility, it does not seem to be enough so far. The same issue is happening for other app frameworks like React Native and they workaround it by adding it to the Xcode project (which is not generated their but stable, an option Titanium has not). Importance of the Facebook SDK 7+ upgrade: They fixed an issue with random server errors crashing the whole app that uses it, therefore it's a critical update developers should perform.

Comments

  1. Hans Knöchel 2020-08-02

    PR - https://github.com/appcelerator/titanium_mobile/pull/11873 An alternative would be to generate a Swift file and add it to the pbxproj manually, but starting to move ObjC classes to Swift seems a better way. Test Case (On click of button it should log macaddress) -
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
       
       var btn = Ti.UI.createButton({
           title: 'Trigger'
       });
       
       btn.addEventListener('click', function() {
           Ti.API.info(Ti.Platform.macaddress);
       });
       
       win.add(btn);
       win.open();
       
  2. Samir Mohammed 2020-09-08

    *Closing ticket*. Fix verified in SDK version 9.2.0.v20200908050955, and 9.3.0.v20200908051946. Tested using the test case provided above. *Test and other information can be found at:* https://github.com/appcelerator/titanium_mobile/pull/11873 *Test Environment*
       MacOS Big Sur: 11.0 Beta 5
       Xcode: 12.0 Beta 6
       Java Version: 1.8.0_242
       Android NDK: 21.3.6528147
       Node.js: 12.18.1
       ""NPM":"5.0.0","CLI":"8.1.0-master.11""
       iphone 8 Sim (14.0 Beta)
       
  3. Hans Knöchel 2020-09-13

    This may caused a regression on incremental builds: TIMOB-28130

JSON Source