Share this article

Latest news

With KB5043178 to Release Preview Channel, Microsoft advises Windows 11 users to plug in when the battery is low

Copilot in Outlook will generate personalized themes for you to customize the app

Microsoft will raise the price of its 365 Suite to include AI capabilities

Death Stranding Director’s Cut is now Xbox X|S at a huge discount

Outlook will let users create custom account icons so they can tell their accounts apart easier

iOS app Pori Fashion Show becomes a Windows 10 app thanks to Windows Bridge for iOS

5 min. read

Published onApril 11, 2016

published onApril 11, 2016

Share this article

Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more

In this article

Toggle

Pori Fashion Show is a dress up children’s game created for iOS. Kids can drag and drop the clothes and accessories that they want to wear on ‘paper doll’ cartoons, save the images for sharing later, or even walk them down an animated fashion runway like top models.

This game, like many apps, was once restricted solely to iOS. Dong Yoon Park, creator of the Pori Fashion Show, is also the Senior User Experience Designer at Microsoft. As the design leader forWindows Bridge for iOS, Park decided tobring his game over to the Windows platform while re-using the existing code.

About the Game

About the Game

Pori Fashion Show uses a standard UIKit controls like UICollectionView, UIImageView, and UIButton. UILongPressGestureRecognizer and UIPanGestureRecognizer enable the drag and drop gestures in the game.

Importing the Project

Importing the Project

For developers that use a Mac, the easiest way to get started is to set up Windows 10 and Virtual Studio on a virtual machine. This will make it simpler to switch between Xcode and Visual Studio. Developers can download anevaluation virtual machineswith both Windows 10 and Visual Studio installed already on the bottom of the Windows Bridge for iOS page.

After configuring your developing environment:

Using a virtual machine will provide a shared folder feature on a network drive which Visual Studio will not allow. The easiest means to share the source code folder to Windows is to override the project’s output directory. Right-click the project, click on Properties, and change the output directory under the General menu to $(Temp)$(MSBuildProjectName)\bin$(Configuration). Please note that Temp should be an environment variable pointing to your Temp directory.

Building A Solution

At this point, clicking theBuild Solutionbutton will come up with many errors. The most common errors are caused by developers forgetting to remove the iOS-specific frameworks and libraries. Other errors might crop up from libraries that are still in active development. The Pori Fashion Show app had both, creating the need to remove the StoreKit, MessageUI, and Social frameworks and find a workaround to replace Storyboard.

For some errors, you might have to rewrite the iOS layout in the code. For most common issues, Auto-Layout Constraints can fix the problem. However, if a developer has trouble adding them, there is aProgrammatically Creating Constraintswebpage to help. In Pori Fashion Show’s case, the Auto-Layout Constraints worked just fine.

Park’s app uses standard UIKit controls with custom images. Most of the UI elements are container types that don’t have OS-specific style or UI controls with custom images. For these types, Windows Bridge for iOS will not require any changes to run the app. For UIKit controls without customization, however, the program will try to translate them into UI controls for Windows.

When your app is accessing unimplemented APIs, the console will respond with an error message “[Stubbed function called!]” or “(E_NOTIMPL)” in the output console. Even though Pori Fashion Show uses two APIs for gestures, the console only came up with a recognizer error. UILongPressGestureRecognizer is the API that makes it possible to scroll through the collection of neat clothes collection on the app.

Finding alternatives and workarounds to unimplemented APIs might take a few creative tricks. For Pori Fashion Show, this meant using the app’s other recognizer’s velocity to detect the scrolling direction instead.

Another common problem for errors is failing to use cross-platform naming conventions such as using colons in iOS while Windows does not allow it. Pori Fashion Show updated their screen capture code but now there was another problem! Saving images of the dressed up dolls caused the colors to be altered. Since Windows Bridge for iOS is under constant development, Park went back to the source. After opening an issue with WinObjC on GitHub, the team responded and fixed the issue with an updated SDK release.

Bridging the Gap

It’s best to test the shared source code in both Xcode and Visual Studio. After confirming that the code ran on both Windows and iOS, Pori Fashion Show was successfully bridged!

Bridging current iOS apps to the Windows platform is an effective way to bring your project to a new level with a larger market. Universal Windows Platform apps are capable of running across many types of devices including smart phones, tablets, laptops, desktops, and even the upcoming XBox that is still in development.

Radu Tyrsina

Radu Tyrsina has been a Windows fan ever since he got his first PC, a Pentium III (a monster at that time).

For most of the kids of his age, the Internet was an amazing way to play and communicate with others, but he was deeply impressed by the flow of information and how easily you can find anything on the web.

Prior to founding Windows Report, this particular curiosity about digital content enabled him to grow a number of sites that helped hundreds of millions reach faster the answer they’re looking for.

User forum

0 messages

Sort by:LatestOldestMost Votes

Comment*

Name*

Email*

Commenting as.Not you?

Save information for future comments

Comment

Δ

Radu Tyrsina