Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25752] iOS: 7.0.2 RC fails to build on device due to Ti.Media errors

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2018-02-05T15:43:48.000+0000
Affected Version/sRelease 7.0.2
Fix Version/sRelease 7.0.2
ComponentsiOS
Labelsn/a
ReporterJeroen van Dijk
AssigneeHans Knöchel
Created2018-02-05T14:33:43.000+0000
Updated2018-02-08T17:09:17.000+0000

Description

When trying to run a build on an iPhone X, I'm not able to build the current 7.0.2 RC. You get the following trace output:
[TRACE] /build/iphone/Classes/MediaModule.m:257:52: error: use of undeclared identifier 'TiVideoPlayerPlaybackStateInterrupted'; did you mean 'MPNowPlayingPlaybackStateInterrupted'?
[TRACE] MAKE_SYSTEM_PROP(VIDEO_PLAYBACK_STATE_INTERRUPTED, TiVideoPlayerPlaybackStateInterrupted);
[TRACE]                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[TRACE]                                                    MPNowPlayingPlaybackStateInterrupted
[TRACE] In file included from /build/iphone/Classes/MediaModule.m:11:
[TRACE] In file included from /build/iphone/Classes/MediaModule.h:15:
[TRACE] In file included from /build/iphone/Classes/TiModule.h:10:
[TRACE] In file included from /build/iphone/Classes/TiProxy.h:16:
[TRACE] /build/iphone/Classes/TiBase.h:330:36: note: expanded from macro 'MAKE_SYSTEM_PROP'
[TRACE]     return [NSNumber numberWithInt:map]; \
[TRACE]                                    ^
[TRACE] In module 'MediaPlayer' imported from /build/iphone/Classes/MediaModule.h:12:
[TRACE] /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/System/Library/Frameworks/MediaPlayer.framework/Headers/MPNowPlayingInfoCenter.h:49:5: note: 'MPNowPlayingPlaybackStateInterrupted' declared here
[TRACE]     MPNowPlayingPlaybackStateInterrupted
[TRACE]     ^
[TRACE] /build/iphone/Classes/MediaModule.m:258:47: error: use of undeclared identifier 'TiVideoPlayerPlaybackStatePaused'; did you mean 'MPNowPlayingPlaybackStatePaused'?
[TRACE] MAKE_SYSTEM_PROP(VIDEO_PLAYBACK_STATE_PAUSED, TiVideoPlayerPlaybackStatePaused);
[TRACE]                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[TRACE]                                               MPNowPlayingPlaybackStatePaused
[TRACE] In file included from /build/iphone/Classes/MediaModule.m:11:
[TRACE] In file included from /build/iphone/Classes/MediaModule.h:15:
[TRACE] In file included from /build/iphone/Classes/TiModule.h:10:
[TRACE] In file included from /build/iphone/Classes/TiProxy.h:16:
[TRACE] /build/iphone/Classes/TiBase.h:330:36: note: expanded from macro 'MAKE_SYSTEM_PROP'
[TRACE]     return [NSNumber numberWithInt:map]; \
[TRACE]                                    ^
[TRACE] In module 'MediaPlayer' imported from /build/iphone/Classes/MediaModule.h:12:
[TRACE] /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/System/Library/Frameworks/MediaPlayer.framework/Headers/MPNowPlayingInfoCenter.h:47:5: note: 'MPNowPlayingPlaybackStatePaused' declared here
[TRACE]     MPNowPlayingPlaybackStatePaused,
[TRACE]     ^
[TRACE] /build/iphone/Classes/MediaModule.m:259:48: error: use of undeclared identifier 'TiVideoPlayerPlaybackStatePlaying'; did you mean 'MPNowPlayingPlaybackStatePlaying'?
[TRACE] MAKE_SYSTEM_PROP(VIDEO_PLAYBACK_STATE_PLAYING, TiVideoPlayerPlaybackStatePlaying);
[TRACE]                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[TRACE]                                                MPNowPlayingPlaybackStatePlaying
[TRACE] In file included from /build/iphone/Classes/MediaModule.m:11:
[TRACE] In file included from /build/iphone/Classes/MediaModule.h:15:
[TRACE] In file included from /build/iphone/Classes/TiModule.h:10:
[TRACE] In file included from /build/iphone/Classes/TiProxy.h:16:
[TRACE] /build/iphone/Classes/TiBase.h:330:36: note: expanded from macro 'MAKE_SYSTEM_PROP'
[TRACE]     return [NSNumber numberWithInt:map]; \
[TRACE]                                    ^
[TRACE] In module 'MediaPlayer' imported from /build/iphone/Classes/MediaModule.h:12:
[TRACE] /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/System/Library/Frameworks/MediaPlayer.framework/Headers/MPNowPlayingInfoCenter.h:46:5: note: 'MPNowPlayingPlaybackStatePlaying' declared here
[TRACE]     MPNowPlayingPlaybackStatePlaying,
[TRACE]     ^
[TRACE] /build/iphone/Classes/MediaModule.m:260:48: error: use of undeclared identifier 'TiVideoPlayerPlaybackStateStopped'; did you mean 'MPNowPlayingPlaybackStateStopped'?
[TRACE] MAKE_SYSTEM_PROP(VIDEO_PLAYBACK_STATE_STOPPED, TiVideoPlayerPlaybackStateStopped);
[TRACE]                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[TRACE]                                                MPNowPlayingPlaybackStateStopped
[TRACE] In file included from /build/iphone/Classes/MediaModule.m:11:
[TRACE] In file included from /build/iphone/Classes/MediaModule.h:15:
[TRACE] In file included from /build/iphone/Classes/TiModule.h:10:
[TRACE] In file included from /build/iphone/Classes/TiProxy.h:16:
[TRACE] /build/iphone/Classes/TiBase.h:330:36: note: expanded from macro 'MAKE_SYSTEM_PROP'
[TRACE]     return [NSNumber numberWithInt:map]; \
[TRACE]                                    ^
[TRACE] In module 'MediaPlayer' imported from /build/iphone/Classes/MediaModule.h:12:
[TRACE] /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/System/Library/Frameworks/MediaPlayer.framework/Headers/MPNowPlayingInfoCenter.h:48:5: note: 'MPNowPlayingPlaybackStateStopped' declared here
[TRACE]     MPNowPlayingPlaybackStateStopped,
[TRACE]     ^
[TRACE] 4 errors generated.
Resulting in:
[ERROR] ** BUILD FAILED **
[ERROR] The following build commands failed:
[ERROR]         CompileC build/Intermediates/app.build/Debug-iphoneos/app.build/Objects-normal/armv7/MediaModule.o Classes/MediaModule.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
[ERROR] (1 failure)
7.0.1.GA still works as expected with the same application code

