While https://www.b4x.com/android/forum/threads/mails-and-sms-messages.46131/#content compiles to the Simulator on the included video, for me the BarButtons only appear when I comment these lines:
Then clicking 'SendMail' has error on line 54:
I have compiled several other pages ok.
What might have changed since the tutorial was made?
Am using Build server 5.02, Xcode v9.4.1, High Sierra
B4X:
'mailButton.Enabled = mailc.CanSendMail
'smsButton.Enabled = smsc.CanSendText
B4X:
Application_Start
Application_Active
Error occurred on line: 54 (Main)
Object was not initialized (MFMailComposeViewController)
Stack Trace: (
CoreFoundation __exceptionPreprocess + 294
libobjc.A.dylib objc_exception_throw + 48
CoreFoundation +[NSException raise:format:] + 197
B4i Example -[B4IObjectWrapper object] + 143
B4i Example -[B4IMailComposer SetToRecipients:] + 55
B4i Example -[b4i_main _sendmail] + 792
B4i Example -[b4i_main _page1_barbuttonclick:] + 753
CoreFoundation __invoking___ + 140
CoreFoundation -[NSInvocation invoke] + 308
B4i Example +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1645
B4i Example -[B4IShell runMethod:] + 401
B4i Example -[B4IShell raiseEventImpl:method:args::] + 1781
B4i Example -[B4IShellBI raiseEvent:event:params:] + 1673
B4i Example __33-[B4I raiseUIEvent:event:params:]_block_invoke + 50
libdispatch.dylib _dispatch_call_block_and_release + 12
libdispatch.dylib _dispatch_client_callout + 8
libdispatch.dylib _dispatch_main_queue_callback_4CF + 1279
CoreFoundation __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
CoreFoundation __CFRunLoopRun + 2342
CoreFoundation CFRunLoopRunSpecific + 635
GraphicsServices GSEventRunModal + 62
UIKit UIApplicationMain + 159
B4i Example main + 111
libdyld.dylib start + 1
??? 0x0 + 1
)
I have compiled several other pages ok.
What might have changed since the tutorial was made?
Am using Build server 5.02, Xcode v9.4.1, High Sierra