nativescript-community / ui-material-components

Monorepo that contains all of the NativeScript Material Design plugins.
https://nativescript-community.github.io/ui-material-components/
Apache License 2.0
216 stars 80 forks source link

Release build troubles on iOS #242

Open ray007 opened 3 years ago

ray007 commented 3 years ago

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

Please, tell us how to recreate the issue in as much detail as possible.

Testing with ns debug ios and ns run ios everything worked fine, but trying ns run ios --release has the app crashing. Which I first noticed when trying to upload my build to appstore, see https://github.com/NativeScript/nativescript-cli/issues/5499

After doing a clean checkout and trying again ns run ios --release, I noticed the build system now tried to install different Pods compared to the debug build. Instead of

Installing MDFInternationalization (2.0.0)
Installing MDFTestAccessibility (2.0.0)
Installing MaterialComponents (122.0.0)

I now see

Installing MDFInternationalization (2.0.0)
Installing MDFTestAccessibility (2.0.0)
Installing MaterialComponents (94.5.0)
Installing MotionAnimator (2.8.1)
Installing MotionInterchange (1.6.0)

And the application crashes with:

****** Fatal JavaScript exception - application has been terminated *****
NativeScript encountered fatal error: Uncaught TypeError: this.nativeViewProtected.startAnimating is not a function
at [indeterminate:setNative] (file:///....)
...

Source of the problem

Not using the indeterminate mode of the linear progress widget makes ns run ios --release work again. Activating indeterminate mode with a property also does not work.

ray007 commented 3 years ago

Note: doing ns build ios --release instead of ns run ios --release installs the same Pods as debugging. I'm now officially very confused.

farfromrefug commented 3 years ago

@ray007 something is wrong with your setup. With the latest material components you should have MaterialComponents at the latest versions. 95.0 was a version forced by N. I have a hook removing that forced version in materila components 5.x Check that the material component core hook is correctly running. 5.x is not compatible with MaterialComponents 95.0

ray007 commented 3 years ago

Yes, I'm aware, but other than keeping the Mac up-to-date, I haven't done anything which would explain the problems popping up.

It's also interesting to note that ns run ios --release and ns deploy ios --release are dragging in the old version, while ns build ios --release does not.

The core hook scripts is @nativescript-community/ui-material-core/scripts/before-prepare.js? Or is there something else? I know I see the warning about Using material components 5.x ..., is there something else I should look for?

And even after a build with the newer MaterialComponents I seems to have a problem with the linker complaining about missing framework (due to missing directories in .../Library/Developer/Xcode/DerivedData/..., see also linked issue) which is only visible in XCode. Somehow the build-parameters for the Pods seem to be wrong, any idea how to find that problem?

Many thanks again for taking your time to help

farfromrefug commented 3 years ago

@ray007 your problem seems to be with building not this component. I will leave this open for a while though

ray007 commented 3 years ago

Yes, the problem seems to be with building, but only with components using Pods that need to be build. Do you have a suggestion for me where I'd better ask for help with that than here?

But the old version for the ns run ios --release seems to be a specific problem for material-ui, no?