Comments

  1. Hans Knöchel 2018-02-05

    Regression from TIMOB-25640 PR (master): https://github.com/appcelerator/titanium_mobile/pull/9800 PR (7_0_X): https://github.com/appcelerator/titanium_mobile/pull/9801 Test-Case: 1. Create an empty project 2. Add Ti.API.info(Ti.Media.PLAYBACK_STATE_STOPPED); somewhere in the project 3. Save an deploy to device Expected behavior: The build completes without errors!
  2. Jeroen van Dijk 2018-02-06

    I've just tested again with the new build (7.0.2.v20180205145048), but the change didn't result in a successful build. The exact same trace is still shown when build with this branch. As discussed on Slack, I'm only using Ti.Media.openPhotoGallery and Ti.Media.showCamera
  3. Eric Merriman 2018-02-07

    [~jvandijk] The fix would not have been in that build. The fix will be in builds from 7.0.2.v20180207022213 forward.
  4. Abir Mukherjee 2018-02-07

    I tested with 7.0.2.v20180207022213 and the issue seems to be fixed. I tested with the RC version and was able to reproduce the issue (build failed) Then I tried with the fixed version and build succeeded, and I was able to launch and operate the app. This is my environment.: Node Version: 8.9.1 NPM Version: 5.5.1 Mac OS: 10.13.1 Appc CLI: 7.0.1 Appc CLI NPM: 4.2.11 Titanium SDK version: 7.0.2.v20180207022213
  5. Jeroen van Dijk 2018-02-08

    I also can confirm that this is resolved. The change did exist in build 7.0.2.v20180205145048, but an include was missing.
  6. Abir Mukherjee 2018-02-08

    Great! I'll close the ticket.

JSON Source