Comments (15)
Is this iOS or Android?
from nativescript-email.
This is on iOS, its really quite random though. Like right now my device is plugged in and i'm running on livesync and i'm not seeing either of these issues happen.
from nativescript-email.
I've seen this happen on the simulator only, not on a device yet. Which iOS version is this (and which device)?
from nativescript-email.
I am running 9.3 and its a 6s
from nativescript-email.
I have a strong suspicion this line should be in a broader scope. That MFMailComposeViewController
may be garbage collected when the composer is open (and your app is in the background). I just remembered a similar issue I've seen in a Cordova plugin.
from nativescript-email.
Another cause could be the animated hiding of the compose and your app perhaps performing a transition at the same time (or showing a dialog).
from nativescript-email.
Okay so the second scenario i'm not doing in my app, i'm letting your plugin return to the same view it was initiated from. When i built it for messenger plugin, this is where i allocated:
https://github.com/firescript/nativescript-messenger/blob/master/index.ios.js#L53
from nativescript-email.
Interesting line of code
🤔🤔🤔🤔🤔
from nativescript-email.
Yeah that addition was from @ivanbuhov pretty sure I was having weird closing issues before. Thats when we added that
from nativescript-email.
can you add that locally to this plugin and keep an eye on it perhaps?
from nativescript-email.
The initial part needs to be wrapped in a NSObject.extend to create the delegate, it started getting a little over my head when @ivanbuhov took over lol, I can try and play around with it though!
from nativescript-email.
Let me know if you can pull it off, otherwise I'll take a look later this week. Thanks!
from nativescript-email.
The idea behind this line is to keep the delegate instance alive. Since the messageComposeDelegate
is weak it will not retain the delegate instance and after the JS wrapper is collected, the native instance will be deallocated, too. Explicitly retaining and releasing the delegate prevents its preliminary deallocation.
from nativescript-email.
I'm having similar problems as well. After sending an email, sometimes the app crashes. Other times the app returns to the view it was initiated from, but the screen is frozen. No errors in the console (and this is not run: console.log("Email composer closed");
). Sometimes it returns from sending an email without errors.
from nativescript-email.
@grasshoppermouse Thanks for reminding me of this issue - totally slipped my radar. Just released 1.3.4 which should fix this.
from nativescript-email.
Related Issues (20)
- Image CID?
- Hint not showing on iOS? HOT 4
- More restrictive emailapp filtering HOT 1
- Set new activity flag for Android
- AndroidRuntimeException HOT 1
- android.intent.action.SENDTO HOT 5
- Attachments not working. HOT 5
- Cannot read property 'toString' of null when running on android 5 HOT 2
- Not working when Webpacked on Android
- Support for "markingMode" flag
- IOS: Email compose not opening when called from modal HOT 5
- HTML support in composed email HOT 1
- Module not found: Error: Can't resolve 'nativescript-email' HOT 1
- Cannot use compose when presented from a modal view on iOS HOT 1
- Attaching PDFs HOT 9
- ios device available() returns false
- Don't cache the availability check
- open email client HOT 1
- email.available not working properly on iPad Pro (4th generation)
- Error when being used with NativeScript version 8 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-email.