{ "id": "109713", "key": "TIMOB-12752", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-06-26T22:31:05.000+0000", "created": "2013-02-14T11:07:41.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "exalture" ], "versions": [], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-26T22:31:10.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h5. Problem\r\nThe recent documentation shows that Ti.UI.iOS.AdView inherits the click/singletap/touchstart events but none of these events are fired when the iAd banner is clicked.\r\n\r\nThis makes it impossible to detect when the user clicks an ad and the ad covers the entire screen and in turn makes it impossible to use iAd with apps that must be paused when the ad covers the screen.\r\n\r\nh5. Test Case\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n orientationModes: [ Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT ],\r\n layout: \"absolute\"\r\n});\r\n\r\nvar iAdView = Ti.UI.iOS.createAdView({\r\n bottom: \"0px\",\r\n height: Ti.UI.SIZE,\r\n width: Ti.UI.SIZE,\r\n adSize: Ti.UI.iOS.AD_SIZE_PORTRAIT,\r\n});\r\niAdView.addEventListener(\"load\", function (e) {\r\n alert(\"iad - loaded\");\r\n});\r\niAdView.addEventListener(\"error\", function (e) {\r\n alert(\"iad - error\");\r\n});\r\niAdView.addEventListener(\"action\", function (e) {\r\n //runs when ad is dismissed by the user\r\n alert(\"iad - action\");\r\n});\r\niAdView.addEventListener(\"click\", function (e) {\r\n //never runs\r\n alert(\"iad - click\");\r\n});\r\niAdView.addEventListener(\"singletap\", function (e) {\r\n //never runs\r\n alert(\"iad - singletap\");\r\n});\r\niAdView.addEventListener(\"touchstart\", function (e) {\r\n //never runs\r\n alert(\"iad - touchstart\");\r\n});\r\n\r\nwin.add(iAdView);\r\nwin.open();\r\n{code}\r\n\r\nh5. Community Discussion\r\nhttp://developer.appcelerator.com/question/148233/how-to-capture-iad-banner-click\r\n", "attachment": [], "flagged": false, "summary": "Ti.UI.iOS.AdView: Does not fire click/singletap/touchstart events", "creator": { "name": "basar.simitci", "key": "basar.simitci", "displayName": "Basar Simitci", "active": true, "timeZone": "Europe/Istanbul" }, "subtasks": [], "reporter": { "name": "basar.simitci", "key": "basar.simitci", "displayName": "Basar Simitci", "active": true, "timeZone": "Europe/Istanbul" }, "environment": "Titanium SDK 3.0.0.GA, 3.1 CI Builds, 3.0.2.RC\r\niOS 6 & 6.1\r\niOS Simulator, iAd test banner\r\nHost: Mac OS X 10.7.5\r\nTitanium Studio 3.0.1.201212181159", "comment": { "comments": [ { "id": "242879", "author": { "name": "srikanthr", "key": "srikanthr", "displayName": "srikanth ravipati", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Native ios ADBannerView does not support click,touch and tap events.", "updateAuthor": { "name": "srikanthr", "key": "srikanthr", "displayName": "srikanth ravipati", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-19T10:48:30.000+0000", "updated": "2013-03-19T10:48:30.000+0000" }, { "id": "242885", "author": { "name": "basar.simitci", "key": "basar.simitci", "displayName": "Basar Simitci", "active": true, "timeZone": "Europe/Istanbul" }, "body": "I don't think this is true. The ADBannerView calls a method when user taps the banner.\r\nQuoting from the iAd Programming Guide (http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/iAd_Guide/WorkingwithBannerViews/WorkingwithBannerViews.html#//apple_ref/doc/uid/TP40009881-CH4-SW3);\r\n\r\n~~~\r\nResponding to a Touch in the Banner View\r\nBefore the banner view triggers an advertising action, it calls the delegate’s bannerViewActionShouldBegin:willLeaveApplication: method. Your delegate method performs two tasks:\r\n\r\nIt decides whether to allow the action to be triggered.\r\nIf the action will cover your application’s user interface, this method pauses any activities that require user interaction.\r\nYour delegate should return YES from this method if it wants to allow the action to be triggered. It can prevent the action from being triggered by returning NO. Your application should always allow actions to be triggered unless it cannot safely do so.\r\n\r\nIf the willLeave parameter is YES, then your application is going to be moved to the background after it returns from this delegate method. This process is described in “Understanding an Application’s States and Transitions” in iOS App Programming Guide.\r\nIf the willLeave parameter is NO, iAd covers the application’s user interface after it returns from this delegate method. Your application should disable sounds, animations or other activities that require user interaction before returning. For example, a real-time game should pause gameplay, then return YES to allow the action to be triggered.\r\n~~~\r\n\r\nThis functionality should be exposed as an event. Otherwise Ti.UI.iOS.AdView is useless.\r\n", "updateAuthor": { "name": "basar.simitci", "key": "basar.simitci", "displayName": "Basar Simitci", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2013-03-19T11:45:24.000+0000", "updated": "2013-03-19T12:20:21.000+0000" }, { "id": "249039", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Our documents indicate the 'action' event should fire when a \"banner action\" has taken place. http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.iOS.AdView-event-action\r\n\r\nReports from our Titans indicate this used to work. Likely a regression. Please reinvestigate and fix.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2013-04-25T18:54:16.000+0000", "updated": "2013-04-25T18:54:16.000+0000" }, { "id": "338540", "author": { "name": "woodoo", "key": "woodoo", "displayName": "Michael Woode", "active": true, "timeZone": "Europe/Berlin" }, "body": "This is still an issue, when will a fix be in place?\r\nTi sdk 3.4.1 GA \r\nTi Studio build 3.4.1.201410281727\r\n\r\nNative there is a property (or variable in swift) - \"actionInProgress\", which would indicate something is happening with the ad. But an Ti-event would be better.", "updateAuthor": { "name": "woodoo", "key": "woodoo", "displayName": "Michael Woode", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-01-09T17:20:21.000+0000", "updated": "2015-01-09T17:20:21.000+0000" }, { "id": "422896", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as iAd is no longer supported.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-26T22:31:05.000+0000", "updated": "2017-06-26T22:31:05.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }