[TIMOB-27106] iOS: MusicLibrary compilation error in 8.0.1.GA
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-01-31T17:10:41.000+0000 |
Affected Version/s | Release 8.0.1 |
Fix Version/s | Release 9.0.0 |
Components | iOS |
Labels | griffin-app, iphone, regression |
Reporter | David Bankier |
Assignee | Vijay Singh |
Created | 2019-05-21T10:44:57.000+0000 |
Updated | 2020-02-03T11:30:11.000+0000 |
Description
A simple ios project get a compilation error with 8.0.1.GA when using Music Library:
E.g.
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
win.open();
win.addEventListener('open', function() {
Titanium.Media.openMusicLibrary();
});
Gets the following error:
[ERROR] ** BUILD FAILED **
[ERROR] The following build commands failed:
[ERROR] CompileC /Users/david/Titanium-Projects/test-2/build/iphone/build/Intermediates/test-2.build/Debug-iphoneos/test-2.build/Objects-normal/armv7/MediaModule.o /Users/david/Titanium-Projects/test-2/build/iphone/Classes/MediaModule.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
[ERROR] (1 failure)
Note the project must be cleaned (e.g. ti clean
) before building in order to replicate the bug.
Hello, Please share a trace log of the build? run the project with -l trace and attach the log in here. also, please provide the Xcode and ios SDK version. Thanks.
This is a regression of TIMOB-26681 (cc [~vijaysingh])
Pull: https://github.com/appcelerator/titanium_mobile/pull/10913
Thank you Hans
FR Passed, waiting on Jenkins build. [~hknoechel] [~vijaysingh] Looks like this will need a backport for 8.0.2?
Merged to master, cherry-picked to 8_0_X
Verified the Fix on SDK 8.2.0.v20190605080023,8.1.0.v20190605095601 and 8.0.2.v20190605070127. No complication error.Works as expected .Closing.
I am able to recreate this error in SDKs 8.2.1 and 8.3.X by adding this line:
Ti.Media.hasMusicLibraryPermissions();
This is the error I am getting: {noformat} [ERROR] ** BUILD FAILED ** [ERROR] The following build commands failed: [ERROR] CompileC /Users/brentonhouse/area51/axway/mobile/TIMOB-27106/build/iphone/build/Intermediates/TIMOB-27106.build/Debug-iphoneos/TIMOB-27106.build/Objects-normal/armv7/MediaModule.o /Users/brentonhouse/area51/axway/mobile/TIMOB-27106/build/iphone/Classes/MediaModule.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler [ERROR] (1 failure) {noformat} I have created a sample app to show the error here: https://github.com/brentonhouse/axway-TIMOB-27106 cc: [~cwilliams][~bhouse] In your attached app I can not see the mentioned line. Can you create a new ticket and attach reproducible example please? Thanks!
It is in alloy.js: https://github.com/brentonhouse/axway-TIMOB-27106/blob/master/app/alloy.js
Re-opening issue as build is still failing on 8.3.0.GA with iOS AdHoc builds
In case it helps, I opened the project in Xcode and I could see more detailed errors coming from MediaModule.m {color:#d04437} {noformat} Use of undeclared identifier "MPMediaLibrary" Use of undeclared identifier "MPMediaLibraryAuthorizationStatusAuthorized" {noformat} {color}
PR - https://github.com/appcelerator/titanium_mobile/pull/11440
Original issue has long been fixed. I have been unable to replicate the 2nd issue brought forward by Brenton. Tried multiple SDK versions, appc ti clean, Adhoc builds etc. Compiles just fine. For this reason, I am closing this ticket.
[~ssaddique] Did you tried to run on device?
[~vijaysingh] Yes I did run on both device and simulator.