How to build examples using Xcode before 10¶
Preparing examples for building¶
-
Install Cocoapods to build dependencies.
-
Download the source code of the examples for Mac.
-
Download the iOS SDK
-
After unpacking, the iOS SDK is a framework in the FPWCSApi2.framework folder
-
Copy the unpacked iOS SDK (framework) to the sample folder
-
As a result, we have got the sample folder with the framework (iOS SDK). Now we can start building.
-
Run the build script and wait while all dependencies and examples are built
Building and launching examples using Xcode¶
-
Now, as soon as all dependencies are ready (thanks, cocoapods), open workspace in Xcode. Important! You should open the workspace, not the project file. Otherwise, the build may be broken.
-
If you have
Setting team
problems on step 7, try specifying the team in Xcode in the settings of each of the compiled projects. To do this, click WCSExample in the left menu. After specifying the Team, build the examples again using the script as shown on the step 6.
-
Now, we build the Media Devices example in Xcode. To do this, select Generic iOS Device in the build targets.
-
Run the build from the
Product
–Build
menu
-
If the build successfully completes, you should see the Build MediaDevices message:Succeeded
-
Connect your iPhone or iPad via the USB and select it in the targets to run the Media Devices example
-
After successful run, the debug information is displayed in the lower part. This means, the Media Devices example has been correctly installed to iPhone or iPad and is running.
-
On iPhone, you should see the interface of the application you can start testing using the WCS server
-
Connect to the server and send a video stream from the web camera to the iPhone.
-
In Xcode logs we can see the debug information.
So, we have built Media Devices on Mac OS Sierra from the source code using the iOS SDK (FPWCSApi2.framework
) and executed this example on iPhone 6 working under iOS 10.1.1. The example demonstrated successful streaming of a video through Web Call Server 5.