Giter Club home page Giter Club logo

mac-samples's Introduction

Mac Samples

Sample code for Xamarin's C# APIs to develop Mac applications. Visit the Mac Sample Gallery to download individual samples.

License

The Apache License 2.0 applies to all samples in this repository.

Copyright 2011 Xamarin Inc

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Samples Submission Guidelines

Galleries

We love samples! Application samples show off our platform and provide a great way for people to learn our stuff. And we even promote them as a first-class feature of the docs site. You can find our sample galleries here:

Sample GitHub Repositories

These sample galleries are populated by samples in these GitHub repos:

The mobile-samples repository is for samples that are cross-platform. The mac-ios-samples repository is for samples that are Mac/iOS only.

Sample Requirements

We welcome sample submissions, please start by creating an issue with your proposal.

Because the sample galleries are powered by the github sample repos, each sample needs to have the following things:

  • Screenshots - a folder called Screenshots that has at least one screen shot of the sample on each platform (preferably a screen shot for every page or every major piece of functionality). For an example of this, see HeartRateMonitor.

  • Readme - a README.md file that explains the sample, and contains metadata to help customers find it. For an example of this, see HeartRateMonitor. The README file should begin with a YAML header (delimited by ---) with the following keys/values:

    • name - must begin with Xamarin.Mac -

    • description - brief description of the sample (< 150 chars) that appears in the sample code browser search

    • page_type - must be the string sample.

    • languages - coding language/s used in the sample, such as: csharp, fsharp, vb, objc

    • products: should be xamarin for every sample in this repo

    • urlFragment: although this can be auto-generated, please supply an all-lowercase value that represents the sample's path in this repo, except directory separators are replaced with dashes (-) and no other punctuation.

    Here is a working example from HeartRateMonitor README raw view.

    ---
    name: Xamarin.Mac - HeartRateMonitor
    description: The CoreBluetooth framework provides the classes needed for your iOS and Mac apps to communicate with devices that are equipped with Bluetooth low...
    page_type: sample
    languages:
    - csharp
    products:
    - xamarin
    urlFragment: heartratemonitor
    ---
    # Heading 1
    
    rest of README goes here, including screenshot images and requirements/instructions to get it running

    NOTE: This must be valid YAML, so some characters in the name or description will require the entire string to be surrounded by " or ' quotes.

  • Buildable solution and .csproj file - the project must build and have the appropriate project scaffolding (solution + .csproj files).

This approach ensures that all samples integrate with the Microsoft sample code browser.

A good example of this stuff is here in the HeartRateMonitor

For a cross-platform sample, please see: https://github.com/xamarin/mobile-samples/tree/master/Tasky

GitHub Integration

We integrate tightly with Git to make sure we always provide working samples to our customers. This is achieved through a pre-commit hook that runs before your commit goes through, as well as a post-receive hook on GitHub's end that notifies our samples gallery server when changes go through.

