[TIMOB-25672] iOS: Address 10+ compiler warnings and general issues in source project
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2018-01-23T19:24:49.000+0000 |
| Affected Version/s | Release 7.0.0 |
| Fix Version/s | Release 7.0.2 |
| Components | iOS |
| Labels | bug, ios, memoryleak, merge-7.0.2 |
| Reporter | Hans Knöchel |
| Assignee | Hans Knöchel |
| Created | 2018-01-14T15:34:32.000+0000 |
| Updated | 2018-01-24T22:14:34.000+0000 |
Description
We currently have a number of (non-critical) warnings in the iOS source, caused by some PR's over the last months. Examples
* Unknown selector-warnings because of text-field changes (selector is in place, but not referenced correctly)
* Unknown selector-warning because of APSAnalytics (a recent updated missed to expose it)
* Deprecating warnings (about AUTHORIZATION_AUTHORIZED which is technically identical to AUTHORIZATION_ALWAYS)
* Missing 1024x1024px launch-screen (development-only, missing since Xcode 9 update)
* Fix memory leaks
* Fix an issue where the VideoPlayer would crash after closing and waiting for deallocation (~ 30s)
* Fix an issue where the thumbnail-generation of the video-player would block the UI
To fix this, it requires two small PR's to aps_sdk and titanium_mobile
PR (aps_sdk/master): https://github.com/appcelerator/aps_sdk/pull/308 PR (titanium_mobile/master): https://github.com/appcelerator/titanium_mobile/pull/9733 PR (titanium_mobile/7_0_X): https://github.com/appcelerator/titanium_mobile/pull/9734
var win = Ti.UI.createWindow({ title: 'TIMOB-25672 Test-Suite', backgroundColor: '#fff', layout: 'vertical' }); var btn1a = Ti.UI.createButton({ title: 'Test #1a (Video Player Thumbnail Generator)', top: 50 }); btn1a.addEventListener('click', function() { var video = Ti.Media.createVideoPlayer({ url: 'http://techslides.com/demos/sample-videos/small.mp4' }); var thumbnail = video.requestThumbnailImagesAtTimes([1], Titanium.Media.VIDEO_TIME_OPTION_EXACT, function(e) { var newWin = Ti.UI.createWindow({ backgroundColor: '#fff' }); newWin.add(Ti.UI.createImageView({ image: e.image })); nav.openWindow(newWin); }); }); var btn1b = Ti.UI.createButton({ title: 'Test #1b (Video Player KVO)', top: 50 }); btn1b.addEventListener('click', function() { var video = Ti.Media.createVideoPlayer({ url: 'http://techslides.com/demos/sample-videos/small.mp4' }); var newWin = Ti.UI.createWindow({ backgroundColor: '#fff' }); newWin.add(video); nav.openWindow(newWin); }); var btn2 = Ti.UI.createButton({ title: 'Test #2 (Base64-decode)', top: 50 }); btn2.addEventListener('click', function() { var blob = Ti.Utils.base64decode('dGlyb2NrcyE='); Ti.API.info('Decoded: ' + blob.text); }); var btn3 = Ti.UI.createButton({ title: 'Test #3 (List-View selectedItems)', top: 50 }); btn3.addEventListener('click', function() { var win = Ti.UI.createWindow(); var list = Ti.UI.createListView({ sections: [Ti.UI.createListSection({ items: [{ properties: { title: 'Test' } }] })] }); win.addEventListener('open', function() { Ti.API.warn('# of selected items (before): ' + list.selectedItems.length); }); list.addEventListener('itemclick', function(e) { Ti.API.warn('# of selected items (in selection): ' + list.selectedItems.length); }); win.add(list); nav.openWindow(win); }); win.add(btn1a); win.add(btn1b); win.add(btn2); win.add(btn3); var nav = Ti.UI.iOS.createNavigationWindow({ window: win }); nav.open();FR passed.
Verified fix is found in: SDK 7.0.2.v20180124113923 SDK 7.1.0.v20180124115505