This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Benjamin Fritz
Posted Apr 24 - Read on Facebook

Hey folks, me again. I mostly finished my prototype for an Android app and it spans 1.400 lines of shabby code. And that's where the problem starts:

It runs perfect on Chrome (OSX and Windows) and Safari (OSX) but fails to load properly in the chromeless browser Android app "Framer" and on Chrome on Android, too.

It also fails to load entirely on iOS on Safari and Chrome where it loads in a loop crashing the browser.

The project folder is more or less 17MB with assets and all and as I said it's roughly 1.400 lines of CoffeeScript.

Any chance to fix this somehow without rewriting everything?

To be clear there's no error in the code, it's maybe only redundancy and complicated ways to achieve certain effects.

Thanks for any help, kind of desperate right now.

12 Comments

Benjamin Fritz

Follow up question: Would it make it faster or work better if I enter the local IP in the same network into the app instead of the share.framerjs.com link?

Jorn van Dijk

cc Koen

Koen Bok

Hey Benjamin, 1700 lines of code should really not be a problem generally, especially on iOS. But it's almost never an issue with sheer size of code, almost always with a specific thing. So I would try to comment out parts of your code until it runs. I'm sure you'll quickly find that the problem is in a very specific part.

The 17mb might be a problem on Android, but it really depends on os/device. If you work with large images you could try to exports them as jpg over png to reduce the size. You could also try to "lazy" build image layers only when you show them to spread the load over time.

Koen Bok

If these still don't help and if you can share your work, I'm happy to take a look but it will take a bit of time.

Benjamin Fritz

Tried the local IP, to no avail. It seems like what I wrote is just too complicated/crappy for the mobile browsers to render properly. I should also state, that I imported my assets from Sketch in @4x size for our target device Nexus 6P. We want to test with that device.

Koen Bok

Can you maybe verify if that is the case by just making a test with everything at 1x? It seems weird that a 4x device has so much trouble with 4x resources :-)

Benjamin Fritz

Koen Bok Yeah, I figured I need to test it bit by bit. I removed all the unused layers from the original Sketch import by excluding unwanted ones with a - at the end. That worked but still didn't fix the lazy loading. I will try the 1x process and as a last resort I would be happy to send you the link though we are on a NDA and I need to clear that first. Thanks so much for your help so far! Really appreciated.

Benjamin Fritz

Guys, it's verified. With 1x assets everything works fine, though naturally it's too small for the Nexus 6P screen size. Maybe I can try to compress the assets separately or exchange them for JPG versions manually :/

Benjamin Fritz

The 4x assets folder is 14.2 MB, the 1x would be 2.3 MB - seems like that's too much for the Android browsers to render.

Benjamin Fritz

Now I can't even generate a share link with the 4x assets. And it's not the network.

Benjamin Fritz

Worked with Frame Beta somehow. Anyways, shrinking the assets with ImageOptim halfed them in size but didn't improve the flow. Koen Bok - is there a way to contact you directly?

Koen Bok

Sure, just mention me at [email protected].

Read the entire post on Facebook