To you, as a sample committer, this means that before you push to the repos, you should run the "install-hook.bat" or "install-hook.sh" (depending on whether you're on Windows or macOS/Linux, respectively). These will install the Git pre-commit hook. Now, whenever you try to make a Git commit, all samples in the repo will be validated. If any sample fails to validate, the commit is aborted; otherwise, your commit goes through and you can go ahead and push.

This strict approach is put in place to ensure that the samples we present to our customers are always in a good state, and to ensure that all samples integrate correctly with the sample gallery (README.md, Metadata.xml, etc). Note that the master branch of each sample repo is what we present to our customers for our stable releases, so they must always Just Work.

Should you wish to invoke validation of samples manually, simply run "validate.windows" or "validate.posix" (again, Windows vs macOS/Linux, respectively). These must be run from a Bash shell (i.e. a terminal on macOS/Linux or the Git Bash terminal on Windows).

If you have any questions, don't hesitate to ask!

mac-samples's People

Contributors

aarononeal avatar abock avatar amitgosavi1 avatar ashokgelal avatar baulig avatar chamons avatar conceptdev avatar dalexsoto avatar dependabot[bot] avatar dylankelly5 avatar gourikumari avatar jgold6 avatar joelmartinez avatar kjpou1 avatar kmullins-xam avatar mandel-macaque avatar manish avatar mhutch avatar migueldeicaza avatar mjh4 avatar mykyta-bondarenko avatar nschonni avatar olegoid avatar profexorgeek avatar rolfbjarne avatar rsarwas avatar spouliot avatar timeyoutakeit avatar timrisi avatar whitneyschmidt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mac-samples's Issues

Creating a custom view in XCode and then adding instances programmatically to my main application

I have a case where I will have repeating multiple square size instances of the same set of form components. Almost like 8 or more small view forms in a grid pattern.

I can either create 8 or more instances manually in my form or what I'd rather do is create a view (or Item Renderer) and then dynamically add instances of that view to my main view.

How do I add a create and add a custom view dynamically to the main view in my xamarin form?

If IIUC:

  • Create a view in XCode Interface Builder
  • In ViewDidLoad create an instance of the custom instance views
    = Add each instance to the main view
  • I'd read a guide if there was one but I can't find anything specifically on this.

Here's the original post with code examples. I can copy the code samples over if thats helpful:

https://stackoverflow.com/questions/67586420/how-to-add-a-custom-view-dynamically-to-a-view-in-visual-studio-for-mac-c-sharp

Villian Tracker throws exception when running

Running code directly as downloaded via git...

System.InvalidOperationException: Event registration is overwriting existing delegate. Either just use events or your own delegate: VillainTracker.VillainTrackerAppDelegate AppKit.NSTextView+_NSTextViewDelegate
  at AppKit.NSApplication.EnsureEventAndDelegateAreNotMismatched (System.Object del, System.Type expectedType) [0x0001e] in /Library/Frameworks/Xamarin.Mac.framework/Versions/6.10.0.21/src/Xamarin.Mac/AppKit/NSApplication.cs:112
  at AppKit.NSText.EnsureNSTextDelegate () [0x0000e] in /Library/Frameworks/Xamarin.Mac.framework/Versions/6.10.0.21/src/Xamarin.Mac/NSText.g.cs:1346
  at AppKit.NSText.add_TextDidChange (System.EventHandler value) [0x00001] in /Library/Frameworks/Xamarin.Mac.framework/Versions/6.10.0.21/src/Xamarin.Mac/NSText.g.cs:1424
  at VillainTracker.VillainTrackerAppDelegate.DidFinishLaunching (Foundation.NSNotification notification) [0x000a6] in /Users/xxx/Documents/git/github/xamarin/mac-samples/VillainTracker/VillainTrackerAppDelegate.cs:44
  at at (wrapper managed-to-native) AppKit.NSApplication.NSApplicationMain(int,string[])
  at AppKit.NSApplication.Main (System.String[] args) [0x00040] in /Library/Frameworks/Xamarin.Mac.framework/Versions/6.10.0.21/src/Xamarin.Mac/AppKit/NSApplication.cs:100
  at VillainTracker.MainClass.Main (System.String[] args) [0x00007] in /Users/xxx/Documents/git/github/xamarin/mac-samples/VillainTracker/Main.cs:10

Info:
=== Visual Studio Community 2019 for Mac ===

Version 8.4.7 (build 17)
Installation UUID: d56cff6d-be04-4625-939b-dea274d49168
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.16.1.25 (issue-7441-d16-3-vsmac / 881172e73)

Package version: 606000166

=== Mono Framework MDK ===

Runtime:
Mono 6.6.0.166 (2019-08/d9001b5ae70) (64-bit)
Package version: 606000166

=== Roslyn (Language Service) ===

3.4.0-beta4-19562-05+ff930dec4565e2bc424ad3bf3e22ecb20542c87d

=== NuGet ===

Version: 5.3.0.6192

=== .NET Core SDK ===

SDK: /usr/local/share/dotnet/sdk/3.1.102/Sdks
SDK Versions:
3.1.102
3.1.101
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.6.0/lib/mono/msbuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
3.1.2
3.1.1
2.1.15

=== Xamarin.Profiler ===

Version: 1.6.13.11
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 11.3.1 (15715)
Build 11C504

=== Xamarin.Android ===

Version: 10.1.3.7 (Visual Studio Community)
Commit: xamarin-android/d16-4/d66aed0
Android SDK: /Users/xxx/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
None installed

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 29.0.4
SDK Build Tools Version: 28.0.3

Build Information:
Mono: fd9f379
Java.Interop: xamarin/java.interop@c4e569f
ProGuard: xamarin/proguard@905836d
SQLite: xamarin/sqlite@46204c4
Xamarin.Android Tools: xamarin/xamarin-android-tools@9f4ed4b

=== Microsoft Mobile OpenJDK ===

Java SDK: /Users/xxx/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.4.0.10
Hash: 2c49a7d
Branch: remotes/origin/d16-4
Build date: 2020-02-20 19:25:52 UTC

=== Android Device Manager ===

Version: 16.4.0.32
Hash: 7a5cb8b
Branch: remotes/origin/d16-4
Build date: 2020-02-20 19:26:14 UTC

=== Xamarin Designer ===

Version: 16.4.0.479
Hash: 074544417
Branch: remotes/origin/d16-4
Build date: 2020-01-22 22:50:22 UTC

=== Xamarin.Mac ===

Version: 6.10.0.21 (Visual Studio Community)
Hash: 02c4b3bdc
Branch: xcode11.3
Build date: 2020-02-18 14:13:31-0500

=== Xamarin.iOS ===

Version: 13.10.0.21 (Visual Studio Community)
Hash: 02c4b3bdc
Branch: xcode11.3
Build date: 2020-02-18 14:13:32-0500

=== Xamarin Inspector ===

Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 804070017
Git revision: 35c9b9b9315ec81feec25ebabe131761b304257d
Build date: 2020-02-21 16:06:09+00
Build branch: release-8.4
Xamarin extensions: 35c9b9b9315ec81feec25ebabe131761b304257d

=== Operating System ===

Mac OS X 10.15.3
Darwin 19.3.0 Darwin Kernel Version 19.3.0
Thu Jan 9 20:58:23 PST 2020
root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64

invalidOperationException

MasterWindowController.cs

throw exception code

Window.DidResize += (sender, e) => {
				// Do something as the window is being live resized
			};

			Window.DidEndLiveResize += (sender, e) => {
				// Do something after the user's finished resizing
				// the window
			};

exception

System.InvalidOperationException: Event registration is overwriting existing delegate. Either just use events or your own delegate: MacWindows.MasterWindowController AppKit.NSWindow+_NSWindowDelegate
  at AppKit.NSApplication.EnsureEventAndDelegateAreNotMismatched (System.Object del, System.Type expectedType) [0x0001e] in /Library/Frameworks/Xamarin.Mac.framework/Versions/6.6.0.12/src/Xamarin.Mac/AppKit/NSApplication.cs:112
  at AppKit.NSWindow.EnsureNSWindowDelegate () [0x0000e] in /Library/Frameworks/Xamarin.Mac.framework/Versions/6.6.0.12/src/Xamarin.Mac/NSWindow.g.cs:11408
  at AppKit.NSWindow.add_DidResize (System.EventHandler value) [0x00001] in /Library/Frameworks/Xamarin.Mac.framework/Versions/6.6.0.12/src/Xamarin.Mac/NSWindow.g.cs:12068
  at MacWindows.MasterWindowController.WindowDidLoad () [0x00008] in /Users/anglehuang/Downloads/Xamarin_Mac___MacWindows/MacWindows/MasterWindowController.cs:21
  at at (wrapper managed-to-native) AppKit.NSApplication.NSApplicationMain(int,string[])
  at AppKit.NSApplication.Main (System.String[] args) [0x00040] in /Library/Frameworks/Xamarin.Mac.framework/Versions/6.6.0.12/src/Xamarin.Mac/AppKit/NSApplication.cs:100
  at MacWindows.MainClass.Main (System.String[] args) [0x00007] in /Users/anglehuang/Downloads/Xamarin_Mac___MacWindows/MacWindows/Main.cs:10

DragAndDropExample Crashes on MacOS

The Drag and Drop example application is non-functional on MacOS.

  1. Run the app
  2. Click in the left/red source rectangle -> will crash

Is there a known work-around for this?

[CameraBrowser] Application incompatible with Ventura update

After recently updating to macOS Ventura 13.2 (22D49), there have been a number of issues running the Camera Browser application. The app runs successfully with no issues on macOS Monterey (12.3.1), which makes me think the Ventura update is the culprit.

Key issues:

  • Thumbnails: After opening a session, the corresponding names and size values of the files appear in the table but the thumbnails do not. Wondering if this could be due to the api not working properly on the Ventura upgrade.
  • Unexpected crashes: The app tends to crash at some point after opening a session/upon closing a session.

Ref: example crash report

[XM]Various options of NSVisualEffectView gives a System.Exception while executing VisualEffectPlayground on Mojave

From @GouriKumari on September 21, 2018 16:20

Steps to Reproduce

  1. Install Xamarin.Mac, Version: 4.99.3.741 (Visual Studio Community), Hash: eeca0b87 on Mojave
  2. Execute VisualEffectPlayground
  3. Click on BasicSideBar+Images or Text

Expected Behavior

Correct view should display

Actual Behavior

Getting an exception .
Exception Log: https://gist.github.com/GouriKumari/7fd46c3d48b5bb37036dd59054ea421d

Environment

Test Env:https://gist.github.com/GouriKumari/abed951b2b807632973a0c2ae6ad7767
Both with Xcode10 and Xcode10.1
This issue occurs with XM build with Xcode10 support and XM stable + Mojave.
This issue didn't occur with XM stable build or XM with Xcode10 support on HighSierra

Build Logs

Build Log: https://gist.github.com/GouriKumari/8d39c2c71df974e552007536ff613094
Application Output: https://gist.github.com/GouriKumari/51632b6244273d8b3871aac21b4c46e9

Copied from original issue: xamarin/xamarin-macios#4863

MacCopyPast Error : must implement new interface

Hello,

I had an error with the MacCopyPast project : the interface NSSecureCoding must be implemented on ImageInfo for Copy/Past operations.

You juste have to :

  • Add INSSecureCoding to the class declaration
  • Add this property
    [Export("supportsSecureCoding")] public static bool SupportsSecureCoding => true;
    Et voilà ;-)

