Is it possible to change the title of PKAddPassesViewController ? - iphone

Every pass, when being added results in PKAddPassesViewController having its title automatically set according to pass type and respecting localization (Generic get "Card", event ticket gets "Event Ticket", store card gets "Store Card" and so on...); but is it possible to change the title?
I've tried setting title property of PKAddPassesViewController instance, but nothing happened, so maybe there is a attribute in pass.json that can control the title (I didn't find one in PassKit specs)?

No, there is no way in the current framework that this title can be customised, either by the Pass Kit framework or by a pass.json key.

Related

Default values for AEM dialog properties (Sightly)

I need to set a default dialog value in AEM component.
For example - I have dialog with node - namelabel
and I am fetching this in my html as
${properties.namelabel}
Now I want to set the default value to this node property, ie when I am editing a dialog there is always a value set as
namelabel : Name
where in author can change this anytime he wants.
Thanks in advance.
in short - you could use property value which is presented as the default value in touch dialog.
your question is though a sort of duplicate of what's been said here: defaultValue in Touch UI dialogs - AEM/CQ

How to get title from WKInterfaceButton

To get title there is function:
setTitle
But how to get title of WKInterfaceButton as string ?
I did not found anything in https://developer.apple.com/library/prerelease/ios/documentation/WatchKit/Reference/WKInterfaceButton_class/index.html
You can't get the state of any WKInterface UI element like buttons (WKInterfaceButton) label (WKInterfaceLabel) etc. I think this is designed by Apple like this because it involve under the hood communication between the extension running on your iOS device & the watch App. To save this overhead there are no getters and the extension should keep track of the state change (it is the one that can change the state).

Original title of timeline object always displaying even when changed

I create a timeline object called 'Reward Gold'. Initially it's Title parameter is set to 'Sample Reward Gold'. I change it to 'Gold' and save it. When I review it's settings, I see it set to 'Gold'. So all should be good.
I then create a timeline action called 'Award Gold'. I assign it the 'Reward Gold' object. I make a few minor changes to verb tenses (awarded and is awarding). I save the action.
When I post the action to the timeline though, I see 'Sample Reward Gold' instead of just 'Gold'. It's displaying the original Title for the object instead of what I changed it to.
This could just be a bug in the ways sample objects are updated -- can you Debug (aka Lint) the URL for your sample object and check the debug tool? The Debug tool is here: https://developers.facebook.com/tools/debug

iphone - apns alert option (no view option) possible?

In the official Apple document it says
alert
string or
dictionary
If this property is included, iOS displays a standard alert. You may specify a string as the value of alert or a dictionary as its value. If you specify a string, it becomes the message text of an alert with two buttons: Close and View. If the user taps View, the application is launched.
Alternatively, you can specify a dictionary as the value of alert. See Table 3-2 for descriptions of the keys of this dictionary.
But I wonder if there's any option that I can add to the code to make the push only show "close" button.
Ex of what I have now:
#"{\"aps\":{\"alert\":\"Update OS\"},\"acme1\":\"updateos\",\"acme2\":42}";
I think you can use a dictionary. Have a look at Table 3-2 on the same page, for the key action-loc-key, it says:
If a string is specified, displays an alert with two buttons, whose behavior is described in Table 3-1. However, iOS uses the string as a key to get a localized string in the current localization to use for the right button’s title instead of “View”. If the value is null, the system displays an alert with a single OK button that simply dismisses the alert when tapped. See “Localized Formatted Strings” for more information.
The single OK button is perhaps what you need.

iPhone Settings Bundle - Read-only setting

Is it possible to have a read-only setting (from the user's perspective, but read/write from my app) in the settings bundle. I'm looking to display something like:
Registered: YES/NO
But I don't want to show a switch because I don't want the user to be able to change this.
The title type displays a read-only string value. You can use this type to display read-only preference values. (If the preference contains cryptic or nonintuitive values, this type lets you map the possible values to custom strings.)
The key for this type is PSTitleValueSpecifier.
No.
For the app to have read write ideally it needs to be in the Settings.bundle which goes into the Documents folder. You could just disable user interaction on the switch?
In Xcode 4+ set the type to title of the textfield.