ERROR whitelist rejection on phonegap, need plist format - ios

I've researched that the whitelist rejection error requires
<key>ExternalHosts</key>
<array>
<string>*</string>
</array>
in your plist file. I'm building this app with phonegap build (not with XCode) and I need to know where in the plist file this key goes. Currently I have it as follows:
<plist version="1.0">
<dict>
<key>items</key>
<array>
...
</array>
<key>ExternalHosts</key>
<array>
<string>*</string>
</array>
</dict>
</plist>
But this is still throwing the same error.
Are there any modifications I need to make to my app in tandem with this change?

I did put that:
`<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeyboardDisplayRequiresUserAction</key>
<true/>
...
<key>BackupWebStorage</key>
<string>cloud</string>
<key>ExternalHosts</key>
<array>
<string>dl.dropbox.com</string>
</array>
<key>Plugins</key>
<dict>`
into Cordova.plist file.

Related

App Store Connect Operation Error: Invalid entitlement for core nfc framework

When trying to archive my React Native application and upload to the app store I get the following error:
Here is my main app's entitlements file.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>TAG</string> <!-- added TAG -->
<string>NDEF</string>
</array>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.myapp.onesignal</string>
</array>
</dict>
</plist>
As at posting this answer, you cannot include NDEF in readersession in entitlements.
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>TAG</string>
</array>
You need to add the following to your .entitlements file.
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>TAG</string> <!-- added TAG -->
<string>NDEF</string>
</array>
You then also need to make sure you re-archive your app. This was the reason of my issue persisting.

IOS MDM-Managed Settings Command return CommandFormatError

I receive "CommandFormatError" on Managed Settings commands.
That's what I'm sending as a Settings command:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CommandUUID</key>
<string>123456</string>
<key>Command</key>
<dict>
<key>RequestType</key>
<string>Settings</string>
<key>Settings</key>
<array>
<dict>
<key>Item</key>
<string>VoiceRoaming</string>
<key>Enabled</key>
<true/>
</dict>
</array>
</dict>
</dict>
</plist>
Thank you in advance!
I am also having this same exact issue. Specifically, for VoiceRoaming command on both iPhone (iOS 7 AT&T) and iPad (iOS 8).
According to this 3rd party documentation: http://darthnull.org/media/papers/MDM_CommandReference.pdf
The CommandFormatError is the result of sending the Setting to a device/carrier combination that does not support it.
Hope that helps
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Command</key>
<key>RequestType</key>
<string>RemoveApplication</string>
<key>Identifier</key>
<string>com.mega888.Release</string></dict>
<key>CommandUUID</key><string>RemoveApplication</string>
</dict>
</plis>

MonoTouch: Settings.bundle file issue