Build failed: Undefined symbol error

My build fails and I receive the following error when compiling. This occurs during the Link HeartRateMonitor (x86_64) step. Can anybody help me resolve this issue? Thanks. I'm using VS 8.9.8 and Xcode 12.5.

Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Extend Xamarin.Mac - MacDialog sample by calling a dialog

Hello.
I find the Xamarin.Mac - MacDialog sample very interesting, but it uses a single window. I would like to call another window (as I can call the OpenfileDialog for example), but I do not find any help on the Net. Can anyone give me a link or a code sample ?
Thank you,
Gilbert

MacControls unsafely handling controlers in ReplaceViewSeque

As noted here: https://forums.xamarin.com/discussion/comment/327038 our MacControls sample behaves poorly after a garbage collection.

The root of the problem appears to be ReplaceViewSeque.Perform which grabs out the DestinationController's view and shoves that into the visual tree without holding onto the controller.

When the GC happens, possibly caused by GC.Collect (2) the controller is eligible for collection, as the NSView doesn't force it to be around.

The sample needs to be updated to have the SourceController hold onto the DestinationController if we're going to use this structure.

SceneKitViewer not running

A System.Exception is thrown at run-time:

System.Exception: Could not initialize an instance of the type 'Foundation.NSUrl': the native 'initWithString:' method returned nil.
It is possible to ignore this condition by setting MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure to false.
at Foundation.NSObject.InitializeHandle (System.IntPtr handle, System.String initSelector) [0x000ad] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/Foundation/NSObject2.cs:465
at Foundation.NSUrl..ctor (System.String urlString) [0x00047] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/build/mac/mobile/Foundation/NSUrl.g.cs:355
at SceneKitViewer.SceneView.LoadScene (System.String path) [0x00001] in /Volumes/Macintosh HD/Users/ddiogo/Developer/Xamarin/Projects/Mac/Xamarin Mac Samples/SceneKitViewer/SceneView.cs:44
at SceneKitViewer.MyDocument.WindowControllerDidLoadNib (AppKit.NSWindowController windowController) [0x00079] in /Volumes/Macintosh HD/Users/ddiogo/Developer/Xamarin/Projects/Mac/Xamarin Mac Samples/SceneKitViewer/MyDocument.cs:50
at at (wrapper managed-to-native) AppKit.NSApplication:NSApplicationMain (int,string[])
at AppKit.NSApplication.Main (System.String[] args) [0x00041] in /Users/builder/data/lanes/5489/c4240f3f/source/xamarin-macios/src/AppKit/NSApplication.cs:100
at SceneKitViewer.AppDelegate.Main (System.String[] args) [0x00007] in /Volumes/Macintosh HD/Users/ddiogo/Developer/Xamarin/Projects/Mac/Xamarin Mac Samples/SceneKitViewer/Main.cs:23

