Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[UIKit] Partial update to Xcode 11 Beta 1, 2 and 3 - Part 2 of ?#6553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
dalexsoto merged 10 commits intodotnet:xcode11fromdalexsoto:alex-uikitb1b3
Jul 12, 2019

Conversation

@dalexsoto
Copy link
Member

@dalexsotodalexsoto commentedJul 11, 2019
edited
Loading

Missing bindings for

  • NSDiffableDataSourceSnapshot
  • UICollectionViewDiffableDataSource
  • UITableViewDiffableDataSource

due to a registrar issue with generics.

intro tested in the following versions locally (green)

  • iOS 9.0 and iOS 13.0
  • tvOS 9.0 and tvOS 13.0

There are some availability attributes older than 13 here. Also pardon some spaces v.s. tabs changes, those are intentional when I introduced something either on my last PR or I modified something in this PR.

Breaking changes justification

Type Changed: UIKit.UIAccessibilityElement

Modified base type:

Foundation.NSObject UIKit.UIResponder

New BaseTypeNSObject ->UIResponder

Type Changed: UIKit.UIDragPreviewParameters

Modified base type:

Foundation.NSObject UIKit.UIPreviewParameters

New BaseTypeNSObject ->UIPreviewParameters

Removed properties:

public virtual UIColor BackgroundColor { get; set; }public virtual UIBezierPath VisiblePath { get; set; }

These now come from the new parent classUIPreviewParameters

Type Changed: UIKit.UIDragPreviewTarget

Modified base type:

Foundation.NSObject UIKit.UIPreviewTarget

New BaseTypeNSObject ->UIPreviewTarget

Removed properties:

public virtual CoreGraphics.CGPoint Center { get; }public virtual UIView Container { get; }public virtual CoreGraphics.CGAffineTransform Transform { get; }

These now come from the new parent classUIPreviewTarget

Type Changed: UIKit.UIKeyCommand

Modified base type:

Foundation.NSObject UIKit.UICommand

New BaseTypeNSObject ->UICommand

Removed method:

public virtual void EncodeTo (Foundation.NSCoder encoder);

No longer adoptsNSSecureCoding protocol

Type Changed: UIKit.UIMenu

Removed method:

public virtual void EncodeTo (Foundation.NSCoder encoder);

No longer adoptsNSSecureCoding protocol

Type Changed: UIKit.UITargetedDragPreview

Modified base type:

Foundation.NSObject UIKit.UITargetedPreview

New BaseTypeNSObject ->UITargetedPreview

Removed Type UIKit.UIActionOptions

Introduced in iOS 13 and not used anymore

Removed Type UIKit.UICommandState

Introduced in iOS 13 and replaced byUIMenuElementState

Missing bindings for* NSDiffableDataSourceSnapshot* UICollectionViewDiffableDataSource* UITableViewDiffableDataSourcedue to a registrar issue git generics.
@dalexsotodalexsoto added the note-highlightWorth calling out specifically in release notes labelJul 11, 2019
@dalexsotodalexsoto added this to thexcode11 milestoneJul 11, 2019
@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
⚠️API Diff (from PR only) (🔥 breaking changes 🔥)
ℹ️Generator Diff (please review changes)
🔥Test run failed 🔥

Test results

11 tests failed, 80 tests passed.

Failed tests

  • introspection/Mac Modern/Debug: Failed (Test run failed.)
  • monotouch-test/iOS Unified 32-bits - simulator/Debug: Failed
  • monotouch-test/iOS Unified 32-bits - simulator/Debug (static registrar): Failed
  • monotouch-test/iOS Unified 32-bits - simulator/Release (all optimizations): Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Debug: Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (static registrar): Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Release (all optimizations): Failed
  • monotouch-test/tvOS - simulator/Debug: Failed
  • monotouch-test/tvOS - simulator/Debug (static registrar): Failed
  • monotouch-test/tvOS - simulator/Release (all optimizations): Failed
  • introspection/watchOS 32-bits - simulator/Debug (watchOS 4.0): Failed
dalexsoto reacted with laugh emoji

Copy link
Member

@rolfbjarnerolfbjarne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM, just a few minor things.

dalexsotoand others added2 commitsJuly 11, 2019 07:46
Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
@monojenkins
Copy link
Collaborator

Build failure
Build failed or was aborted

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
@monojenkins
Copy link
Collaborator

Build failure

!!! Couldn't read commit file !!!

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
@monojenkins
Copy link
Collaborator

Build failure
Build failed or was aborted

🔥Build failed 🔥

@dalexsoto
Copy link
MemberAuthor

Thank you@rolfbjarne I addressed your comments :)

@monojenkins
Copy link
Collaborator

Build failure
Build failed or was aborted

