How we published the iOS video chat app on the App Store

In this article, we will describe how we built our first WebRTC application for iOS and placed it in the App Store, what we had to deal with and what came of it.
What for
We are committed to sawing WebRTC media server and three SDKs for working with the server: Web, Android, iOS.
There are several examples with each SDK. For example, for the iOS SDK, there are 11 examples of applications whose sources are available here .
The developer takes the example by reference, makes sure that the example works and after that collects the example from the sources and starts modifying / embedding the SDK in his application for working with streaming video.
Such an approach as “looked at the demo - assembled - implemented” works great almost everywhere, but not with Apple. You cannot reset the link to anyone who wants to test your application until it is published on the App Store .
Perhaps we are writing simple truths here that have long been covered by all iOS developers and publishers, but for us this was a small surprise.
Without publishing to the App Store, no one will be able to install your application until the UDID of your device (iPhone) is listed.
Those. In order to let someone test the application, you must first ask this someone to give you the device UDID , list it on developer.apple.com , rebuild the application in Xcode , put it out, and only then give a link to Downloading to this particular person.
This distribution method is called adhoc.. In principle, this is convenient; within the team, enter all developers and testers once. But this is terribly inconvenient if you need to provide access to the test demo application to everyone.
As a result, it was decided to publish our demo application in the App Store in order to give everyone an opportunity to test it and understand how it works, without wasting time building from resources.
application
We took Two Way Streaming as a pilot application , which looks like this:

This simple application allows you to do just three things:
- Connect to the server.
- Capture the video stream from the camera and send it to the server.
- Take the video stream from the server and play on the display on the right.
The application is a fake video chat in which you can send a video stream from your iPhone and immediately see the video stream of another person. Those. If desired, the application is quite easily converted into a video chat similar to Chatroulette .
The application source code is available at this link and requires the WCS iOS SDK as a dependency. The process of building the application and all other examples, with drawing resources, is described on the SDK page. Therefore, we will not focus on the assembly, but proceed immediately to the description of the publication in the App Store.
Publication
1. Let's start with the most important thing - with the icons. We make icons with a maximum size of 1024x1024 and add them to Xcode.

Badges came out with icons, because They decided to make the largest icon a little different and for this reason our application was rejected for the first time, but more on that later.
2. Create an App Record - fill out the application card.
Filling out the form is not a complicated process. Therefore, we suggest that you familiarize yourself with it on the Apple website .
3. Add screenshots.
Since we have a demo application, we did not hesitate for a long time and just took photoshots of the screenshots to the required sizes:
- 5.5-Inch Display (1242 x 2208)
- 12.9-Inch Display (2048 x 2732)
4. Downloading the assembly to iTunes Connect
This can be done using the Application Loader to upload the application to iTunes Connect.
1) Open the Xcode menu and click on the Open Developer Tool / Application Loader
2) Log in with your Apple ID
3) Click on “Deliver Your App”.
4) Select the ipa application, click Send and wait for the download to finish.
5. We send the downloaded application for moderation in iTunes Connect.
Here you will need to answer three questions. A little googling, we entered No in all three answers:
Is your app designed to use cryptography or does it contain or incorporate cryptography? | No |
Does your app contain, display, or access third-party content? | No |
Does this app use the Advertising Identifier (IDFA)? | No |
In fact, our application actively uses encryption, namely AES and HTTPS / Websocket. But Google gave the answer that this is about custom encryption, which goes beyond the standard technologies of AES, HTTPS. Therefore, they set No, as for the other two questions.
As a result, the application went into moderation, and we went about our business.
Trouble
After the application has gone for moderation, a notification about the rejection of the assembly - Binary Rejected - may come to the mail .
1. The first draft did not take long and literally the same day a message arrived.
We have started the review of your app, but we are not able to continue because we need access to a video that demonstrates your app in use on an iOS device.
I had to record a short demo video and upload it to YouTube . The video was recorded from the screen of a mobile device and shows how this mobile application functions.
2. The second Trouble, as we wrote, was associated with the icon. We set this as a large icon:

And as small icons like this:

