Prototype of action parameter row for phone with a picker to get phone from contacts
manifest.json
define
- an application service to inject, the
PhoneContactRowService
.- This service provide the Eureka row for
"phoneContact"
name.- The row is
PhoneContactRow
, which add a picker for contacts phone to standard phone eureka row
- The row is
- This service provide the Eureka row for
- the
contacts
capabilities to allow iOS app to display contacts- this will inject in final iOS app the
NSContactsUsageDescription
key for that
- this will inject in final iOS app the
- a parameter
inject
to ask 4d to inject source code
Copy capabilities
json key value of manifest.json
to your project.4dmobileapp. When building an app it will do the same as described before.
(except copying the code)
After generating the app
Edit Xcode/Info.plist
and add
<key>NSContactsUsageDescription</key>
<string>$(PRODUCT_NAME) needs access to the Contacts to let you share it.</string>
Edit Settings/Settings.plist
file and add or modify application.service
key to add PhoneContactRowService
service
<key>application.services</key>
<array>
<string>PhoneContactRowService</string>
</array>
- More code to be sure we ask access to contact, could check if contact allowed, provide a way to open setting if deactivate etc...