0

I have downloaded the source code of bridge from https://github.com/Microsoft/WinObjC/releases but with the help of vsimporter i can create a solution of ios project and then i can open that in visual studio, but can i open the bridge source code itself in visual studio for modifying and also in this blog https://blogs.windows.com/buildingapps/2015/08/06/windows-bridge-for-ios-lets-open-this-up/ there is mentioned like if the bridge hasn't support MPMoviePlayerController then we can create xaml mediaelement.

// WXCMediaElement is the Objective-C projection of
// Windows::UI::Xaml::MediaElement
WXCMediaElement *mediaElement = [WXCMediaElement create];
mediaElement.autoPlay = YES;
CALayer *mediaElementLayer = [CALayer layer];
[mediaElementLayer setFrame:CGRectMake(10, 10, 320, 240)];
[mediaElementLayer setContentsElement: mediaElement];
mediaElement.source = [WFUri createUri: @"ms-appx:///myvideo.mp4"];

// Now we just add the layer to be part of a UIView
 [[containingView layer] addSublayer: mediaElementLayer];

So should i modify this in bridge source code or after importing do i have to add in windows phone project source code(visual studio).

Kevin
  • 1
  • 1

1 Answers1

0

If you would like to extend the bridge (i.e., build in support for a missing API or feature), you should clone the repo directly rather than downloading a compiled release. Instructions for doing so can be found here. Please note that you will have to install Git LFS, as the project uses it for storage of large binaries.

If you're not looking to extend the bridge, but just want to try bringing your iOS project to Windows, you can just download a compiled release from the Releases page you linked to. Run the included vsimporter command line tool on your Xcode project and open the generated Visual Studio solution. Once you are editing your Objective-C code in Visual Studio, you can use XAML elements directly from Objective-C, right alongside your other iOS code. In other words, you don't have to modify the bridge at all in order to add, for instance, a XAML Media Element.

If you encounter problems, please file an issue on Github as it's the best way to get in touch with our team. Thanks for checking out the iOS bridge!

Nick Gerard
  • 141
  • 2