microsoft / winobjc Goto Github PK
View Code? Open in Web Editor NEWObjective-C for Windows
License: MIT License
Objective-C for Windows
License: MIT License
I'm getting a ton of errors when trying to run my Objective-C projects. In particular, I'm getting a lot of errors with my third-party pods. So, I was wondering if pods are supported? I'm also not sure if I'm setting the pods up correctly. Should I go about installing Cocoapods and doing a pod update? I just copied the pod folder with source along with the application source and ran the vsimporter tool.
I was looking through the libraries and Core Audio is basically empty and the notes say Media Capture and Playback are still under development. Does this mean I'm going to have to wait for a bit before I begin work on making my App for Windows if CoreAudio is a major piece of it?
I get a box that says I need to install Universal Windows Platform Tools to load the sample project, after clicking "install" nothing happens....
any ideas?
And make the command line arguments the same as the real ibtool.
This class should be ported as it's very useful for iOS controls that use CALayers or CoreGraphics.
GLKit is not supported. GLKit was released with iOS 5. Many iOS application are dependent on the library.
Add options to generate mixed, pure and / or safe CIL/CLI/CLR/.net code.
Many many headers and implementation in Frameworks/Foundation are from my Cocotron project and have had the original license completely removed and replaced.
The ONE SINGLE requirement of the Cocotron MIT license is that the license text, including copyright holders, remains in the source. THAT'S IT, can you please manage to do that.
Please restore all original licensing w/ copyright holders in all derivative works.
Thanks!
The _states
array has a size of 16 (UIButton.mm:141 & 288 _states = (buttonState *) EbrCalloc(16, sizeof(buttonState));
).
However, in setImage:forState
the range check is wrong:
-(void) setImage:(UIImage*)image forState:(UIControlState)state {
if ( state > 16 ) {
EbrDebugLog("setImageState: bad mask %x\n", state);
return;
}
assert(state < 16);
_states[state].image = image;
[self setNeedsDisplay];
[self setNeedsLayout];
setImageProperties(self);
}
The check should be if ( state >= 16 )
to avoid running into the assertion. The assertion is then unnecessary.
The other methods dealing with states passed by the user (lines 326 โ 387) don't have any range checks, only assertions. These methods should all handle those cases consistently: either all should only do the assertions, or all should do the graceful checks and simply return.
Providing a macro to do these checks might be a good idea.
I'm getting the above error when converting a project that depends on some libraries. Which UUID would this be referring to?
The implemented methods only declare assertions thats will always fail.
Right now it seems there are no conventions for code style. Different sources are formatted differently, it order to have a coherent look for all sources it' proposed to choose of the options:
and follow them by using git pre-commit hooks driven by clang-format. The styles from the list are supported out of the box.
I have an experience with setting this infrastructure up, so I am ready to proceed with re-formatting and adding the mentioned hooks. What I need is the decision which code style is to use.
Please ensure conformance to Clang C/C++/Objective C
I use winobjc prebuilt tool to convert to winstore10 project successfully, but compile the project have a error : CoreFoundation/CoreFoundation.h(11,10): fatal error : 'sys/types.h' file not found
It would be great if you could publish a roadmap, what's a priority for the team and what areas you're looking for the community to contribute.
The model used by the TypeScript team (and others) seems to work well, where GH issues are tagged as "accepting PRs" and a roadmap is published and kept to the date.
I'm curious about the use of mDNS, as many iOS apps use either the dns_sd.h header directly, or some other API on top of it (usually Apple's).
Apple does have a Bonjour SDK for Windows already, and the source code is available under the Apache 2.0 license.
My highlighting is working well but I have no intellisense.
When I run vsimporter on a project with libraries, the resulting solution has a single Windows Store app, the dependent libraries in all one solution. That's great.
But I'm a little confused about the conversion process. The libraries are set-up as .lib outputs, but the main executable has a reference to them as assemblies.
The problem is that the solution won't compile the dependent libraries. I'm seeing errors about missing .tlh files - which it seems to expect to see for each #import
.
Are libraries supported at the moment?
I have created a very basic Xcode project with a single Xib file containing a UIView with several text fields and a button. I'm not using Auto Layout or Storyboards.
In my AppDelegate I'm instantiating the corresponding View Controller and add it to my Navigation Controller.
This works fine on iOS but the only thing I get when importing the project into Visual Studio is the Navigation Controller's title - everything else is black when running on Windows 10.
I have verified that my View Controller at least gets loaded by putting a breakpoint in the viewDidLoad method which indeed gets hit.
The WOCCatalog sample works fine but I have noticed there are no Xibs included in this project.
So my question is, are Xibs (even with limitations, like no Auto Layout) supported at this stage?
When trying to use NSSecureCoding VS throws the
error cannot find protocol declaration for 'NSSecureCoding'
I was wondering if Core Data is supported? I don't see the Core Data Framework in the WinObjC project files, but I do see a generated Window's sqllite db. How is Core Data being handled?
iOS developer already made some investment in hardware/software would be nice if have a native OSX support.
Wanted to go ahead and get an issue created for this. Our app is pretty much 100% auto layout based, there's about zero chance we could port any UI code without this support.
After using vsimporter, the sln is created but not compiled due to an error in CLANG file. I've followed the steps in wiki but still can't compile it. Acutally I can't apply this following step: https://github.com/Microsoft/WinObjC/wiki#item-type
thanks
While importing my project, which is managed by CocoaPods, the vsimporter failed to find targets in Pods project and some build phases in targets generated by CocoaPods are unsupported and ignored as well. Considering that CocoaPods is quite popular in the community, it would be great if a specific support for CocoaPods is provided in WinObjC.
I would like to see an ability to build Windows Runtime components that can be used from any supported language using the existing Objective-C code. This would make possible for Objective-C devs spending as little effort building Windows Runtime components using the existing code as possible.
For now, there is only info on how to use Windows Runtime APIs from Objective-C code, but there is nothing I can find regarding how Objective-C code can be used from C++/CX. Building Windows Runtime components could be achieved in two ways: building the ability to create WinRT components into Objective-C compiler and linker, and/or enabling interoperability between C++/CX and Obj-C code so WinRT components could be built using C++/CX that imports Obj-C functions.
Also consider the ability to use custom WinRT components written in any WinRT language (C++, C#, etc.) from Objective-C code.
in AppDelegate.m file, I write those code,
the objc-syntax-highlighting is impossible to install in vs enterprise but apparently only install in vs 2015 professional.
I installed VS 2015 Community Edition along with the mentioned tools. After that, I downloaded WinObjc and opened the WOCCatalog solution file. The project doesn't have any syntax highlighting. I
ran the tool objc-syntax-highlighting present inside /bin folder. The tool failed to install with error "This extension is not installable on any currently installed products."
09-08-2015 12.42.41 PM - Microsoft VSIX Installer
09-08-2015 12.42.41 PM - -------------------------------------------
09-08-2015 12.42.41 PM - Initializing Install...
09-08-2015 12.42.41 PM - Extension Details...
09-08-2015 12.42.41 PM - Identifier : VSIX..9c35fff1-f084-44c1-a38e-68c707163aa2
09-08-2015 12.42.41 PM - Name : Objective-C Language Service
09-08-2015 12.42.41 PM - Author : Microsoft
09-08-2015 12.42.41 PM - Version : 1.0
09-08-2015 12.42.41 PM - Description : This package contains Objective-C language service components such as syntax higlighting etc
09-08-2015 12.42.41 PM - Locale : en-US
09-08-2015 12.42.41 PM - MoreInfoURL :
09-08-2015 12.42.41 PM - InstalledByMSI : False
09-08-2015 12.42.41 PM - SupportedFrameworkVersionRange : [4.5,)
09-08-2015 12.42.41 PM -
09-08-2015 12.42.41 PM - Supported Products :
09-08-2015 12.42.41 PM - Microsoft.VisualStudio.Pro
09-08-2015 12.42.41 PM - Version : [12.0]
09-08-2015 12.42.41 PM -
09-08-2015 12.42.41 PM - References :
09-08-2015 12.42.41 PM -
09-08-2015 12.42.41 PM - Searching for applicable products...
09-08-2015 12.42.41 PM - Found installed product - Microsoft Visual Studio Community 2015
09-08-2015 12.42.41 PM - Found installed product - Microsoft Visual Studio 2015 Shell (Integrated)
09-08-2015 12.42.41 PM - Found installed product - Global Location
09-08-2015 12.42.41 PM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
at VSIXInstaller.App.InitializeInstall(Boolean isRepairSupported)
at VSIXInstaller.App.InitializeInstall()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
I'm getting a ton of errors when trying to run my Objective-C projects. In particular, I'm getting a lot of errors with my third-party pods. So, I was wondering if pods are supported? I'm also not sure if I'm setting the pods up correctly. Should I go about installing Cocoapods and doing a pod update? I just copied the pod folder with source along with the application source and ran the vsimporter tool.
I'm seeing errors that OpenGLES.lib is missing. I can see libGLESv2.lib as a prebuild dependency. Am I missing a pre-req?
I'm pulling down the submodules, but one seems missing: https://github.com/Microsoft/PlistCpp.git
Maybe this needs opening up too?
While trying to compile the Apple iOS sample GLGravity the OpenGL functions glMaterialf and glMaterialfv seems to be not supported.
GLGravityView_D4D7D164.obj : error LNK2019: unresolved external symbol _glMaterialfv referenced in function __i_GLGravityView__setupView
GLGravityView_D4D7D164.obj : error LNK2019: unresolved external symbol _glMaterialf referenced in function __i_GLGravityView__setupView
People rely on arc4random being a cryptographically secure source of random numbers.
The implementation in CFMisc.mm is just calling rand() a few times which is pretty terrible.
It should instead use a real cryptographic PRNG algorithm and be seeded from some kind of reliable source of random data. Either implement it properly or at least call an equivalent windows API for some secure random numbers.
When you have code such as the following, should the __bridge cast be supported?
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"path"];
animation.duration = _progressAnimationDuration;
animation.timingFunction = [CAMediaTimingFunction functionWithName:_progressAnimationTimingFunction];
animation.fromValue = (__bridge id) oldPath;
animation.toValue = (__bridge id) path;
[_progressShape addAnimation:animation forKey:@"animatePath"];
When I run vsimporter
with -loglevel debug
all I get before the crash is: [W] Ignoring unsupported PBXHeadersBuildPhase in "Plugins" target.
I'm running version 1.0 (2627d23)
.
Unfortunately I can't share my Xcode project. Is there a way to get more information to diagnose?
Thanks!
The compiler does not support kNilOptions. Aside this is not widely used it would be nice if it would not be necessary to replace this with nil :)
I'm curious why the team didn't adopt any of the existing code from Apple's open source libraries? Specifically things like libdispatch
, libobjc
, and CoreFoundation
are available and have Windows #ifdefs in them since that's how iTunes & co run on Windows. Then you'd have 100% compatibility at those layers.
sysctlbyname() does not check the destination buffer size. See the sysctl(3) manual page for correct behaviour.
The objc-syntax-highlighting Extension currently only supports VS 12. It should also support higher versions.
This is more like a suggestion than an issue.
I would like to see an ability to build Windows Runtime components that can be used from any supported language and that can use existing iOS libraries.
I'm a C# developer, and the company I work for uses Flurry Analytics in mobile apps. I'm building mobile apps for Windows and Windows Phone, and recently I learned that Flurry doesn't support Windows Runtime SDK anymore. This issue could be easily solved with Windows iOS Bridge by just using Flurry's iOS SDK and wrapping it up in a Windows Runtime component.
I believe there are many other examples of such an application for iOS Bridge.
Windows Runtime components are discussed in issue #20
I was just reading some of the code and came across this bug.
In WinObjC-master/Frameworks/CoreGraphics/CGGraphicBufferImage.mm
https://github.com/Microsoft/WinObjC/blob/master/Frameworks/CoreGraphics/CGGraphicBufferImage.mm
Line 262:
This code:
case _Color565: {
WORD srcPixel = *(((WORD *) LockImageData()) + (Height() - y - 1) * (BytesPerRow() >> 1) + x);
ReleaseImageData();
r = ((float) (srcPixel & 0x1F)) / 32.0f;
g = (float) ((srcPixel >> 5) & 0x3F) / 64.0f;
b = (float) ((srcPixel >> 11) & 0x1F) / 32.0f;
a = 1.0f;
}
break;
Should probably look like this:
case _Color565: {
WORD srcPixel = *(((WORD *) LockImageData()) + (Height() - y - 1) * (BytesPerRow() >> 1) + x);
ReleaseImageData();
r = ((float) (srcPixel & 0x1F)) / 31.0f;
g = (float) ((srcPixel >> 5) & 0x3F) / 63.0f;
b = (float) ((srcPixel >> 11) & 0x1F) / 31.0f;
a = 1.0f;
}
break;
0x1F == 31.0
and
0x3F == 63.0
JSVirtualMachine etc?
Is it possible to support Swift also in a similar way?
I noticed there is a syntax highlighting plugin, but as someone who's more familiar with Xcode, I haven't been able to get it working. Online I read double clicking it should work, but I'm getting no response in VS2015 when I do that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.