Skip to content
Nick Gerard edited this page Feb 23, 2016 · 33 revisions

FAQ

Here are answers to some of the most common questions we receive. This FAQ is a work in progress and will continue to be updated and expanded.

Does the bridge support ARM?

As of the 160218 release, the bridge offers preliminary support for ARM devices, so you can test and run your apps on Windows Phone. The ARM compiler is currently in the Community Technical Preview (CTP) stage and we are actively seeking feedback. If you encounter problems building and running your app using the CTP ARM compiler, please file an issue.

What's the deal with all of these stubs?

We introduced a large number of framework stubs in the 160218 release which contain headers that match the iOS 9.1 SDK. These framework stubs have stub implementations that typically return stub values (usually 0).

Reasoning

We want app developers to be able to compile, link and run their iOS apps on Windows 10 as quickly and easily as possible. Stubbing the iOS framework surface area allows developers to see where degraded functionality lies and focus their attention on the areas that need work. This is the approach we have taken internally to support apps using the Islandwood platform.

How it works

The methods and properties that are stubs have the STUB_METHOD and STUB_PROERTY macros respectively after them. For example:

GAMEPLAYKIT_EXPORT_CLASS
@interface GKNSPredicateRule : GKRule
- (instancetype)initWithPredicate:(NSPredicate*)predicate STUB_METHOD;
@property (readonly, retain, nonatomic) NSPredicate* predicate STUB_PROPERTY;
- (BOOL)evaluatePredicateWithSystem:(GKRuleSystem*)sys STUB_METHOD;
@end

If your app uses any of these methods or properties, you will get a build time warning that will give you an idea of the missing APIs you may be using. The warning will be of the sort:

Warning: method x is deprecated: it is not implemented
How to turn the warnings off

Define NO_WARN_STUBS in your project file.

How to cause build errors instead of warnings

Define NO_STUBS in your project file.

Known issues

Frameworks foundation and UIKit have some incorrect STUB_* macros in them. We are working on cleaning them up.

How do I enable syntax highlighting for Objective-C in Visual Studio?

To enable Objective-C syntax highlighting in Visual Studio, navigate to bin/ and double click objc-syntax-highlighting.

How can I use a VM on a Mac to develop a single codebase simultaneously in Visual Studio and Xcode?

If you're using the iOS bridge on a Virtual Machine on a Mac, you can easily set up a cross-platform development environment by storing your codebase in a shared folder that is accessible from both the Windows 10 and OS X side. With this approach, you can run Xcode and Visual Studio side by side. To get started, download an evaluation virtual machine for your preferred virtualization environment from our website.

Note: With this configuration, you may have to rebuild your whole solution or clean and build in Visual Studio before seeing changes made in your code (rather than Visual Studio automatically keeping track of modified files and recompiling the necessary ones). We are investigating this issue; if you encounter it, please file a bug and let us know.

Note: By default, Visual Studio will not register an app with the system if its files are on a network drive, and since folders shared with the Mac host machine in a virtual Windows 10 environment are treated as network drives, we have to change a few settings to get Visual Studio to build and run.

The easiest way to do this is to override the project's output directory. Right click on the project and change the output directory to $(Temp)\$(MSBuildProjectName)\bin\$(Configuration), where Temp is an environment variable pointing to your Temp directory.

What about accessibility?

At present, the Windows Bridge for iOS is still in development and does not yet support all the accessibility features your app might use in iOS. Accessibility is extremely important and we are working hard to ensure that future releases include this vital support. We appreciate your patience.

Why is automatic layout magnification disabled by default?

When you create a Project Islandwood application, it sets your default display resolution to match commonly used phone devices. Your application uses a display resolution of 320x480 px (points) with a scale factor of 1.0.

What has changed?

Beginning with the 160218 release, the bridge will no longer automatically magnify the scale factor to make the application fit in the window. As a result, your application may appear smaller on screen or be displayed in a variable-sized graphical frame. We have made this change to increase compatibility with applications that aren’t written to work with arbitrary scale factors.

Can I re-enable automatic magnification?

Project Islandwood is designed to be configurable. If you prefer, you can re-enable automatic magnification as the default. Simply place the following code in your app delegate file.

#ifdef WINOBJC @implementation UIApplication (UIApplicationInitialStartupMode)

//  WinObjC will call this method very early on during startup to
//  configure the application display resolution
+ (void)setStartupDisplayMode:(WOCDisplayMode*)mode {
    mode.autoMagnification = YES;
}
@end
#endif