FokkeZB / nl.fokkezb.loading

The widget provides a simple loading mask that can be easily styled and configured.
93 stars 18 forks source link

iOS could not find module #41

Closed odahcam closed 7 years ago

odahcam commented 7 years ago

Widget version: 1.8.4 Alloy: 1.9 Ti SDK: 6.0.4.GA

image

FokkeZB commented 7 years ago

@odahcam thx for reporting!

Could you check your Resources folder to see if /ios/alloy/widgets/nl.fokkezb.loading/controllers/progress.js is there?

odahcam commented 7 years ago

It is not there, there is only 3 files:

FokkeZB commented 7 years ago

That makes sense since progress is an Android only view, sorry for asking the obvious ;)

What is the code you use to use the widget?

odahcam commented 7 years ago

image

Should I remove the 'progress' for non Android systems?

FokkeZB commented 7 years ago

Yep, indeed! As https://github.com/FokkeZB/nl.fokkezb.loading#native-progress-android-only says that's Android only.

odahcam commented 7 years ago

It's not much usual, but thank you, I thought that this "switch" was automatic. What happens if I don't pass any arguments in this parameter?

FokkeZB commented 7 years ago

If you don't pass the second argument, it will default to the widget controller.

You can simply do:

var ActivityIndicator = Alloy.createWidget('nl.fokkezb.loading', OS_IOS ? 'window' : 'progress');
odahcam commented 7 years ago

That's exactly what I did, so this is the best approach to multiplatform apps?

FokkeZB commented 7 years ago

Definitely