[TIMOB-24325] iOS: Build fails when using only Ti.Media.openMusicLibrary
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-01-25T11:49:36.000+0000 |
Affected Version/s | Release 6.1.0, Release 6.0.1 |
Fix Version/s | Release 6.0.2 |
Components | iOS |
Labels | ios, media, musiclibrary |
Reporter | Hans Knöchel |
Assignee | Hans Knöchel |
Created | 2017-01-18T18:28:07.000+0000 |
Updated | 2017-01-25T11:49:42.000+0000 |
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
File | Date | Size |
---|---|---|
T24281-Full-Log.rtf | 2017-01-18T18:42:40.000+0000 | 1062322 |
PR: https://github.com/appcelerator/titanium_mobile/pull/8763
[~hansknoechel] Thanks for creating the ticket. I have attached the full log. For reference, here is the environment I used: NPM Version: 2.15.9 Node Version: 4.5.0 Mac OS: 10.12.1 Appc CLI: 6.1.0 Appc CLI NPM: 4.2.8 Titanium SDK version: 6.1.0.v20170118081704 (failed for 6.0.1 as well) Appcelerator Studio, build: 4.8.1.201612050850 Xcode 8.2 iOS Device: 9 or 10 (tested on 9.2 and 10.2) This is the error seen:
Completed FR Review and passed. This was the environment: NPM Version: 2.15.9 Node Version: 4.5.0 Mac OS: 10.12.1 Appc CLI: 6.1.0 Appc CLI NPM: 4.2.8 Titanium SDK version: 6.1.0.v20170120115404 Appcelerator Studio, build: 4.8.1.201612050850 Xcode 8.2 iOS Device: 10 I built to iOS device from Studio, and there were no build errors. The app installed, and I was able to use it.
Fixed in SDK 6.1.0.v20170120115404
Reopening for backport to 6.0.2
PR (6_0_X): https://github.com/appcelerator/titanium_mobile/pull/8770
NPM Version: 2.15.9 Node Version: 4.5.0 Mac OS: 10.12.1 Appc CLI: 6.1.0 Appc CLI NPM: 4.2.8 Titanium SDK version: 6.0.2.v20170123062940 Appcelerator Studio, build: 4.8.1.201612050850 Xcode 8.2 iOS Device: 10 I built to iOS device from Studio, and there were no build errors. The app installed, and I was able to use it. Note that this is for the 6.0.2 backport version.