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

iOS: Build fails when using only Ti.Media.openMusicLibrary

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 6.1.0, Release 6.0.1
    • Fix Version/s: Release 6.0.2
    • Component/s: iOS
    • Story Points:
      3
    • Sprint:
      2017 Sprint 02 SDK

      Description

      When using Ti.Media.openMusicLibrary() without any other Ti.Media API, the build fails on 6.0.1.GA and 6.1.0.

      Test-Case:

      var win = Ti.UI.createWindow({
          backgroundColor: '#fff'
      });
       
      var btn = Ti.UI.createButton({
          title: 'Trigger'
      });
       
      btn.addEventListener('click', function() {
          Titanium.Media.openMusicLibrary({
          	allowMultipleSelections : false,
          	mediaTypes : Titanium.Media.MUSIC_MEDIA_TYPE_MUSIC|Titanium.Media.MUSIC_MEDIA_TYPE_ANY_AUDIO,
          	success : function(event) {
          		// called when media returned from the MusicLibrary
          		console.log("Results: " + JSON.stringify(event));
          	},
          	cancel : function() {
          		alert("Aborting ");
          	},
          	error : function(error) {
          		// called when there's an error
          		var a = Titanium.UI.createAlertDialog({
          			title : 'Music Library'
          		});
          		if (error.code == Titanium.Media.NO_MUSIC_PLAYER) {
          			a.setMessage('Please run this test on device.');
          		} else {
          			a.setMessage('Unexpected error: ' + error.code);
          		}
          		a.show();
          	}
          });
       
      });
       
      win.add(btn);
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              hknoechel Hans Knöchel
              Reporter:
              hknoechel Hans Knöchel
              Reviewer:
              Vijay Singh
              Tester:
              Abir Mukherjee
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code