guiunit-example: Failed to create Test.app bundle

Hi,
For me this sample doesn't work. I'am trying to run it on macOS Mojave.
The compilations seems to work but when trying to create the Test.app bundle, it fails.

Run: make run

Output:
guiunit-example ciprian-ionut.holbia$ make run
mkdir obj
if [ ! -d "obj/guiunit" ]; then git clone https://github.com/mono/guiunit.git obj/guiunit; fi
Cloning into 'obj/guiunit'...
remote: Counting objects: 1084, done.
remote: Total 1084 (delta 0), reused 0 (delta 0), pack-reused 1084
Receiving objects: 100% (1084/1084), 1.74 MiB | 1.47 MiB/s, done.
Resolving deltas: 100% (647/647), done.
xbuild obj/guiunit/src/framework/GuiUnit_NET_4_5.csproj

xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<

XBuild Engine Version 14.0
Mono, Version 5.12.0.0
Copyright (C) 2005-2013 Various Mono authors

Build started 10/8/2018 12:58:56 PM.


Project "/Users/ciprian-ionut.holbia/Downloads/guiunit-example/obj/guiunit/src/framework/GuiUnit_NET_4_5.csproj" (default target(s)):
Target PrepareForBuild:
Configuration: Debug Platform: AnyCPU
Created directory "../../bin/net_4_5/"
Created directory "../../bin/Debug/net-4.5/"
Target GenerateSatelliteAssemblies:
No input files were specified for target GenerateSatelliteAssemblies, skipping.
Target CoreCompile:
Tool /Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5/csc.exe execution started with arguments: /noconfig /debug:full /debug:portable /keyfile:guiunit.snk /publicsign /optimize- /out:obj/Debug/net-4.5/GuiUnit.exe Api/ExpectedExceptionData.cs Api/FailureSite.cs Api/IParameterDataSource.cs Api/IPropertyBag.cs Api/ITest.cs Api/ITestAssemblyBuilder.cs Api/ITestAssemblyRunner.cs Api/ITestCaseData.cs Api/ITestCaseSource.cs Api/ITestFilter.cs Api/ITestListener.cs Api/ITestResult.cs Api/IXmlNodeBuilder.cs Api/PropertyEntry.cs Api/ResultState.cs Api/RunState.cs Api/TestOutput.cs Api/TestStatus.cs Api/XmlNode.cs AssemblyInfo.cs Assert.cs AssertionHelper.cs Assume.cs Attributes/CategoryAttribute.cs Attributes/CombinatorialAttribute.cs Attributes/CultureAttribute.cs Attributes/DataAttribute.cs Attributes/DatapointAttribute.cs Attributes/DatapointsAttribute.cs Attributes/DatapointSourceAttribute.cs Attributes/DescriptionAttribute.cs Attributes/ExpectedExceptionAttribute.cs Attributes/ExplicitAttribute.cs Attributes/IgnoreAttribute.cs Attributes/IncludeExcludeAttribute.cs Attributes/MaxTimeAttribute.cs Attributes/NUnitAttribute.cs Attributes/PairwiseAttribute.cs Attributes/PlatformAttribute.cs Attributes/PropertyAttribute.cs Attributes/RandomAttribute.cs Attributes/RangeAttribute.cs Attributes/RepeatAttribute.cs Attributes/SequentialAttribute.cs Attributes/SetCultureAttribute.cs Attributes/SetUICultureAttribute.cs Attributes/SetUpAttribute.cs Attributes/TearDownAttribute.cs Attributes/TestAttribute.cs Attributes/TestCaseAttribute.cs Attributes/TestCaseSourceAttribute.cs Attributes/TestFixtureAttribute.cs Attributes/TestFixtureSetUpAttribute.cs Attributes/TestFixtureTearDownAttribute.cs Attributes/TheoryAttribute.cs Attributes/TimeoutAttribute.cs Attributes/ValuesAttribute.cs Attributes/ValueSourceAttribute.cs Constraints/AllItemsConstraint.cs Constraints/AndConstraint.cs Constraints/AssignableFromConstraint.cs Constraints/AssignableToConstraint.cs Constraints/AttributeConstraint.cs Constraints/AttributeExistsConstraint.cs Constraints/BasicConstraint.cs Constraints/BinaryConstraint.cs Constraints/BinarySerializableConstraint.cs Constraints/CollectionConstraint.cs Constraints/CollectionContainsConstraint.cs Constraints/CollectionEquivalentConstraint.cs Constraints/CollectionItemsEqualConstraint.cs Constraints/CollectionOrderedConstraint.cs Constraints/CollectionSubsetConstraint.cs Constraints/CollectionTally.cs Constraints/ComparisonAdapter.cs Constraints/ComparisonConstraint.cs Constraints/Constraint.cs Constraints/ConstraintBuilder.cs Constraints/ConstraintExpression.cs Constraints/ConstraintExpressionBase.cs Constraints/ConstraintFactory.cs Constraints/ContainsConstraint.cs Constraints/DelayedConstraint.cs Constraints/EmptyCollectionConstraint.cs Constraints/EmptyConstraint.cs Constraints/EmptyDirectoryConstraint.cs Constraints/EmptyStringConstraint.cs Constraints/EndsWithConstraint.cs Constraints/EqualConstraint.cs Constraints/EqualityAdapter.cs Constraints/ExactCountConstraint.cs Constraints/ExactTypeConstraint.cs Constraints/ExceptionTypeConstraint.cs Constraints/FailurePoint.cs Constraints/FalseConstraint.cs Constraints/FloatingPointNumerics.cs Constraints/GreaterThanConstraint.cs Constraints/GreaterThanOrEqualConstraint.cs Constraints/InstanceOfTypeConstraint.cs Constraints/IResolveConstraint.cs Constraints/LessThanConstraint.cs Constraints/LessThanOrEqualConstraint.cs Constraints/MessageWriter.cs Constraints/MsgUtils.cs Constraints/NaNConstraint.cs Constraints/NoItemConstraint.cs Constraints/NotConstraint.cs Constraints/NullConstraint.cs Constraints/NullOrEmptyStringConstraint.cs Constraints/Numerics.cs Constraints/NUnitComparer.cs Constraints/NUnitEqualityComparer.cs Constraints/Operators/AllOperator.cs Constraints/Operators/AndOperator.cs Constraints/Operators/AttributeOperator.cs Constraints/Operators/BinaryOperator.cs Constraints/Operators/CollectionOperator.cs Constraints/Operators/ConstraintOperator.cs Constraints/Operators/ExactCountOperator.cs Constraints/Operators/NoneOperator.cs Constraints/Operators/NotOperator.cs Constraints/Operators/OrOperator.cs Constraints/Operators/PrefixOperator.cs Constraints/Operators/PropOperator.cs Constraints/Operators/SelfResolvingOperator.cs Constraints/Operators/SomeOperator.cs Constraints/Operators/ThrowsOperator.cs Constraints/Operators/WithOperator.cs Constraints/OrConstraint.cs Constraints/PathConstraint.cs Constraints/PredicateConstraint.cs Constraints/PrefixConstraint.cs Constraints/PropertyConstraint.cs Constraints/PropertyExistsConstraint.cs Constraints/RangeConstraint.cs Constraints/RegexConstraint.cs Constraints/ResolvableConstraintExpression.cs Constraints/ReusableConstraint.cs Constraints/SameAsConstraint.cs Constraints/SamePathConstraint.cs Constraints/SamePathOrUnderConstraint.cs Constraints/SomeItemsConstraint.cs Constraints/StartsWithConstraint.cs Constraints/StringConstraint.cs Constraints/SubPathConstraint.cs Constraints/SubstringConstraint.cs Constraints/ThrowsConstraint.cs Constraints/ThrowsNothingConstraint.cs Constraints/Tolerance.cs Constraints/ToleranceMode.cs Constraints/TrueConstraint.cs Constraints/TypeConstraint.cs Constraints/UniqueItemsConstraint.cs Constraints/XmlSerializableConstraint.cs Contains.cs Env.cs Exceptions/AssertionException.cs Exceptions/IgnoreException.cs Exceptions/InconclusiveException.cs Exceptions/SuccessException.cs Extensibility/IParameterDataProvider.cs Extensibility/ISuiteBuilder.cs Extensibility/ITestCaseBuilder.cs Extensibility/ITestCaseProvider.cs GlobalSettings.cs Guard.cs Has.cs IExpectException.cs Internal/AssemblyHelper.cs Internal/Builders/CombinatorialStrategy.cs Internal/Builders/CombinatorialTestCaseProvider.cs Internal/Builders/CombiningStrategy.cs Internal/Builders/DataAttributeTestCaseProvider.cs Internal/Builders/DatapointProvider.cs Internal/Builders/NUnitTestCaseBuilder.cs Internal/Builders/NUnitTestFixtureBuilder.cs Internal/Builders/PairwiseStrategy.cs Internal/Builders/ParameterDataProvider.cs Internal/Builders/ProviderCache.cs Internal/Builders/SequentialStrategy.cs Internal/Commands/ApplyChangesToContextCommand.cs Internal/AsyncInvocationRegion.cs Internal/AsyncSynchronizationContext.cs Internal/Commands/CommandDecoratorList.cs Internal/Commands/CommandStage.cs Internal/Commands/DelegatingTestCommand.cs Internal/Commands/ExpectedExceptionCommand.cs Internal/Commands/ICommandDecorator.cs Internal/Commands/MaxTimeCommand.cs Internal/Commands/OneTimeSetUpCommand.cs Internal/Commands/OneTimeTearDownCommand.cs Internal/Commands/RepeatedTestCommand.cs Internal/Commands/SetUpTearDownCommand.cs Internal/Commands/SkipCommand.cs Internal/Commands/TestCommand.cs Internal/Commands/TestMethodCommand.cs Internal/Commands/TheoryResultCommand.cs Internal/CultureDetector.cs Internal/ExceptionHelper.cs Internal/Extensibility/ParameterDataProviders.cs Internal/Extensibility/TestCaseProviders.cs Internal/Filters/AndFilter.cs Internal/Filters/CategoryExpression.cs Internal/Filters/CategoryFilter.cs Internal/Filters/NotFilter.cs Internal/Filters/OrFilter.cs Internal/Filters/SimpleCategoryExpression.cs Internal/Filters/SimpleNameFilter.cs Internal/IApplyToContext.cs Internal/IApplyToTest.cs Internal/InvalidTestFixtureException.cs Internal/MethodHelper.cs Internal/NUnitException.cs Internal/NUnitLiteTestAssemblyBuilder.cs Internal/NUnitLiteTestAssemblyRunner.cs Internal/OSPlatform.cs Internal/ParameterSet.cs Internal/PlatformHelper.cs Internal/PropertyBag.cs Internal/PropertyNames.cs Internal/RandomGenerator.cs Internal/Randomizer.cs Internal/Reflect.cs Internal/Results/TestCaseResult.cs Internal/Results/TestResult.cs Internal/Results/TestSuiteResult.cs Internal/RuntimeFramework.cs Internal/StackFilter.cs Internal/StringUtil.cs Internal/TestExecutionContext.cs Internal/TestFilter.cs Internal/TestFixtureBuilder.cs Internal/TestListener.cs Internal/Tests/ParameterizedFixtureSuite.cs Internal/Tests/ParameterizedMethodSuite.cs Internal/Tests/Test.cs Internal/Tests/TestAssembly.cs Internal/Tests/TestFixture.cs Internal/Tests/TestMethod.cs Internal/Tests/TestSuite.cs Internal/TextMessageWriter.cs Internal/ThreadUtility.cs Internal/TypeHelper.cs Internal/WorkItems/CompositeWorkItem.cs Internal/WorkItems/SimpleWorkItem.cs Internal/WorkItems/WorkItem.cs Internal/WorkItems/WorkItemState.cs Is.cs Iz.cs ListMapper.cs MessageMatch.cs ObjectList.cs Runner/CommandLineOptions.cs Runner/ConsoleWriter.cs Runner/DebugWriter.cs Runner/OutputWriters/NUnit2XmlOutputWriter.cs Runner/OutputWriters/NUnit3XmlOutputWriter.cs Runner/OutputWriters/OutputWriter.cs Runner/ResultReporter.cs Runner/ResultSummary.cs Runner/TcpWriter.cs SpecialValue.cs TestCaseData.cs TestContext.cs Throws.cs GuiUnit/TestRunner.cs GuiUnit/MainLoopCommand.cs GuiUnit/IMainLoopIntegration.cs GuiUnit/XwtMainLoopIntegration.cs GuiUnit/InvokerHelper.cs GuiUnit/MonoMacMainLoopIntegration.cs GuiUnit/XmlTestListener.cs GuiUnit/AdditionalAsserts.cs GuiUnit/GtkMainLoopIntegration.cs Constraints/CollectionSupersetConstraint.cs obj/Debug/net-4.5/.NETFramework,Version=v4.5.AssemblyAttribute.cs /target:exe /define:"TRACE;DEBUG;NET_4_5;CLR_4_0,NUNITLITE" /nowarn:1574;1591 /doc:../../bin/Debug/net-4.5/nunitlite.xml /nostdlib /reference:/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5-api/System.dll /reference:/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5-api/System.Xml.dll /reference:/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5-api/System.Xml.Linq.dll /reference:/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5-api/System.Core.dll /reference:/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5-api//mscorlib.dll /warn:4
Microsoft (R) Visual C# Compiler version 2.6.0.62309 (d3f6b8e7)
Copyright (C) Microsoft Corporation. All rights reserved.
Target DeployOutputFiles:
Copying file from '/Users/ciprian-ionut.holbia/Downloads/guiunit-example/obj/guiunit/src/framework/obj/Debug/net-4.5/GuiUnit.pdb' to '/Users/ciprian-ionut.holbia/Downloads/guiunit-example/obj/guiunit/bin/net_4_5/GuiUnit.pdb'
Copying file from '/Users/ciprian-ionut.holbia/Downloads/guiunit-example/obj/guiunit/src/framework/obj/Debug/net-4.5/GuiUnit.exe' to '/Users/ciprian-ionut.holbia/Downloads/guiunit-example/obj/guiunit/bin/net_4_5/GuiUnit.exe'
Done building project "/Users/ciprian-ionut.holbia/Downloads/guiunit-example/obj/guiunit/src/framework/GuiUnit_NET_4_5.csproj".

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:01.4684140
cp obj/guiunit/bin/net_4_5/GuiUnit.exe obj/
mcs -out:obj/Test.dll -t:library -debug -r:obj/GuiUnit.exe -r:/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/Xamarin.Mac.dll Test.cs
/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/bin/mmp --output obj/Test.app obj/GuiUnit.exe -a /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac.dll --nolink --profile mobile --arch i386
error MM0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
System.ArgumentNullException: Value cannot be null.
Parameter name: path1
at System.IO.Path.Combine (System.String path1, System.String path2, System.String path3, System.String path4) [0x00038] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/Path.cs:867
at Xamarin.Bundler.Driver.ValidateXcode () [0x00014] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tools/mmp/driver.cs:592
at Xamarin.Bundler.Driver.Main2 (System.String[] args) [0x00f87] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tools/mmp/driver.cs:480
at Xamarin.Bundler.Driver.Main (System.String[] args) [0x00015] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tools/mmp/driver.cs:211
make: *** [obj/Test.app] Error 1

