Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24769] iOS: Remove SBJSON dependency from SDK-core

GitHub Issuen/a
TypeStory
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-06-27T14:05:34.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.2.0
ComponentsiOS
Labelsqe-6.2.0
ReporterHans Knöchel
AssigneeHans Knöchel
Created2017-06-04T18:59:55.000+0000
Updated2017-06-29T12:05:35.000+0000

Description

We use the SBJSON library that was added in the Titanium SDK 0.9. It was never touched since then and nowadays we have the system-class NSJSONSerialization that does everything we needed from SBJSON (parse + stringify). As we want to split out legacy code from the core to improve the build-time, removing this library is fundamental to getting started. The library is used in both the core and in TiVerify, so the changes will affect both repos.

Comments

  1. Hans Knöchel 2017-06-04

    PR (tiverify/master): https://github.com/appcelerator/titanium_verify/pull/24 PR (titanium_mobile/master): https://github.com/appcelerator/titanium_mobile/pull/9106 Test-Case:
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
       
       var btn = Ti.UI.createButton({
           title: 'Trigger'
       });
       
       btn.addEventListener('click', function() {
           Ti.App.fireEvent("test", { hello: 'world' }); 
       });
       
       /**
        * Test-case 1: Event-unboxing (AppModule.m)
        */
       Ti.App.addEventListener("test", function(e) {
           Ti.API.info('Hello ' + e.hello)
                
            /**
             * Test-case 2: Geolocation (GeolocationModule.m)
             */
             Ti.Geolocation.reverseGeocoder(40.75773, -73.985708, function(e) {
                 
                 /**
                  * Test-case 3: Analytics (AnalyticsModule.m)
                  */
                  var args = { 
                      success: e.success,
                      places: e.places || []
                  };
                  
                  Ti.Analytics.featureEvent('geo_update', args);
                  Ti.API.info('Location: ', args);
             });
       });
       
       win.add(btn);
       win.open();
       
  2. Harry Bryant 2017-06-29

    Verified as fixed, using the provided test case, did not experience any errors during compile and run time, information returned to the console log was also verified to be working as intended. Tested On: iPhone 7 10.3.2 Device & Simulator Mac OS Sierra (10.12.5) Ti SDK: 6.2.0.v20170628154113 Appc NPM: 4.2.9 App CLI: 6.2.2 Xcode 8.3.3 Node v4.6.0 *Closing ticket.*

JSON Source