Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28100] iOS: MediaModule.o compile error when packaging for app store

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2020-09-08T14:37:31.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.2.0, Release 9.1.1
ComponentsiOS
Labelsregression
ReporterJoe Falcone
AssigneeEwan Harris
Created2020-08-26T01:09:32.000+0000
Updated2020-09-25T12:00:48.000+0000

Description

Just wanted to quickly alert you guys to a problem with Ti.Media on iOS. We were just packaging for the app store a current, functioning app which uses Ti.Media.AudioPlayer using the new 9.1.0.GA SDK and these MediaModule.o compile errors popped up. Same errors happened when using the 9.1.1 SDK. The same app builds fine with SDK 9.1.0.v20200814072027 and earlier SDKs. [ERROR] : ** ARCHIVE FAILED ** [ERROR] : The following build commands failed: [ERROR] : CompileC /Users/jrf/Studio/iCoastside/build/iphone/build/Intermediates/iCoastside.build/Release-iphoneos/iCoastside.build/Objects-normal/armv7/MediaModule.o /Users/jrf/Studio/iCoastside/build/iphone/Classes/MediaModule.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler [ERROR] : CompileC /Users/jrf/Studio/iCoastside/build/iphone/build/Intermediates/iCoastside.build/Release-iphoneos/iCoastside.build/Objects-normal/arm64/MediaModule.o /Users/jrf/Studio/iCoastside/build/iphone/Classes/MediaModule.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler [ERROR] : (2 failures) I could put together a simple test case referencing Ti.Media but I figured it was more important to let you know that you've got a problem with a GA release ASAP.

Attachments

FileDateSize
build_iphone.log2020-08-26T15:45:59.000+00003894334