Bssid = null since update to Catalina 10.15.4

The used code from the example:

HelloCoreWlanSample.cs

doesnt work anymore as expected. Dont know if it is a bug or a new restriction, but the system always returns NULL for the Bssid value.

How can I resolve dependency of OpenTK.dll?

I cloned this repository and try to build OpenGLViewSample project, but with no success.
Xamarin complained it can't find OpenTK, so I edited references through "edit references" menu, added "OpenTK.dll". I built OpenTK.dll by downloading & compile sources from http://sourceforge.net/projects/opentk/?source=typ_redirect which is last version I think. (2014-07-23)

Now it keeps complaining about ambiguity between
"using OpenGL" and "using OpenTK.Graphics.OpenGL".

By commenting out "opentk.grpahics.opengl", it runs but I think this isn't what you guys intended when you upload samples.

Can you guide me how to build sample project using OpenTK? Which version of OpenTK should I use?

Any help will be appreciated. Thanks.

PS: Attached screenshot is depicts build error due to ambiguity I mentioned.
2015-01-27 9 55 24

NSScrollExample (Xamarin documentation) does not work

MacOS Mojave 10.14.6 dark mode, VS for Mac Community 8.5.4

Hello.
Running this app displays a small black window (500 x 250 ?) with 2 buttons and no scroll bars. Extending this window add gray surface up and right.
Could you please fix this bug or explain my error ?
Regards,
Gilbert

