iOS Question solved - An error occurred when upgrading from B4i v8.0 to 8.3

roddy

Member
Licensed User
Longtime User
The same program, originally using v8.0 is normal, but an error occurs when it is upgraded to v8.3 .
Am I missing something?


Here is the code::
60    Private analytics As FirebaseAnalytics
61    Private fm As FirebaseMessaging


77    analytics.Initialize
78    App.RegisterUserNotifications(True, True, True)
79    App.RegisterForRemoteNotifications
80    fm.Initialize("fm")


173  Private Sub GetToken As String
174    Dim no As NativeObject
175    Dim token As NativeObject = no.Initialize("FIRInstanceID").RunMethod("instanceID", Null).RunMethod("token", Null)
176    If token.IsInitialized Then Return token.AsString Else Return ""
177  End Sub


error message::
FCMConnected
Error occurred on line: 175 (Main)
Object was not initialized (NSObject)
Stack Trace: (
  CoreFoundation       F3021642-E3C0-33F8-9911-DD303A6056D0 + 1157612
  libobjc.A.dylib      objc_exception_throw + 56
  CoreFoundation       F3021642-E3C0-33F8-9911-DD303A6056D0 + 120016
  result               -[B4IObjectWrapper object] + 108
  result               -[B4INativeObject RunMethod::] + 100
  result               -[b4i_main _gettoken] + 368
  result               -[b4i_main _fm_fcmconnected] + 376
  CoreFoundation       F3021642-E3C0-33F8-9911-DD303A6056D0 + 1175856
  CoreFoundation       F3021642-E3C0-33F8-9911-DD303A6056D0 + 8656
  result               +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1296
 result               -[B4IShell runMethod:] + 420
 result               -[B4IShell raiseEventImpl:method:args::] + 1472
 result               -[B4IShellBI raiseEvent:event:params:] + 1360
 result               __33-[B4I raiseUIEvent:event:params:]_block_invoke + 52
 libdispatch.dylib    AF27E74C-BE4A-3364-BB27-AED9916CE02D + 393880
 libdispatch.dylib    AF27E74C-BE4A-3364-BB27-AED9916CE02D + 397952
 libdispatch.dylib    AF27E74C-BE4A-3364-BB27-AED9916CE02D + 65628
 CoreFoundation       F3021642-E3C0-33F8-9911-DD303A6056D0 + 632288
 CoreFoundation       F3021642-E3C0-33F8-9911-DD303A6056D0 + 608904
 CoreFoundation       CFRunLoopRunSpecific + 572
 GraphicsServices     GSEventRunModal + 160
 UIKitCore            CC6E5AC7-8248-35F6-8B42-2E25C93DCF0A + 11723508
 UIKitCore            UIApplicationMain + 164
 result               main + 96
 libdyld.dylib        0B475C78-3C12-3121-B7F8-2B95B83DAF44 + 5480
)
 
Last edited:

aeric

Expert
Licensed User
Longtime User
If you are not using hosted builder, you need update the firebase library.

See point #2
 
Upvote 0

roddy

Member
Licensed User
Longtime User
If you are not using hosted builder, you need update the firebase library.

See point #2
Thank you for your reply.

I Updated Firebase300.zip
Whether using Local MAC or Hosted Builder, the result is the same.

b4iset.jpg
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Upvote 0

tufanv

Expert
Licensed User
Longtime User
Sorry, I don't understand OBJECTIVE-C.

How to rewrite this code?
Can you help me?
B4X:
    Dim FIRMessaging As NativeObject
    FIRMessaging = FIRMessaging.Initialize("FIRMessaging").GetField("messaging")
    Dim token As NativeObject = FIRMessaging.GetField("FCMToken")
 
Upvote 1

tufanv

Expert
Licensed User
Longtime User
it was also available here by Erel:
 
Upvote 0

roddy

Member
Licensed User
Longtime User
it was also available here by Erel:
I didn't find this thread, otherwise it would have saved me a lot of time.
Thanks again.
 
Upvote 0
Top