-
Notifications
You must be signed in to change notification settings - Fork 806
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.
- I'm getting errors after downloading the bridge through the "Download ZIP" button on Github. What should I do?
- What kind of telemetry does the iOS bridge collect?
- How does the bridge handle automatic magnification?
- Does the bridge support ARM?
- What's the deal with all of these stubs?
- How do I enable syntax highlighting for Objective-C in Visual Studio?
- How can I use a VM on a Mac to develop a single codebase simultaneously in Visual Studio and Xcode?
- What about accessibility?
I'm getting errors after downloading the bridge through the "Download ZIP" button on Github. What should I do?
There are two ways to install the bridge:
- Download one of the precompiled release .zip packages from the releases page.
- Download the complete source via
git clone https://github.com/Microsoft/WinObjC.git
.
Installing the bridge using one of the precompiled releases is simple; just follow the instructions on our Getting Started page.
If you would like to build the bridge from source – meaning you downloaded the complete repo using git
– you must install Git LFS. We use Git LFS to manage the storage of large binaries that are part of the source code repo. For instructions on how to install Git LFS, please see our Building From Source wiki page.
NOTE: If you download the repo using the "Download ZIP" button on the main repo page, you will get errors building the project. Please use either one of the precompiled release builds or build from source using git
.
Beginning with the 160304 release, we are capturing some data from Visual Studio users who have opted in to sharing telemetry with Microsoft in order to gain insight into the issues our developers are facing. We are doing this in two ways: first, through the Objective-C syntax-highlighting VSIX Visual Studio extension, and second by instrumenting Xib2Nib and vsimporter using ApplicationInsights.
Capturing build issues directly from Visual Studio allows our team to identify, understand, prioritize and fix the top issues facing our developer community.
Yes. Data will only be collected via the VSIX if you chose to share telemetry with Microsoft when you installed Visual Studio.
To disable ApplicationInsights telemetry logging for Xib2Nib, add the DisableTracking value to the AppInsights registry key for a given app:
[HKEY_CURRENT_USER\SOFTWARE\AppInsights\AIF-47606e3a-4264-4368-8f7f-ed6ec3366dca]
"DisableTracking"=dword:00000000; actual value is ignored.
To reenable, simply delete the DisableTracking value.
Using regular expressions, we carefully filter out all personally-identifiable information, including:
- User IDs
- Local and network paths and filenames
- Protocol handlers with paths
- Any messages that do not match WinObjC types AND contain one of the following strings: "method", "class", "property", "interface", or "namespace"
In other words, the only data we collect are specifically related to bridge features or unimplemented APIs and have been stripped of personal identifiers.
Xib2Nib uses ApplicationInsights to log start/stop events as well as any unrecognized tags and unsupported classes encountered.
As part of our development of Project Islandwood, we have reversed some recent changes to automatic magnification. By default, Project Islandwood enables auto magnification which will automatically size your screen content to the size of the window.
To preserve the best layout experience for iOS developers porting their applications to Windows, the Windows Bridge for iOS uses the native scale of your device to render the layout of your application. The scale reported back to your application is automatically scoped (or clamped) to a value of 1 or 2. In this way you get the best possible layout being displayed without any additional efforts. You can enable or disable this feature if desired.
This capability is determined by the following WOCDisplayMode properties set in the +setStartupDisplayMode category of UIApplication (UIApplicationInitialStartupMode):
useHostScaleFactor
: Enables/disables the use of? the native scale.
clampScaletoClosestExpected
: Clamps the magnification to the closest value for native scale - 1 or 2.
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.
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).
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.
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
Define NO_WARN_STUBS in your project file.
Define NO_STUBS in your project file.
The Foundation and UIKit frameworks have some incorrect STUB_* macros in them. We are working on cleaning them up.
To enable Objective-C syntax highlighting in Visual Studio, navigate to bin/ and double click objc-syntax-highlighting.
Note: If you chose to share telemetry with Microsoft when you installed Visual Studio, enabling syntax highlighting will also turn on telemetry sharing with the Windows Bridge for iOS team. Capturing build issues directly from Visual Studio allows our team to identify, understand, prioritize and fix the top issues facing our developer community. For more information, see "What kind of telemetry does the iOS bridge collect" above.
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.
Warning: 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.
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.
Project
Using the bridge
- Getting Started
- Using vsimporter
- Using the SDK
- Building From Source
- Adding Objective C to an Existing Project
- UI Guidance
- Changing the SDK Version of a Project
- Debugging
- Debugging Stack Traces from Crash Dumps
- Supported Third Party Libraries
- Creating and Linking Against C++ Static Libraries
- Packaging
Samples and Tutorials
- Quick Start Tutorial
- Building a To-Do List App
- Building a Calculator App
- Mixing and Matching UIKit and XAML
- IOS Bridge Samples Repo
Contributing
Links