Capture d’écran 2020-04-29 à 14 35 35

Help - NSMenuItem.SeparatorItem shows full height

Taking the example:

menu.AddItem ("Get URL", new ObjCRuntime.Selector ("getURL:"), string.Empty);

And adding this lines right after

menu.AddItem(NSMenuItem.SeparatorItem);
menu.AddItem("Second Item", new ObjCRuntime.Selector("getURL:"), string.Empty);

Places a separator item, but it shows with the full height of a regular menu item, instead of a thin line as expected.

Has anyone experienced this, is there something i can do to fix it.

I'm using Xamarin.Mac version 4.2.1.29, on a 10.12 Mac.

finder-extension-separator-item

MacXibless does not work perfectly

MacOS Mojave 10.14.6, VS for Mac Community 8.5.4

Hello.

  1. I tried to create the MacXibless app (Xamarin sample) from the beginning (new Mac Cocoa app, etc.). This new app opens 2 windows, a big one explicitly created (with the button and the label), but also - and first - a small empty one (the standard window that is displayed by an empty new app). How can I prevent this small undesired window to be displayed ?
  2. Why is there a MainMenu.xib file in the sample ? The app works the same way with or without this file.
    Regards,
    Gilbert

CoreWLANWirelessManager fails to build with Xamarin.Mac 4.3.0

