Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift 4.2 Support #1172

Closed
quanguyen opened this issue Oct 11, 2018 · 32 comments
Closed

Swift 4.2 Support #1172

quanguyen opened this issue Oct 11, 2018 · 32 comments

Comments

@quanguyen
Copy link

Hi,

There are 289 warnings when I try to build my current Material on XCode 10, with Swift 4.2 on.

I check for new Material (by pod outdated) but no new version yet?

When would you release new version?

Thanks

@OrkhanAlikhanov
Copy link
Contributor

Pretty soon. You can use development branch for now.

@daniel-jonathan
Copy link
Member

@OrkhanAlikhanov I am going to leave this up for now, so that other people can see to use the development branch for now.

@ruelluna
Copy link

Tried to use development branch

Podfile

...
pod 'Material', :git => 'https://github.com/CosmicMind/Material.git', :branch => 'development'
...

Error

Analyzing dependencies
Pre-downloading: `Material` from `https://github.com/CosmicMind/Material.git`, branch `development`
[!] CocoaPods could not find compatible versions for pod "Motion":
  In Podfile:
    Material (from `https://github.com/CosmicMind/Material.git`, branch `development`) was resolved to 2.17.0, which depends on
      Material/Core (= 2.17.0) was resolved to 2.17.0, which depends on
        Motion (~> 1.5.0)

None of your spec sources contain a spec satisfying the dependency: `Motion (~> 1.5.0)`.

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

@OrkhanAlikhanov
Copy link
Contributor

Use development branch of Motion as well.

pod 'Material', :git => 'https://github.com/CosmicMind/Material.git', :branch => 'development'
pod 'Motion', :git => 'https://github.com/CosmicMind/Motion.git', :branch => 'development'

@sillysachin
Copy link

Since Nov 1 - Compiler error.

view.layout(fabMenu).size(fabMenuItemSize)

Value of type 'Layout' has no member 'size'

@OrkhanAlikhanov
Copy link
Contributor

It's caused by #1185.

Use this until we add it back:

extension Layout {
  @discardableResult
  func size(_ size: CGSize) -> Layout {
     return width(size.width).height(size.height)
  }
}

@daniel-jonathan
Copy link
Member

@sillysachin I added the size API to the Layout toolset, and it is now in the development branch in this commit b95456d. Thank you @OrkhanAlikhanov.

@manas-somoy
Copy link

Hello. After installing from dev branch I spotted that buttons are misbehaving. If attributes are set in the storyboard like Font, BackgroundColor etc they won't show. Also I was wondering if you guys will release a subset of the Material with only the views not the controllers.

@OrkhanAlikhanov
Copy link
Contributor

@CHONUMAN Add Theme.isEnabled = false in your AppDelegate.swift file to resolve color conflict. I don't know why this is happening with storyboard users even though I've tested and it was working.

We plan to have different modules for Material but it's not a priority right now.

@karasahinemre
Copy link

Any updates?

@daniel-jonathan
Copy link
Member

@karasahinemre The development branch works well, but we haven't released yet, as we need to document more.

@svachmic
Copy link

The suggested installation just stopped working with the last commit:

[!] CocoaPods could not find compatible versions for pod "Motion":
  In Podfile:
    Material (from `https://github.com/CosmicMind/Material.git`, branch `development`) was resolved to 3.0.0, which depends on
      Material/Core (= 3.0.0) was resolved to 3.0.0, which depends on
        Motion (~> 1.5.0)

    Motion (from `https://github.com/CosmicMind/Motion.git`, branch `development`)

@OrkhanAlikhanov
Copy link
Contributor

We are now very close to release. You can point to the previous commits I believe. Not tested but should work:

pod 'Material', :git => 'https://github.com/CosmicMind/Material.git', :commit => '4ab1b08c3365a00f409a210162ae72ed8425f299'
pod 'Motion', :git => 'https://github.com/CosmicMind/Motion.git', :commit => '3141bdb87e30b4aa899a22562194a221ea2da388'

@daniel-jonathan
Copy link
Member

Thank you @OrkhanAlikhanov. That is correct @svachmic, we are preparing to launch a bunch of updates, so please be aware that some pointers may be incorrect for the next week. We appreciate your message and helping us build a solid product.

@svachmic
Copy link

I understand, thanks for all your work. It's just unfortunate how the update clashed with the Swift 4.2 release which forces the codebase to be dependent on the development branch. But noted, I won't pod install for at least a week or so 😅

@MuhammadNayabButt
Copy link

@karasahinemre The development branch works well, but we haven't released yet, as we need to document more.

The "Theme.isEnabled = false" do not work well in development branch. So please fix this as well.

@OrkhanAlikhanov
Copy link
Contributor

@MuhammadNayabButt Hey! Could you please define does not work well?

@MuhammadNayabButt
Copy link

@OrkhanAlikhanov It is working Partially. The main problem exists in navigation bars. In some NavBars there is a default theme color(blue). Although I have set "Theme.isEnabled = false" in AppDelegate

@universonic
Copy link

Thanks for your work @OrkhanAlikhanov . Do you think we can expect the new release available by the end of February? Thanks again.

@sambo-visal
Copy link

I got some errors when tried to use development branch.
The error shows -bash: https://github.com/CosmicMind/Motion.git,: No such file or directory

