File missing after iOS build

After running ionic build ios my included swiper.js and .css is missing. If I use “ionic serve” it is working fine.

EDIT: I found the error. It was my fault, but I’ll post it here since it hopefully might help someone to cut down on debug time. I had a typo in my index.html. One of the letters was lowercase instead of uppercase. While the browser ionic serve was able to comprehend this, iOS was not.

I think ionic 1.2.1 already includes swiper. You probably don’t need to import your own swiper.js.

Ion-slides (introduced in ionic 1.2) are more or less an ionic/angular wrapper around swiper. The actual swiper.js file and with that the swiper-instantiation are hidden.

In my case I needed access to these since I wanted to add a custom overlay over the first and last slide as three are displayed at a time. I was not able to achieve this with ion-slides since I had to place the divs for correct scaling inside the swiper-wrapper div.

I have just upgraded to 1.2 by replacing ionic.bundle.min.js manually as usual. However, the swiper doesn’t seem working (nothing shown) even I copy and paste the most basic codes. Is there any file I’m missing?

I didn’t even know it was possible to upgrade this way. But since there were some major updates between version 1.1 and 1.2 I would assume, that there are more files involved.

So the way it’s supposed to work is to call ionic lib update. Yet this somehow didn’t work for me. It would always jump back to 1.1 (can be checked via ionic lib -v.

What I ended up doing is modify the bower.json from
"ionic": "driftyco/ionic-bower#1.2.1"
"ionic": "driftyco/ionic-bower#1.2.1-nightly-1867"
as recommended here: Anyone else having problems with 1.2.1?
and then calling ionic lib update would work.

Not sure if that’ll solve your problem. You can also debug your build and see if there’s any file missing.