When building CoreWLANWirelessManager sample with Xamarin.Mac 4.3.0 (which is master), the build fails because LSMinimumSystemVersion is set to 10.6 but 4.3.0 supports minimum of 10.7

Done building project "CoreWLANWirelessManager.csproj" -- FAILED.

Build FAILED.

MMP : error MM0073: Xamarin.Mac 4.3.0 does not support a deployment target of 10.6 for macOS (the minimum is 10.7). Please select a newer deployment target in your project's Info.plist.
    0 Warning(s)
    1 Error(s)

Small bug in ButtonMadness Xamarin sample

MacOS Mojave 10.14.6, VS for Mac Community 8.5.4

In the file TestWindowController.cs, lines 166, 171, 176, "HFSTypeCode" should be written "HfsTypeCode". ;)
Regards,
Gilbert

Error opening FileCards.sln on Mac

When I open the FileCards.sln or FileCards.csproj using Visual Studio for Mac 17.4.2 (build 17) (on an M1 Mac) I get this error:

The type initializer for 'MonoDevelop.MonoMac.XamMac2ProjectFlavor' threw an exception.

extra information:

Visual Studio Community 2022 for Mac
Version 17.4.2 (build 17)
Installation UUID: 38002dda-fb6c-4c8b-9372-26313f065da7

