Varying content with CLPlacemark, administrativeArea, iOS6/iOS7 - ios

I'm planning to make an app for ios7, and have an issue with the administrativeArea Placemark Attribute.
For iOS6 i get the full name of the administrative area (ex. "California"), but for the iOS7, I get the value of "CA". This is a problem when its so varying. Is there any way I can control this input so its more consistent?
The apple docs doesnt eigher explain this in details..
http://developer.apple.com/library/mac/documentation/CoreLocation/Reference/CLPlacemark_class/Reference/Reference.html#//apple_ref/occ/instp/CLPlacemark/administrativeArea
Thanks!

You can only parse it to uoy needed value.
I can offer you find the list of administrative areas with full name and with little.
After you can add this in 2 .txt files, import them in project,create 2 NSArrays and initialize each array in cycle.
After you can check administrative area name and return right value.

Related

Appium XCUIElement showing the same displayed text in accessibility id, value, name, label

I've started using Appium for iOS app automation. The developers had put the ids and name to every element in the app code to assist the automation engineers, however, when I inspect it using Appium it doesn't show any of them. It shows only the same displayed text in accessibility id, value, name, label.
What should I ask developer so that those id and names can be used for automation using Appium.
You should ask the developer to set the accessibility id for the elements.
My advice is that you should also ask the developer to change the accessibility id to something that is not exactly the value of the element, for example: if you have a button that says "Open", some devs will just give it the id "Open". You should ask them to set the accessibility id as "open" or even "openID" - in this way you can make sure that all the elements have an accessibility ID and you can easily spot missing ID's and ask the developer to add them.
In ios whatever the value given to the label of an element that will become the accessibility id of the element.Accessibility id is simply nothing but the text visible on the screen.In the example shown above the name or label will be the accessibility id of the element.
driver.findElement(By.ID(“Drive”)).click();
driver.findElementByAccessibilityId(“Drive”).click();
driver.findElement(By.name(“Drive”)).click();
driver.findElementByName(“Drive”).click();
In the above example "Drive" may be the label or name.
Appium will first search for an accessibility id that matches. If there is none found, a string match will be attempted on the element labels. Finally, if the id passed in is a localization key, it will search the localized string.
Just ask your developers to give label to every element and that label will become the accessibility id of that particular element.
From my experience I learned that, Identifier field is necessary to provide accessiblity/ name attribute to the element in iOS app.
Then you can identify elements with
#iOSFindBy(accessibility = "myid")
public MobileElement SOME_OBJECT;
Or
driver.findElementByAccessibilityId("myid")
Note: Providing any value to Label field will override the actual value displayed on the screen. So, generally avoid to provide any value to the Label field. This will ensure that, we'll be able to fetch the visible text from any element by element.getText().
Also, its important to understand that why the value to Identifier should be given to the only required objects.
For instance, If you want to identify elements like Btn Previous or Btn next then one need to avoid assigning Identifier value to Header or View(parent object). I find that ,providing value to parent suppress the Identifier for child elements.

Is there any actual GMSPlace attributions text for testing?

The GMSPlace defines the "attributions" property as: "The data provider attribution string for this place. These are provided as a NSAttributedString, which may contain hyperlinks to the website of each provider." I'm using this in my app, but haven't been able to test this since every place I've looked up does not have any attributions.
My question is: does anyone know of a place I can lookup which includes attributions?
Have you try the code from the example in https://developers.google.com/places/ios-api/attributions#attributions-place?
I have use the code and found a place have the attribution with PlaceID ChIJV4k8_9UodTERU5KXbkYpSYs. I think you can also try and find more from that code.

Obtaining CNContact from CNContactRelation

I am trying to obtain all related contacts to a selected contact. The way to do this seems to be via mycontact.contactRelations. This gives an array of CNLabeledValue with each of those containing a CNContactRelation as their value. There is then a name property, but it appears nothing else.
The Xamarin documentation for CNContact.ContractRelations seems to suggest I should be able to obtain the corresponding CNContact from a CNContactRelation but I can see no way to do this in objc, other than searching for a contact with a matching name. This may or may not be the contact I'm after, even if they also have a relationship to a contact with the same name as mycontact.
The identifier on the CNLabeledValue seems to refer to the label rather than the related contact, or at least doesn't seem to match the identifier if I select that contact from a CNContactPickerViewController.
Is there a way to obtain the CNContact for the related contact in objc ?
The related names field in Contacts doesn't store linkages, just names. You'll notice this from a user perspective if you go to edit related names in the iOS or OS X Contacts app — it's just a freeform text field. Those apps (and other system apps) will recognize when a related name matches that of another contact (which is why you can ask Siri to call your mother, etc), but they also let you put down names for people you don't have contact info for.
So a CNContactRelation just contains a string, and the only way to find (if there are any) contacts matching a related name is to search the contact store. Use unifiedContactsMatchingPredicate:keysToFetch:error: to search, with a predicate constructed by calling predicateForContactsMatchingName:.

What is the id that the calaba.sh-ios query gets based on?

When I use the query to pull the elements on the screen one of the attributes it gives me is id, however I can not find what determines its value. It is not the Restoration ID nor the Object ID. In some places it is the same as the background image name, others it is the class name, and most of the time it is nil.
I am try to find what is the id value that calaba.sh sees so I can set it in the app code to use as a unique identifier for my tests like I'm doing for android.
The 'id' is the accessibilityIdentifier.
It it is more usual, however, to search by mark.
On iOS a mark is:
accessibilityIdentifier
accessibilityLabel
if the view responds to text, then the mark will be the text.
query("view marked:'sign-in'")

What happened to the hrplimittablerelationship table in ax-2012-r2?

Any advice on how I can replace the following code from AX 2009?
display amount mrpg_limit()
{
return HRPLimitTableRelationship::find("Spending", emplTable_1.PartyId).LimitValue;
}
The HRPLimittableRelationship table was moved to multiple tables
HRPApprovedLimit
HRPApprovedLimitAmount
If you want more details about the process of how this was changed, look at the data upgrade scripts on msdn: http://msdn.microsoft.com/EN-US/library/jj737032.aspx
This TechNet article describes the actual creation of signing limits, in case you need it for testing.
http://technet.microsoft.com/en-us/library/hh271654.aspx
Taking a shot in the dark on getting the information you wanted, there is a class called PurchReqDocument with a static method of spendingLimitStatic, where you supply the worker recid and currency code.

Resources