📜 ⬆️ ⬇️

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


In this article we will describe how we assembled our first WebRTC application for iOS and placed it on the App Store, which we had to face and what came of it.

What for


We are committed to sawing the 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 an example by reference, makes sure that the example works, and after that it collects the example from the source code and starts modifying / building the SDK into its application for working with streaming video.

Such an approach as “looked at the demo - assembled - implemented” works fine almost everywhere, but not with Apple. You cannot reset the link to anyone who wants to test your application until it is published in the App Store .

Perhaps we are writing simple truths here that have long been passed by all iOS developers and publishers, but for us this was a little surprise.

Without publishing to the App Store, no one can install your app until the UDID of your device (iPhone) is listed.

Those. In order to give an application a test to someone, you must first ask that someone give you the device UDID , list it on developer.apple.com , rebuild the application in Xcode , post it, and only then give a link to downloading this particular person.

This distribution method is called adhoc . In principle, this is convenient; within the team, enter all developers and testers once. But it 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 the opportunity to test it and understand how it works, without spending time on the assembly of resources.

application


As a pilot, they took Two Way Streaming , which looks like this:


This simple application allows you to do only three things:


The application is a fake video chat in which you can send a video stream from your iPhone and immediately watch another person's video stream. Those. If desired, the application is quite easily converted to a video chat like Chatroulette .

The source code of the application is available at this link and requires WCS iOS SDK as a dependency. The process of building the application and all other examples, with pulling out the resources, is described on the SDK page. Therefore, we will not focus on the assembly, but proceed directly to the description of the publication in the App Store.

Publication


1. Let's start with the most important thing - with icons. Make icons with a maximum size of 1024x1024 and add to Xcode.


With bad luck came out, because we 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.

Completing the form is not a difficult process. Therefore, we suggest that you read it on the Apple website .

3. Add screenshots.

Since we have a demo application, we didn’t begin to think for a long time and just made some screenshots of the required sizes:


4. Download the assembly in iTunes Connect

This can be done using the Application Loader to download the application to iTunes Connect.

1) Open the Xcode menu and click the Open Developer Tool / Application Loader
2) Login with your Apple ID
3) Click "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, put No, as for the other two questions.

As a result, the application was spent on moderation, and we went about our business.

Trouble


After the application has gone to moderation, a notification about the rejection of the assembly may come to the post office - Binary Rejected .

1. The first rejection did not take long and literally the same day a message arrived.

We have not been able to use the iOS device.

I had to record a short demo video and put it on YouTube . The video is recorded from the screen of the mobile device and shows how this mobile application functions.

2. The second trabl, as we wrote, was associated with the icon. We set the following as a large icon:


And as small icons like this:


It turns out that you can not do this, because it misleads users.

You’re not downloaded a message from the app.

3. Deal with the icons and record a video to demonstrate the application was a short matter, and on the same day we again sent the application for moderation.

The following rejection came four days later and was, at first glance, more incomprehensible:

Your app declares support for audio in your UIBackground Modes key in your Info.

The audio key is intended to be used by the user for streaming audio apps. If you’re on the background of the UIBackModes key.

Here it is stated that our application declares audio support in UIBackground Modes, but it does not have any 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, the audio will continue to play, and this is called audio in the UIBackgroundModes , i.e. a function that is 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 working in UIBackgroundModes was on the VoIP function. Our application declared support for VoIP in the background, and the moderators suspected our application in the absence of VoIP.

Your app declares support for VoIP in the UIBackground Modes key in your Info.plist, but it doesn’t include any Voice over IP services.

Add to your UIBackgroundModes key.

We didn’t like the wording “revise your app to add VoIP features” because we would have to prove and show the moderators that we have VoIP functions and they need to work in UIBackgroundModes. Therefore, in order to speed up the process, we disabled VoIP in UIBackgroundModes, rebuilt the application and sent it back to moderation.

Disable UIBackgroundModes


To disconnect, we performed all the manipulations with the Info.plist file, which for adhoc distribution looked 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>method</key> <string>ad-hoc</string> </dict> </plist> 

After preparing it for publication in the App Store, the config began 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>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>$(PRODUCT_NAME)</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1</string> <key>LSRequiresIPhoneOS</key> <true/> <key>NSCameraUsageDescription</key> <string>Need camera access for publishing stream with video</string> <key>NSMicrophoneUsageDescription</key> <string>Need microphone for publishing stream with audio</string> <key>UIBackgroundModes</key> <array> <string>audio</string> <string>voip</string> </array> <key>UILaunchStoryboardName</key> <string>LaunchScreen</string> <key>UIMainStoryboardFile</key> <string>Main</string> <key>UIRequiredDeviceCapabilities</key> <array> <string>armv7</string> </array> <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> <key>UISupportedInterfaceOrientations~ipad</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> </dict> </plist> 

And now, after removing UIBackgroundModes, the config 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>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>$(PRODUCT_NAME)</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1.1</string> <key>LSRequiresIPhoneOS</key> <true/> <key>NSCameraUsageDescription</key> <string>Need camera access for publishing stream with video</string> <key>NSMicrophoneUsageDescription</key> <string>Need microphone for publishing stream with audio</string> <key>UIBackgroundModes</key> <array/> <key>UILaunchStoryboardName</key> <string>LaunchScreen</string> <key>UIMainStoryboardFile</key> <string>Main</string> <key>UIRequiredDeviceCapabilities</key> <array> <string>armv7</string> </array> <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> <key>UISupportedInterfaceOrientations~ipad</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> </dict> </plist> 

Hooray


A couple of days later, it was reported that our application was zaapruvili and now it has the status Ready For Sale and will soon appear in the App Store.

The following app has been approved for sale:
App Name: TwoWayStreaming
App Version Number: 1.0
App Type: iOS

As a result, the publication of the application took 1 week and required an adjustment of the following problems:


At the moment the application is available in the App Store at this link:
https://appsto.re/ru/r1MEjb.i

Now anyone can install an app and conduct tests.

We hope that this article will help with the publication of your own application with audio and video features and your application will get into the App Store much faster.

Links


Two Way Streaming for iOS - Live streaming demo for iOS
Source - source code

Two Way Streaming for Web - the same application for the Web
Source - source code

Two Way Streaming for Android is the same Android app.
Source - source code

Web Call Server - WebRTC server through which the Two Way Streaming application runs

WCS iOS SDK - a description of the build process examples in Xcode for iOS.

A selection of links to iTunes Connect


Work with icons


iTunes Connect Properties
App Distribution Guide, Adding App Icons

Create App Card (App Record)


iTunes Connect Developer Help, Add an app to your account
iTunesConnect_Guide, Creating iTunes Connect App for an App
iTunes Connect Properties

Screenshot Requirements


Screenshot Properties

Download 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

Source: https://habr.com/ru/post/328432/


All Articles