I tried the following command

pod 'Material', :git => 'https://github.com/CosmicMind/Material.git', :commit => '4ab1b08c3365a00f409a210162ae72ed8425f299'
pod 'Motion', :git => 'https://github.com/CosmicMind/Motion.git', :commit => '3141bdb87e30b4aa899a22562194a221ea2da388'

@kaunteya
Copy link

kaunteya commented Mar 1, 2019

Hey @OrkhanAlikhanov when can we expect 4.2 support for this awesome pod?

@daniel-jonathan
Copy link
Member

daniel-jonathan commented Mar 7, 2019

Hi Everyone! @OrkhanAlikhanov and I are working on preparing a release with the following changes. It is taking us some time as we need to create a new sample app and rewrite the READMEs to help with the new APIs. At the same time, we have been working on a new tool to help us create content, which I am happy to say is complete and now being integrated. The development branch is very stable and will be our candidate going forward. Thank you for everyone's patience.

Material

3.xx.x

  • Updated to swift 4.2.
  • pr-1124: Fixed issue-1123, TextField is not scrolling.
    • issue-1123: TextField is not scrolling when inputing characters and using a large Font size.
  • pr-1126: Cleaned up TextField.
  • pr-1130: Addressed multiple issues.
    • issue-1125: TextView with animated placeholder.
    • issue-1127: TextView auto-adjust height based on text lines.
    • issue-1128: TextField animates weird when text alignment is .right and we have textInset.
    • Removed textInset: CGFloat and added textInsets: EdgeInsets to TextField.
  • pr-1134: Added swipe feature to BottomNavigationController.
    • issue-1132: BottomNavigationController same swipe behaviour as TabsController.
  • pr-1147: Allow framework to be linked from extensions.
  • pr-1151: New features.
    • Added left/right/above/below directions to DepthPreset.
    • Added .custom(x) case for HeightPreset.
    • Added support for heightPreset in BottomNavigationController. issue-1150
  • pr-1165: Added interactive swipe.
    • issue-1135: Convert swiping in TabsController and BottomNavigationController to interactive.
  • pr-1115: Introducing Theming to Material.
  • pr-1173: Added dialogs.
  • pr-1174: Added disabling theming globally and per-class.
  • pr-1183: Added global theme font.
  • pr-1185: Reworked layout system.
  • pr-1186: Fixed SnackBar laid out incorrectly.
  • pr-1187: Added option for disabling snackbar layout edge inset calculation

Motion

2.x.x

  • Updated to swift 4.2.
  • pr-45: Fixed issue-44, view is hidden below status bar during call.
    • issue-44: View is hidden below status bar when a call is active.
  • pr-50: Allow framework to be linked from extensions.
  • pr-53: Bug fixes and MotionViewTransition.
    • Made MotionTransition.{start|update|finish|cancel} methods public.
    • Changed to updating model before firing animations for CALayer animations.
    • Added reverting XXForNextTransition options back to default.
    • Fixed issue when interactive transition was cancelled it was calling finish instead of cancel.
    • Fixed appearance transition callbacks for transition cancellation.
    • Fixed resume time was calculated incorrectly.
    • Fixed ~0.001 seconds precision issue by storing current time.
    • Added MotionViewTransition to make transitions of views possible.
  • pr-54: Added setCompletionCallbackForNextTransition.
  • pr-55: Fixed UITabBarController had userinteraction enabled during transition.

@daniel-jonathan daniel-jonathan pinned this issue Mar 7, 2019
@MatanGold
Copy link

A. Any updates?
B. How can we help?

@daniel-jonathan
Copy link
Member

@MatanGold thank you, at the moment a sample is being made, and then it will be released.

@multinerd
Copy link
Contributor

@DanielDahan While i appreciate the hard work you've put into both material and motion, I think you should push a swift 4.2 of the current release in addition to this new version. In my specific case, theme completely ruins my UI despite having Theme.isEnabled = false in my AppDelegate.swift

@daniel-jonathan
Copy link
Member

@multinerd When the official release is made, it will have theming working and not interrupt your application's design. @OrkhanAlikhanov is working these last issues out with the sample.

@kylebrowning
Copy link

@DanielDahan Just to throw one more wrench in, Swift 5 came out yesterday.

@daniel-jonathan
Copy link
Member

@kylebrowning Yeah, lol... no worries though. Once we release this upcoming version, we will mark it 3.0, then branch off development and create the 3.1 branch, while supporting both for a short period while others transition over. We are so close to what we want to accomplish, all should be out soon. Thank you!

@kylebrowning
Copy link

@DanielDahan Any update here?

@daniel-jonathan
Copy link
Member

@kylebrowning thanks for checking in. We are so close to releasing. @OrkhanAlikhanov I am thinking we can start the rollout by end of next week.

@daniel-jonathan
Copy link
Member

@OrkhanAlikhanov I would like to setup a release candidate for Swift 4.2 and Swift 5.0 and create candidate branch releases from development, thoughts?

@daniel-jonathan daniel-jonathan changed the title Material on XCode 10, Swift 4.2 Swift 4.2 Support May 15, 2019
@daniel-jonathan
Copy link
Member

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

No branches or pull requests