[TIMOB-19510] Add Ti.App.iOS.UserActivity.isSupported()
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-10-08T20:42:51.000+0000 |
Affected Version/s | Release 5.1.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Fokke Zandbergen |
Assignee | Angel Petkov |
Created | 2015-09-14T15:08:31.000+0000 |
Updated | 2017-03-16T22:49:27.000+0000 |
Description
Ti.App.iOS.UserActivity
has an (undocumented: TIDOC-2306) supported
property but no isSupported()
method.
I'd expect such a method since the tightly related [Ti.App.iOS.SearchableIndex.isSupported](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.App.iOS.SearchableIndex-method-isSupported) also exists, just like [Ti.WatchSession.isSupported](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.WatchSession-property-isSupported) by the way.
Hello , the UserActivity class has a isSupported() method technically.Its actually just .supported, so for example
In this case it should return false as the com.setdirection.home is not a valid activityType
Uh, yes.. so the ticket is about adding the
isSupported()
method. I know the property is there.Sorry i didn't explain that very well my bad. The .supported is a method which returns the property.
You mean I can do:
Still, my point is not to have a method but to have one that is on par with
Ti.App.iOS.SearchableIndex.isSupported()
andTi.WatchSession.isSupported()
.Yeah you could , well actually it's getSupported() but writing .supported calls the same method. The isSupported methods in the other classes essentially do exactly the same thing as this method. Except that the userActivity one has a couple more checks than just if its Xcode 7 and iOS 9.
OK, so is it a documentation thing or do we need a code change to support
Ti.App.iOS.UserActivity.isSupported()
?You can't call isSupported as no method is named that but using the getSupported() or just supported() will do the same thing . Could change the docs and code from getSupported to isSupported , but all that would do is just rename the method thats it.
Yes,so that's all that this request is about; adding/renaming the method so we have parity with the other 2 mentioned and developers have a better (think less, do more) experience.
:PR: https://github.com/appcelerator/titanium_mobile/pull/7283
PR *approved*!
Thank's!
Closing ticket as fixed.