iOS to tvOS communication is not working - ios

I am trying to make an iPad and an Apple TV communicate between each other with this project I found on github: https://github.com/arn00s/iOS-tvOS
The quick demo perfectly works on simulators but I cannot make it work on a real iPad and a real Apple TV (neither with an iPhone). All my devices are on the last version. I do not have any error message. There is just nothing happening. But I do know I press the button and I also know that the text is sent. But somehow the Apple TV does not receive the text.

You need to add these two items in both your Info.plist files:
Apps that use the local network must provide a usage string in their
Info.plist with the key NSLocalNetworkUsageDescription. Apps that use
Bonjour must also declare the services they browse, using the
NSBonjourServices key.
For example:
<?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">
<string>comm</string>
</plist>
<?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">
<array>
<string>_ClientServer._tcp</string>
</array>
</plist>

Related

Configure associated domain from .xcconfig

I have an app with multiple schemes, where I want to have a different associated domain for each scheme.
I have the following .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>com.apple.developer.associated-domains</key>
<array>
<string>applinks:$(ASSOCIATED_DOMAIN)</string>
<string>webcredentials:(ASSOCIATED_DOMAIN)</string>
</array>
</dict>
</plist>
My .xcconfig files look like this (?mode=developer is only there to verify everything is working and will be removed):
// ...
ASSOCIATED_DOMAIN="my.domain.com?mode=developer"
I tried to verify my link with the following command, but this opens mobile Safari:
xcrun simctl openurl booted 'https://my.domain.com/app/link'
My /.well-known/apple-app-site-association file is accessible and when I inline my domain and remove the $(ASSOCIATED_DOMAIN) the app link works as expected by opening the app instead of Safari. In this case, my .entitlements file looks 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>com.apple.developer.associated-domains</key>
<array>
<string>applinks:my.domain.com?mode=developer</string>
<string>webcredentials:my.domain.com?mode=developer</string>
</array>
</dict>
</plist>
Does anybody have a suggestion what might be wrong? Thanks!
Instead of using a variable for the ASSOCIATED_DOMAIN value, consider specifying a separate entitlements file for each of the schemes.
In the relevant xcconfig file, this can be done by setting:
CODE_SIGN_ENTITLEMENTS = [location of the file].entitlements

Smooch iOS SDK: can't add SKTMenuItemCamera to list of menu items

I'm trying to add the camera option to the list of menu items in Smooch. I've followed the steps in the docs, those being...
1) Add SKTMenuItemCamera to my settings.allowedMenuItems in AppDelegate.m
SKTSettings* settings = [SKTSettings settingsWithAppId:#"myAppId"];
settings.allowedMenuItems = #[SKTMenuItemCamera, SKTMenuItemGallery, SKTMenuItemDocument];
2) Add the NSCameraUsageDescription key and description string to my Info.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>
... more keys and descriptions
<key>NSCameraUsageDescription</key>
<string>Camera permission is required to send images to $(PRODUCT_NAME)</string>
... more keys and descriptions
</dict>
</plist>
For some reason the camera option isn't being displayed, though the photo gallery and document upload options are. I haven't seen this problem reported anywhere else. Help!
I'm using Smooch (6.10.2)

Why does NSFileProtectionComplete not work?

I'd like to protect my apps data using NSFileProtectionComplete. To do so I've used an entitlements plist like so:
<?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>DataProtectionClass</key>
<string>NSFileProtectionComplete</string>
</dict>
</plist>
However when I plug my device in to my mac and open it with a tool such as iExplorer I can read all my files within my apps document folder without me having to unlock my phone. I have data protection enabled and have a pin set to unlock the device.
Why is the encryption not working and how can I remedy this?
Adding data protection to a property list doesn't work unless the capability is enabled in your application properties.

xcode - how use MobileWiFi.framework

In my private app (not jailbroken), I need to read wifi RSSI values of enterprise hotspots. I read about MobileWiFi.framework.
I am trying to use the example code "Getting the WiFi signal strength" found here but without lucky.
Probably, I am not properly use the framework.
Anyone could tell me the steps to do that?
visit : // http://iphonedevwiki.net/index.php/MobileWiFi.framework
<key>com.apple.wifi.manager-access</key>
</true>
Your custom entitlements file should finally look something like 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>keychain-access-groups</key>
<array>
<string>YOUR_APP_BUNDLE_ID</string>
</array>
<key>com.apple.wifi.manager-access</key>
</true>
</dict>
</plist>

What type of response is returned from the iOS provisioning profile after pressing install

When you press "install" on an apple device during the provisioning profile set up (from a mobileconfig), what is returned? Is it XML, post values, etc?
I'm trying to extract the device UDID etc via node js.
The response is the POST request
Inside request you get PList with requested parameters. You can find information about PList format here: https://developer.apple.com/library/Mac/documentation/Darwin/Reference/ManPages/man5/plist.5.html
And response will look something like this:
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ICCID</key>
<string>8901 4104 2541 8901 7521</string>
<key>IMEI</key>
<string>01 266900 647352 2</string>
<key>PRODUCT</key>
<string>iPad2,2</string>
<key>UDID</key>
<string>591f30d41d0bd28597ad962491f1570ddbde4a8a</string>
<key>VERSION</key>
<string>8J2</string>
</dict>
</plist>

Resources