Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27106] iOS: MusicLibrary compilation error in 8.0.1.GA

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2020-01-31T17:10:41.000+0000
Affected Version/sRelease 8.0.1
Fix Version/sRelease 9.0.0
ComponentsiOS
Labelsgriffin-app, iphone, regression
ReporterDavid Bankier
AssigneeVijay Singh
Created2019-05-21T10:44:57.000+0000
Updated2020-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.

Comments

  1. Sharif AbuDarda 2019-05-22

    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.
  2. Hans Knöchel 2019-05-27

    This is a regression of TIMOB-26681 (cc [~vijaysingh])
  3. Hans Knöchel 2019-05-27

    Pull: https://github.com/appcelerator/titanium_mobile/pull/10913
  4. David Bankier 2019-05-28

    Thank you Hans
  5. Samir Mohammed 2019-05-29

    FR Passed, waiting on Jenkins build. [~hknoechel] [~vijaysingh] Looks like this will need a backport for 8.0.2?
  6. Christopher Williams 2019-05-29

    Merged to master, cherry-picked to 8_0_X
  7. Keerthi Mahalingam 2019-06-05

    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.
       Name                        = Mac OS X
         Version                     = 10.13.6
         Architecture                = 64bit
       Node.js
         Node.js Version             = 8.9.1
         npm Version                 = 5.5.1
       Titanium CLI
         CLI Version                 = 5.1.1
       Titanium SDK
         SDK Version                 = 8.2.0.v20190605080023,8.1.0.v20190605095601 and 8.0.2.v20190605070127
       Cli =7.0.11
       Device =iphone 6s plus ios 12
       
  8. Brenton House 2019-11-13

    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]
  9. Vijay Singh 2019-11-14

    [~bhouse] In your attached app I can not see the mentioned line. Can you create a new ticket and attach reproducible example please? Thanks!
  10. Brenton House 2019-11-14

    It is in alloy.js: https://github.com/brentonhouse/axway-TIMOB-27106/blob/master/app/alloy.js
  11. Brenton House 2020-01-09

    Re-opening issue as build is still failing on 8.3.0.GA with iOS AdHoc builds
  12. Brenton House 2020-01-09

    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}
  13. Vijay Singh 2020-01-17

    PR - https://github.com/appcelerator/titanium_mobile/pull/11440
  14. Sohail Saddique 2020-01-31

    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.
  15. Vijay Singh 2020-01-31

    [~ssaddique] Did you tried to run on device?
  16. Sohail Saddique 2020-02-03

    [~vijaysingh] Yes I did run on both device and simulator.

JSON Source