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

fix(ionassethandler.m): fix startPath is getting null #463

Merged
merged 1 commit into from
Mar 25, 2020

Conversation

tobyherrmann
Copy link
Contributor

Problem
We are using Ionic inside a bigger project, which is developed natively. To integrate our Ionic part inside the bigger project on iOS, we build a .framework file and distribute that to the developers of the bigger native part.
If it is used that way, Ionic is hangig on splash screen and not loading index.html.

Solution
We traced the problem back to the IONAssetHandler. In our case self.basePath is null and stringToLoad (or url.path) contains the fully needed path to index.html. But because the first part of the string concatenation is null, the whole startPath gets null. We fixed this by setting startPath first to an empty string instead of null, if self.basePath has no value.

If Ionic is used inside a framework file, self.basePath is null and stringToLoad contains the full
needed path. Current string concatenation does not respect that case, leading to startPath is null
and so index.html is not loaded. Fix this by setting startPath to empty string instead of null if
base path is null.
@nphyatt nphyatt merged commit 0bf16f1 into ionic-team:master Mar 25, 2020
Ionitron added a commit that referenced this pull request Apr 14, 2020
# [4.2.0](v4.1.3...v4.2.0) (2020-04-14)

### Bug Fixes

* **ionassethandler.m:** fix startPath is getting null ([#463](#463)) ([0bf16f1](0bf16f1))
* **ios:** avoid app scrolling to top on keyboard hide ([#533](#533)) ([7974eb4](7974eb4))
* **ios:** Replace deprecated APIs ([#539](#539)) ([27b9021](27b9021))

### Features

* **android:** proxy service worker requests through local server ([#452](#452)) ([c672175](c672175))
* **ios:** implement custom userAgent handling ([#537](#537)) ([8587114](8587114))
@Ionitron
Copy link
Collaborator

🎉 This PR is included in version 4.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

3 participants