Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20294] iOS: Resolve Xcode compiler warnings

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2016-02-10T12:50:52.000+0000
Affected Version/sRelease 5.1.0, Release 5.0.0, Release 5.2.0
Fix Version/sRelease 5.4.0
ComponentsiOS
Labelscompiler, ios, warning, xcode
ReporterHans Knöchel
AssigneeHans Knöchel
Created2016-01-31T17:38:02.000+0000
Updated2018-08-06T17:49:10.000+0000

Description

For the upcoming Titanium Mobile 5.4.0 release, we need to get rid of the warnings we currently have when building the SDK (as well as deploying Titanium Apps). This is a similar effort as TIMOB-16697 did in the past.

Comments

  1. Hans Knöchel 2016-01-31

    PR: https://github.com/appcelerator/titanium_mobile/pull/7657 Testing steps: Run the Xcode project and ensure it doesn't fail. EDIT: Here is a demo case calling all changed methods:
       
       var win = Ti.UI.createWindow({layout: "vertical",backgroundColor: "#fff", orientationModes: [0,1,2,3]});
       win.open();
       
       ////////// ---
       
       var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, "test_two.txt");
       file.resolve();
       
       ////////// ---
       
       var player = Ti.Media.createSound({url:'http://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3'});
       player.addEventListener("resume", function() {
       	Ti.API.warn("resumed");
       });
       player.play();
       
       setTimeout(function() {
       	player.pause();
       	setTimeout(function() {
       		player.play();
       		player.stop();
       	},500);
       },500);
       
       ////////// ---
       
       var videoPlayer = Titanium.Media.createVideoPlayer({
           autoplay : true,
           height : 300,
           width : 300,
       	url: Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'movie.mp4'),
           mediaControlStyle : Titanium.Media.VIDEO_CONTROL_DEFAULT,
           scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT
       });
       
       win.add(videoPlayer);
       
       ////////// ---
       
       Ti.API.warn(win.orientationModes);
       
       ////////// ---
       
       Ti.UI.Clipboard.clearData('unknown');
       
       ////////// ---
       
       var btn = Ti.UI.createButton({title: "Open dialog", top: 30});
       btn.addEventListener("click", function() {
       	var emailDialog = Ti.UI.createEmailDialog();
       	emailDialog.addAttachment(Ti.Filesystem.getFile('cricket.wav').read());
       	emailDialog.open();
       });
       win.add(btn);
       
       ////////// ---
       
       var web = Ti.UI.createWebView({
       	top: 30,
       	width: 100,
       	height: 100,
       	backgroundColor: "#f00",
       	data: Ti.Filesystem.getFile('examples/local_webview.html').read()
       });
       web.addEventListener("load", function() {
       	Ti.API.warn("Data loaded!");
       });
       win.add(web);
       
       ////////// ---
       
       win.setToolbar([Ti.UI.createButton({title: "Test"})]);
       
       ////////// ---
       
       // SplitView API is already removed from public API and replaced with Ti.UI.iOS.SplitView,
       // so we don't need to validate the events here
       
       ////////// ---
       
       win.setBackgroundImage(Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, "default_app_logo.png").read());
       
       
  2. Eric Merriman 2018-08-06

    Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.

JSON Source