It turns out that you can’t do this, because it misleads users.
We noticed the app icon displayed on the device and the large icon displayed on the App Store do not sufficient match, which makes it difficult for users to find the app they just downloaded.
3. Dealing with the icons and recording videos to demonstrate the application was short-lived, and on the same day we again sent the application for moderation.
The following redirect came four days later and was, at first glance, more obscure:
Your app declares support for audio in the UIBackgroundModes key in your Info.plist but did not include features that require persistent audio.
The audio key is intended for use by apps that provide audible content to the user while in the background, such as music player or streaming audio apps. Please revise your app to provide audible content to the user while the app is in the background or remove the "audio" setting from the UIBackgroundModes key.
It is stated here that our application declares audio support in UIBackgroundModes, but does not have features that would require audio playback in the background. This means that if you switch to another application or press the Home button while the application is running, audio will continue to play, and this is called audio in the UIBackgroundModes , i.e. function relevant for example to play music.
In order not to argue with Apple moderators and not to prove that our Two Way Streaming application is also capable of playing audio / video streams in the background, we simply turned off the declaration of this feature.
4. A similar requirement regarding work in UIBackgroundModes was for VoIP function. Our application declared support for VoIP in the background, and moderators suspected our application in the absence of VoIP.
Your app declares support for VoIP in the UIBackgroundModes key in your Info.plist, but it does not include any Voice over IP services.
To resolve this issue, please revise your app to either add VoIP features or remove the "voip" setting from the UIBackgroundModes key.
The wording “revise your app to add VoIP features” we did not really like, because I would have to prove and show the moderators that we have VoIP functions and they need to work in UIBackgroundModes. Therefore, to speed up the process, we turned off VoIP in UIBackgroundModes, rebuilt the application, and sent it back for moderation.
Disabling UIBackgroundModes
To disable it, we performed all the manipulations with the Info.plist file , which for adhoc- distribution looked like this .
method ad-hoc
After preparing it for publication on the App Store, the config began to look like this.
CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1 LSRequiresIPhoneOS NSCameraUsageDescription Need camera access for publishing stream with video NSMicrophoneUsageDescription Need microphone for publishing stream with audio UIBackgroundModes audio voip UILaunchStoryboardName LaunchScreen UIMainStoryboardFile Main UIRequiredDeviceCapabilities armv7 UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight
And now, after removing UIBackgroundModes, the config looks like this :
CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1.1 LSRequiresIPhoneOS NSCameraUsageDescription Need camera access for publishing stream with video NSMicrophoneUsageDescription Need microphone for publishing stream with audio UIBackgroundModes UILaunchStoryboardName LaunchScreen UIMainStoryboardFile Main UIRequiredDeviceCapabilities armv7 UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight
Hurrah
After a couple of days, a message came that our application was running and now it has the status Ready For Sale and will soon appear on the App Store.
The following app has been approved and the app status has changed to Ready for Sale:
App Name: TwoWayStreaming
App Version Number: 1.0
App Type: iOS
As a result, publishing the application took 1 week and required the following issues to be fixed:
- The large icon should not differ from the small picture
- A demonstration video must be added that shows how the application works.
- The application must clearly show that it requires audio in the background to play, or this audio in the UIBackgroundModes function must be disabled.
- The application must clearly show that it requires the use of a microphone in the background, or this VoIP in the UIBackgroundModes function must be disabled.
At the moment, the application is available in the App Store at this link:
https://appsto.re/ru/r1MEjb.i
Now anyone can install the app and conduct tests.
We hope that this article will help with the publication of your own application with audio and video functions and your application will go to the App Store much faster.
References
Two Way Streaming for iOS - live streaming demo application for iOS
Source - source code
Two Way Streaming for Web - same application for Web
Source - source code
Two Way Streaming for Android - same application for Android
Source - source code
Web Call Server - WebRTC server through which the Two Way Streaming
WCS iOS SDK application works - a description of the process of building examples in Xcode for iOS.
A selection of links on iTunes Connect
Work with icons
iTunes Connect Properties
App Distribution Guide, Adding App Icons
Creating an Application Card (App Record)
iTunes Connect Developer Help, Add an app to your account
iTunes Connect_Guide, Creating iTunes Connect Record for an App
iTunes Connect Properties
Screenshot Requirements
Screen shot properties
Download an app build on iTunes Connect
App Distribution Guide, Uploading Your App to iTunes Connect
Xcode Help, Upload an app to iTunes Connect
Upload your application binary files with Application Loader