Comments

  1. Ewan Harris 2020-08-26

    [~jfalcone], thanks for the bug report. I'm trying to reproduce this using kitchensink-v2 which also uses AudioPlayer but I'm unable to. Could you upload the full build_iphone.log file from your build directory, it might be that there is something else causing this error and it's just surfacing through the MediaModule file
  2. Ewan Harris 2020-08-26

    [~jfalcone] thanks for the quick upload! I think I see the problem, and also why this isn't occuring in KS (it uses camera APIs). I'll move this over to TIMOB, and prepare a minimal sample code Specific error is
       [TRACE]  CompileC /Users/jrf/Studio/iCoastside/build/iphone/build/Intermediates/iCoastside.build/Release-iphoneos/iCoastside.build/Objects-normal/armv7/MediaModule.o /Users/jrf/Studio/iCoastside/build/iphone/Classes/MediaModule.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'iCoastside' from project 'iCoastside')
       [TRACE]      cd /Users/jrf/Studio/iCoastside/build/iphone
       [TRACE]      export LANG=en_US.US-ASCII
       [TRACE]      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target armv7-apple-ios10.0 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fobjc-weak -fmodules -gmodules -fmodules-cache-path=/Users/jrf/Studio/iCoastside/build/iphone/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/jrf/Studio/iCoastside/build/iphone/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wunreachable-code -Wno-implicit-atomic-properties -Wno-objc-interface-ivars -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wno-parentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wno-unused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wdeprecated-implementations -DDEPLOYTYPE=production -DLAUNCHSCREEN_STORYBOARD=1 -DDEFAULT_BGCOLOR_RED=1 -DDEFAULT_BGCOLOR_GREEN=1 -DDEFAULT_BGCOLOR_BLUE=1 -DDISABLE_TI_LOG_SERVER=1 -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -Wno-unguarded-availability -iquote /Users/jrf/Studio/iCoastside/build/iphone/build/Intermediates/iCoastside.build/Release-iphoneos/iCoastside.build/iCoastside-generated-files.hmap -I/Users/jrf/Studio/iCoastside/build/iphone/build/Intermediates/iCoastside.build/Release-iphoneos/iCoastside.build/iCoastside-own-target-headers.hmap -I/Users/jrf/Studio/iCoastside/build/iphone/build/Intermediates/iCoastside.build/Release-iphoneos/iCoastside.build/iCoastside-all-target-headers.hmap -iquote /Users/jrf/Studio/iCoastside/build/iphone/build/Intermediates/iCoastside.build/Release-iphoneos/iCoastside.build/iCoastside-project-headers.hmap -I/Users/jrf/Studio/iCoastside/build/iphone/build/Products/Release-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk/usr/include/libxml2 -Iheaders -I/Users/jrf/Studio/iCoastside/build/iphone/build/Intermediates/iCoastside.build/Release-iphoneos/iCoastside.build/DerivedSources-normal/armv7 -I/Users/jrf/Studio/iCoastside/build/iphone/build/Intermediates/iCoastside.build/Release-iphoneos/iCoastside.build/DerivedSources/armv7 -I/Users/jrf/Studio/iCoastside/build/iphone/build/Intermediates/iCoastside.build/Release-iphoneos/iCoastside.build/DerivedSources -Wno-arc-performSelector-leaks -F/Users/jrf/Studio/iCoastside/build/iphone/build/Products/Release-iphoneos -FFrameworks -DNDEBUG -include /Users/jrf/Studio/iCoastside/build/iphone/build/Intermediates/PrecompiledHeaders/SharedPrecompiledHeaders/6311335957630924213/iCoastside_Prefix.pch -MMD -MT dependencies -MF /Users/jrf/Studio/iCoastside/build/iphone/build/Intermediates/iCoastside.build/Release-iphoneos/iCoastside.build/Objects-normal/armv7/MediaModule.d --serialize-diagnostics /Users/jrf/Studio/iCoastside/build/iphone/build/Intermediates/iCoastside.build/Release-iphoneos/iCoastside.build/Objects-normal/armv7/MediaModule.dia -c /Users/jrf/Studio/iCoastside/build/iphone/Classes/MediaModule.m -o /Users/jrf/Studio/iCoastside/build/iphone/build/Intermediates/iCoastside.build/Release-iphoneos/iCoastside.build/Objects-normal/armv7/MediaModule.o
       [TRACE]  /Users/jrf/Studio/iCoastside/build/iphone/Classes/MediaModule.m:1828:26: error: use of undeclared identifier 'picker'
       [TRACE]    [self closeModalPicker:picker];
       [TRACE]                           ^
       [TRACE]  1 error generated.
       [TRACE]  
       
    Minimal reproduction code below, paste into app.js and build to device
       var win = Ti.UI.createWindow();
       var audioPlayer = Ti.Media.createAudioPlayer();
       win.open();
       
  3. Joe Falcone 2020-08-26

    Build log attached. More details: Xcode [^build.log] 11.6 (11E708), and the app uses Hyperloop. [^build_iphone.log] Here is the error from the build log... [TRACE] /Users/jrf/Studio/iCoastside/build/iphone/Classes/MediaModule.m:1828:26: error: use of undeclared identifier 'picker' [TRACE] [self closeModalPicker:picker]; [TRACE] ^ [TRACE] 1 error generated. Probably this in mediaModule.m
       #pragma mark UIAdaptivePresentationControllerDelegate
       
       #if IS_SDK_IOS_13
       - (void)presentationControllerDidDismiss:(UIPresentationController *)presentationController
       {
         [self closeModalPicker:picker];
         [self sendPickerCancel];
       }
       #endif
       
  4. Joe Falcone 2020-08-26

    Thank you... this is from our use of Ti.Media.createAudioPlayer so different from camera api.
  5. Ewan Harris 2020-08-26

    PR: https://github.com/appcelerator/titanium_mobile/pull/11968
  6. Ewan Harris 2020-08-26

    [~jfalcone], yup you're right! If my understanding is right (I'm not a real iOS dev ;)) then guarding with an ifdef for USE_TI_MEDIAOPENPHOTOGALLERY should be good enough (it works for me at least)
  7. Samir Mohammed 2020-08-27

    FR Passed, Waiting on Jenkins build for Master and 9_3_X port.
  8. Christopher Williams 2020-08-28

    cherry-picked to 9_1_X for 9.1.1 target
  9. Samir Mohammed 2020-09-08

    *Closing ticket*. Fix verified in SDK version 9.2.0.v20200908050955, 9.1.1.v20200903090820 and 9.3.0.v20200908051946. *Test and other information can be found at:* Master: https://github.com/appcelerator/titanium_mobile/pull/11968
  10. Shamsul Azhar 2020-09-25

    I'm still seeing this problem in SDK9.2.0.GA when building for device. Is this expected. Is this fix for the next GA release?
  11. Ewan Harris 2020-09-25

    [~shamsulazhar], if you're seeing this with SDK 9.2.0 it's probably TIMOB-28151. The fix is merged to the 9_2_X branch and available in 9.2.1.v20200924101706 which you can get with appc ti sdk install -b 9_2_X

JSON Source