I've been trying to setup settings for my app but I can't seem to get this working even though I've looked over it over and over again and compared it to an example in a book and the example on Craig Dunn's blog.
I understand that the syntax has to be perfect and this file is pretty simple at the moment I am just trying to display one textfield for now. I did get this working briefly on a brand new project however I haven't managed to get it to work since.
Here is the XML of my Root.plist file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Root</key>
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Title</key>
<string>Group Name</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>Key</key>
<string>usernameTextField</string>
<key>Title</key>
<string>Username</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
</dict>
</array>
</dict>
</dict>
</plist>
As I said I've looked over it quite a lot of times and I can't see any problems with it. The file build action is set to Content and the Copy to Output Directory is set to Always Copy. The version of MonoTouch that I'm using is 6.0.7.
I'd appreciate any help with this issue. Thanks
Make sure that the Settings.bundle directory is included at the top level of the project. By top-level, I mean that on the file system, the Settings.bundle directory should be in the same directory as your ProjectName.csproj file. In MonoDevelop, it will appear as one of the top-level folders under the project node.
Set the Root.plist Build Action to BundleResource (do not enable "Copy to Output Directory". Hint: if you find yourself setting "Copy to Output Directory", don't do it - it's almost always the wrong thing to do - we've actually discussed removing the option altogether.)
Now, for the plist file format - here's what it should look like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>Group Name</string>
</dict>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string>Username</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>KeyboardType</key>
<string>Alphabet</string>
<key>IsSecure</key>
<false/>
<key>Key</key>
<string>usernameTextField</string>
<key>DefaultValue</key>
<string></string>
</dict>
</array>
<key>StringsTable</key>
<string>Root</string>
</dict>
</plist>
Looking at your Root.plist file, it appears that the PreferenceSpecifiers key is not in the top-level dict node (it needs to be). In other words:
get rid of the following lines at the top of the file:
<dict>
<key>Root</key>
...and one of the following lines at the end of your file:
</dict>
That should do it...
Now... all that said, I just recently figured this out myself while trying to add settings to my personal side project and decided that we, at Xamarin, need to make this easier. I've already fixed a few minor issues in the upcoming MonoDevelop 3.1, but I hope to get the time I need to add templates for Settings.bundle to MonoDevelop's "Add New File" wizard. I'd also like to add plist key/value hinting like we do for Info.plist and Entitlements.plist so that MonoDevelop's plist editor can better guide you when editing these plist files.
For starters, you are missing your closing plist </plist> tag. My current one only has one setting in it, but it works. You can compare to yours to see the differences:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Stay Signed-In</string>
<key>Key</key>
<string>staySignedIn</string>
<key>DefaultValue</key>
<true/>
</dict>
</array>
</dict>
</plist>
I hope this helps.

itms-services://?action=download-manifest Not Work in IIS

I have created an ios apps and let selected devices download&install on idevices browser safari.So make a link like this:
<a href="itms-services://?action=download-manifest&url=http://myserver.com/Info.plist">
and when i click it was popup a message "cannot connect to myserver.com".
Then i figure out IIS missing MimeType so i add back to it.
.ipa application/octet-stream
.plist text/xml
But finally when i click on it no response at all,why?
i doubt info.plist setting was wrong or something.
Here are my info.plist setting:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AppStoreFileSize</key>
<integer>4329818</integer>
<key>ApplicationProperties</key>
<dict>
<key>ApplicationPath</key>
<string>http://myserver.com/Apps.ipa</string>
<key>CFBundleIdentifier</key>
<string>com.app.app</string>
<key>IconPaths</key>
<array>
<string>http://myserver.com/icon.png</string>
<string>http://myserver.com/icon.png</string>
<string>http://myserver.com/icon#2x.png</string>
<string>http://myserver.com/icon-72.png</string>
</array>
<key>SigningIdentity</key>
<string>CSR Certificate</string>
</dict>
<key>ArchiveVersion</key>
<integer>2</integer>
<key>CreationDate</key>
<date>2012-10-10T09:02:39Z</date>
<key>Name</key>
<string>AppName</string>
<key>SchemeName</key>
<string>AppName</string>
You code needs to look like this
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>http://www.example.com/test.ipa</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.name.name</string>
<key>bundle-version</key>
<string>1.0</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>Name</string>
</dict>
</dict>
</array>
</dict>
</plist>
Remember to change:
Bundle Identifier= <string>com.company.name</string>
Installer Name= <string>Name</string>
Ipa Download= <string>http://www.example.com/test.ipa</string>
Change the <string>http://www.example.com/test.ipa</string> to where ever you located you ipa for install.
Create you Install.plist or Start.plist what ever and go into mobile safari and type: itms-services://?action=download-manifest&url=http://www.example.com/whatever.plist
And it should go a head and download it there may be some bugs when downloading.
Remember that the ipa needs a valid UDID= unique device identification.
Hope this helped.
Best Regards Silas.
Since iOS8, un-encrypted plist downloads are not accepted anymore.
So you need a valid ssl certificate and change the scheme to https. You can test this with amazon s3 for example.
you have to use Https for all urls in .plist file

Installation of an application cannot be performed in MDM

It is MDM using APNs.
An addition and deletion of an application are permitted in the composition profile.
iPhone of iOS5 is used.
It does not succeed, although installation of the "free application" of "iTunesStore" is performed by the following method by MDM of iOS.
Has it made a mistake in this method?
Please teach me the right method.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>CommandUUID</key>
<string>995761bc0ac0f311452f050a3e4be157ca2dda75</string>
<key>Command</key>
<dict>
<key>RequestType</key>
<string>InstallApplication</string>
<key>iTunesStoreID</key>
<number>338761996</number>
<key>ManagementFlags</key>
<integer>1</integer>
</dict>
</dict>
</plist>
Replace the number tag to integer.
i.e.,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CommandUUID</key>
<string>4424F929-BDD2-4D44-B518-393C0DABD56A</string>
<key>Command</key>
<dict>
<key>RequestType</key>
<string>InstallApplication</string>
<key>iTunesStoreID</key>
<integer>464656389</integer>
<key>ManagementFlags</key>
<integer>4</integer>
</dict>
</dict>
</plist>
This problem took me a week until I accidentally figure this out.
I had the same issue but just found a solution , is the issue , when i looked into man page i see CFNumber is mapped to or , once changed it too real it worked like a charm
https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man5/plist.5.html
For installing an enterprise IPA, you can use the below XML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CommandUUID</key>
<string>4424F929-BDD2-4D44-B518-393C0DABD56A</string>
<key>Command</key>
<dict>
<key>RequestType</key>
<string>InstallApplication</string>
<key>ManifestURL</key>
<string>https://company.com/manifest.plist</string>
<key>ManagementFlags</key>
<integer>4</integer>
</dict>
</dict>
</plist>
Below is a sample manifest file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>https://companyName/filename.ipa</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.company.appname</string>
<key>bundle-version</key>
<string>3</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>appname</string>
</dict>
</dict>
</array>
</dict>
</plist>

Resources