Build succeeded
API Diff (from stable)
⚠️API Diff (from PR only) (🔥 breaking changes 🔥)
ℹ️Generator Diff (please review changes)

publicenumNSWritingDirection:long{
#else
publicenumUITextWritingDirection:long{
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is becoming confusing

src/AppKit/Enums.cs:    public enum NSWritingDirection : long {src/Foundation/Enum.cs: [Obsolete ("Use NSWritingDirection in AppKit instead.")]src/Foundation/Enum.cs: public enum NSWritingDirection : long {

and, for us, it's really different types (if some new, shared macOS+iOS API, start using them)

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Oh woow nice catch@spouliot will expose AppKit's into xkit.cs and use that instead 👍

spouliot reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Fixed in692b68b

[Native]
publicenumNSTextScalingType:long
{
publicenumNSTextScalingType:long{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

try not to fix style in the same commit that adds code
ease reviewing (now) and blaming (later)

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yeah I agree but (🙃) I decided to fix this on the stuff that I included in my last PR it would not ease review but will still blame back to me

[Export ("stopProvidingItemAtURL:")]
void StopProvidingItemAtUrl (NSUrl url);

// TODO: Enable with new iOS 13 FileProvider bindings.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

better file an issue (or add it to the xcode11 checklist) or we might forget about it...

Copy link
MemberAuthor

@dalexsotodalexsotoJul 11, 2019
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Xtro never forgets! This is not removed from Xtro FileProvider todo files, do you still want an issue for this? I just created the bindings because I needed the name in one of the Deprecated attributes

spouliot and rolfbjarne reacted with thumbs up emoji

[iOS (13,0), TV (13,0)]
[Export ("imageWithConfiguration:")]
UIImage FromConfiguration (UIImageConfiguration configuration);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

did we not choseCreate* last time ?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Unfortunately there are otherFrom members and IIRC we agreed that create would be for new types to be consistent

[Export ("imageWithTraitCollection:")]UIImage FromTraitCollection (UITraitCollection traitCollection);

[Deprecated (PlatformName.iOS, 13, 0, message: "Use 'VerticalScrollIndicatorInsets' or 'HorizontalScrollIndicatorInsets' instead.")]
[Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'VerticalScrollIndicatorInsets' or 'HorizontalScrollIndicatorInsets' instead.")]
get;
set;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

weird, only thegetter is deprecated ?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yup

@property(nonatomic)         UIEdgeInsets                 scrollIndicatorInsets; // use the setter only, as a convenience for setting both verticalScrollIndicatorInsets and horizontalScrollIndicatorInsets to the same value. if those properties have been set to different values, the return value of this getter (deprecated) is undefined.- (UIEdgeInsets)scrollIndicatorInsets API_DEPRECATED("The scrollIndicatorInsets getter is deprecated, use the verticalScrollIndicatorInsets and horizontalScrollIndicatorInsets getters instead.", ios(2.0, 13.0), tvos(9.0, 13.0));

@spouliot
Copy link
Contributor

api-diff complains about

  • Type Changed: UIKit.UIMenu / Removed method:public virtual void EncodeTo (Foundation.NSCoder encoder);
  • Type Changed: UIKit.UIKeyCommand / Removed method:public virtual void EncodeTo (Foundation.NSCoder encoder);

Those might be fine depending on the type hierarchy - in doubt add a test ;-)

  • Removed Type UIKit.UIActionOptions
  • Removed Type UIKit.UICommandState

Those are breaking changes

@dalexsoto
Copy link
MemberAuthor

dalexsoto commentedJul 11, 2019
edited
Loading

Removed Type UIKit.UIActionOptions
Removed Type UIKit.UICommandState
Those are breaking changes

@spouliot Yes but those were introduced in iOS 13 in my last PR.

spouliot reacted with thumbs up emoji

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
⚠️API Diff (from PR only) (🔥 breaking changes 🔥)
ℹ️Generator Diff (please review changes)
🔥Test run failed 🔥

Test results

9 tests failed, 82 tests passed.

Failed tests

  • monotouch-test/iOS Unified 32-bits - simulator/Debug: Failed
  • monotouch-test/iOS Unified 32-bits - simulator/Debug (static registrar): Failed
  • monotouch-test/iOS Unified 32-bits - simulator/Release (all optimizations): Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Debug: Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (static registrar): Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Release (all optimizations): Failed
  • monotouch-test/tvOS - simulator/Debug: Failed
  • monotouch-test/tvOS - simulator/Debug (static registrar): Failed
  • monotouch-test/tvOS - simulator/Release (all optimizations): Failed

}
#endif// !XAMCORE_4_0

[Watch(6,0),TV(13,0),Mac(10,15,onlyOn64:true),iOS(13,0)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Do you need to create this because it is not supported in C#? When do you know if you need to create an additional file?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I need to create this because thegenerator does not know how to handle certain types and these need to be manually bound, meaning C# does support this it is just the generator does not know how to output the right C# code for these.

Generally the generator will yell at you when it does not know how to handle a type but basically C arrays and types that do not inherit from NSObject.

}

[iOS(13,0),TV(13,0)]
[DllImport(Constants.UIKitLibrary)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Is Constants.UIKitLibrary a third party dll?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nope,UIKitLibrary points to the system's path where this library is located, the value changes between simulator and devices.

NSWritingDirection exists in both Foundation and AppKit, appledoes expose it in AppKit and UIKit so moving NSWritingDirectionto xkit.cs is the right thing to do but since it is a breakingchange we just XAMCORE_4_0 the fix which is:1. Remove from Foundation2. Expose in UIKit and AppKit to mimic Apple's SDK
This also disables* FloatRangeTest.Equals* FloatRangeTest.ManagedVersusNativedue toxamarin/maccore#1885
@dalexsotodalexsoto requested a review fromspouliotJuly 12, 2019 01:39
@dalexsoto
Copy link
MemberAuthor

dalexsoto commentedJul 12, 2019
edited
Loading

@spouliot I think I have answered and/or fixed all your feedback, thanks!! 👍

I forgot to mention, about

api-diff complains about

  • Type Changed: UIKit.UIMenu / Removed method:public virtual void EncodeTo (Foundation.NSCoder encoder);
  • Type Changed: UIKit.UIKeyCommand / Removed method:public virtual void EncodeTo (Foundation.NSCoder encoder);

This is not entirely true,EncodeTo is still there due to inheritance.

@monojenkins
Copy link
Collaborator

Build failure
Build failed or was aborted

Build succeeded
API Diff (from stable)
⚠️API Diff (from PR only) (🔥 breaking changes 🔥)
ℹ️Generator Diff (please review changes)

@monojenkins
Copy link
Collaborator

Build failure
Build failed or was aborted

🔥Build failed 🔥

@dalexsoto
Copy link
MemberAuthor

build

@monojenkins
Copy link
Collaborator

Build success
Build succeeded
API Diff (from stable)
⚠️API Diff (from PR only) (🔥 breaking changes 🔥)
ℹ️Generator Diff (please review changes)
Test run succeeded

… did not really fix it 🙃This reverts commit692b68b.The right fix is to expose NSWritingDirection in foundation
@dalexsoto
Copy link
MemberAuthor

@spouliot corrected the enum situation as discussed and created an issue for it#6573, thanks for the feedback!

@monojenkins
Copy link
Collaborator

Build success
Build succeeded
API Diff (from stable)
⚠️API Diff (from PR only) (🔥 breaking changes 🔥)
ℹ️Generator Diff (please review changes)
Test run succeeded

@dalexsotodalexsoto merged commit2d53b90 intodotnet:xcode11Jul 12, 2019
@dalexsotodalexsoto deleted the alex-uikitb1b3 branchJuly 12, 2019 17:44
[NullAllowed, Export ("sceneClass", ArgumentSemantic.Assign)]
Class SceneClass { get; set; }

Type SceneType {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What is this SceneType doing?

Copy link
MemberAuthor

@dalexsotodalexsotoJul 12, 2019
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@tj-devel709SceneClass is type ofClass which is an Objective-C type that is not as .NET friendly as its C# counterpartType. I created a nicer wrapper around it calledSceneType you can set/get a C#Type and this property will convert it into an Objective-CClass and set/get it toSceneClass. This allows you to do something likeSceneType = typeof (NSObject) which is a little cleaner code that looking for aClass manually.

[Advice("You can use 'SceneType' with a 'Type' instead.")][NullAllowed,Export("sceneClass",ArgumentSemantic.Assign)]ClassSceneClass{get;set;}Type SceneType{[Wrap("Class.Lookup(SceneClass)")]get;[Wrap("SceneClass = value == null ? null : new Class (value)")] set;}

You can read more aboutWrapAttribute here.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@rolfbjarnerolfbjarnerolfbjarne approved these changes

@tj-devel709tj-devel709tj-devel709 approved these changes

@chamonschamonsAwaiting requested review from chamons

@VincentDondainVincentDondainAwaiting requested review from VincentDondain

+2 more reviewers

@spouliotspouliotspouliot approved these changes

@stephen-hawleystephen-hawleystephen-hawley approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

note-highlightWorth calling out specifically in release notes

Projects

None yet

Milestone

xcode11

Development

Successfully merging this pull request may close these issues.

6 participants

@dalexsoto@monojenkins@spouliot@rolfbjarne@stephen-hawley@tj-devel709

[8]ページ先頭

©2009-2025 Movatter.jp