Runtime
.NET 6.0.12 (64-bit)
Architecture: Arm64

Roslyn (Language Service)
4.4.0-6.22578.12+3c6ab8e1715e5b080fb7bb77070810ab71e09387

NuGet
Version: 6.3.1.1

.NET SDK (Arm64)
SDK: /usr/local/share/dotnet/sdk/7.0.101/Sdks
SDK Versions:
	7.0.101
	6.0.404
MSBuild SDKs: /Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/Sdks

.NET Runtime (Arm64)
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	7.0.1
	6.0.12

.NET Runtime (x64)
Runtime: /usr/local/share/dotnet/x64/dotnet
Runtime Versions:
	3.1.32
	3.1.31
	3.1.30
	3.1.28
	3.1.27

Xamarin.Profiler
'/Applications/Xamarin Profiler.app' not found

Updater
Version: 11

Xamarin.Android
Not Installed

Microsoft Build of OpenJDK
Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk
11.0.12
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Eclipse Temurin JDK
Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk
1.8.0.302
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Android SDK Manager
Version: 17.4.0.54
Hash: 6eabb9e
Branch: remotes/origin/d17-4
Build date: 2022-12-13 00:02:50 UTC

Android Device Manager
Version: 0.0.0.1206
Hash: 886af39
Branch: 886af39
Build date: 2022-12-13 00:02:50 UTC

Apple Developer Tools
Xcode 14.2 (21534)
Build 14C18

Xamarin.Mac
Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

Xamarin.iOS
Xamarin.iOS not installed.
Can't find mtouch or the Version file at /Library/Frameworks/Xamarin.iOS.framework/Versions/Current.

Xamarin Designer
Version: 17.4.0.136
Hash: d49c9ff6d3
Branch: remotes/origin/d17-4
Build date: 2022-12-13 00:02:45 UTC

Build Information
Release ID: 1704020017
Git revision: 7ef5413f2eec3351ce648085f619fc29fd8cb647
Build date: 2022-12-13 00:00:15+00
Build branch: release-17.4
Build lane: release-17.4

Operating System
Mac OS X 13.0.1
Darwin 22.1.0 Darwin Kernel Version 22.1.0
    Sun Oct  9 20:15:09 PDT 2022
    root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.