iOS Question Configurate UUID of an IBeacon for IOS

Humberto

Active Member
Licensed User
Longtime User
Last edited:

Humberto

Active Member
Licensed User
Longtime User
This error occurs

Application_Start
Error occurred on line: 55 (Main)
Object was not initialized (NSObject)
Stack Trace: (
CoreFoundation <redacted> + 150
libobjc.A.dylib objc_exception_throw + 38
CoreFoundation <redacted> + 0
BLE IBeacon -[B4IObjectWrapper object] + 200
BLE IBeacon -[B4INativeObject RunMethod::] + 84
CoreFoundation <redacted> + 68
CoreFoundation <redacted> + 292
BLE IBeacon +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1784
BLE IBeacon -[B4IShell runMethod:] + 588
BLE IBeacon -[B4IShell raiseEventImpl:method:args::] + 1908
BLE IBeacon -[B4IShellBI raiseEvent:event:params:] + 1328
BLE IBeacon +[B4IDebug delegate:::] + 52
BLE IBeacon -[b4i_main _createbeaconregion::::] + 670
BLE IBeacon -[b4i_main _application_start:] + 1432
CoreFoundation <redacted> + 68
CoreFoundation <redacted> + 292
BLE IBeacon +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1784
BLE IBeacon -[B4IShell runMethod:] + 588
BLE IBeacon -[B4IShell raiseEventImpl:method:args::] + 2192
BLE IBeacon -[B4IShellBI raiseEvent:event:params:] + 1328
BLE IBeacon __33-[B4I raiseUIEvent:event:params:]_block_invoke + 74
libdispatch.dylib <redacted> + 10
libdispatch.dylib <redacted> + 22
libdispatch.dylib <redacted> + 1524
CoreFoundation <redacted> + 8
CoreFoundation <redacted> + 1574
CoreFoundation CFRunLoopRunSpecific + 520
CoreFoundation CFRunLoopRunInMode + 108
GraphicsServices GSEventRunModal + 160
UIKit UIApplicationMain + 144
BLE IBeacon main + 106
libdyld.dylib <redacted> + 2
)
Application_Active


The line is
B4X:
    Return cl.Initialize("CLBeaconRegion").RunMethod("alloc", Null) _
    .RunMethod("initWithProximityUUID:major:minor:identifier:", _
    Array(u, Major, Minor, Identifier))
 

Attachments

  • ibeacon.zip
    1.4 KB · Views: 162
Last edited:
Upvote 0

Humberto

Active Member
Licensed User
Longtime User
I tested with Iphone 4s IOS 9.3.5 and IPad IOS 10.3.3.3

The error in IPad

Application_Start
Error occurred on line: 55 (Main)
Object was not initialized (NSObject)
Stack Trace: (
CoreFoundation <redacted> + 152
libobjc.A.dylib objc_exception_throw + 38
CoreFoundation <redacted> + 0
BLE IBeacon -[B4IObjectWrapper object] + 200
BLE IBeacon -[B4INativeObject RunMethod::] + 84
CoreFoundation <redacted> + 68
CoreFoundation <redacted> + 300
BLE IBeacon +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1784
BLE IBeacon -[B4IShell runMethod:] + 588
BLE IBeacon -[B4IShell raiseEventImpl:method:args::] + 1908
BLE IBeacon -[B4IShellBI raiseEvent:event:params:] + 1328
BLE IBeacon +[B4IDebug delegate:::] + 52
BLE IBeacon -[b4i_main _createbeaconregion::::] + 670
BLE IBeacon -[b4i_main _application_start:] + 1432
CoreFoundation <redacted> + 68
CoreFoundation <redacted> + 300
BLE IBeacon +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1784
BLE IBeacon -[B4IShell runMethod:] + 588
BLE IBeacon -[B4IShell raiseEventImpl:method:args::] + 2192
BLE IBeacon -[B4IShellBI raiseEvent:event:params:] + 1328
BLE IBeacon __33-[B4I raiseUIEvent:event:params:]_block_invoke + 74
libdispatch.dylib <redacted> + 10
libdispatch.dylib <redacted> + 22
libdispatch.dylib _dispatch_main_queue_callback_4CF + 902
CoreFoundation <redacted> + 8
CoreFoundation <redacted> + 848
CoreFoundation CFRunLoopRunSpecific + 470
CoreFoundation CFRunLoopRunInMode + 104
GraphicsServices GSEventRunModal + 80
UIKit UIApplicationMain + 150
BLE IBeacon main + 106
libdyld.dylib <redacted> + 2
)
Application_Active
 

Attachments

  • Ipad.png
    Ipad.png
    118.2 KB · Views: 187
  • Iphone4S.png
    Iphone4S.png
    108.9 KB · Views: 174
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
What is the output of this code:
B4X:
Sub CreateBeaconRegion (UUID As String, Major As Int, Minor As Int, Identifier As String) As NativeObject
   Dim cl As NativeObject
   Dim u As NativeObject
   u = u.Initialize("NSUUID").RunMethod("alloc", Null).RunMethod("initWithUUIDString:", Array(UUID))
   Log(u.IsInitialized)
   Log(u)
   cl = cl.Initialize("CLBeaconRegion").RunMethod("alloc", Null)
   Log("test")
   cl = cl.RunMethod("initWithProximityUUID:major:minor:identifier:", _
       Array(u, Major, Minor, Identifier))
   Log(cl)   
   Return cl
End Sub

?
 
Upvote 0

Humberto

Active Member
Licensed User
Longtime User
Application_Start
true
<B4INativeObject: <__NSConcreteUUID 0x175d3ee0> 68753A44-4D6F-1226-9C60-0050E4C00067>
Error occurred on line: 77 (Main)
Object was not initialized (NSObject)
Stack Trace: (
CoreFoundation <redacted> + 150
libobjc.A.dylib objc_exception_throw + 38
CoreFoundation <redacted> + 0
BLE IBeacon -[B4IObjectWrapper object] + 200
BLE IBeacon -[B4INativeObject RunMethod::] + 84
BLE IBeacon -[b4i_main _createbeaconregion::::] + 2198
BLE IBeacon -[b4i_main _application_start:] + 1432
CoreFoundation <redacted> + 68
CoreFoundation <redacted> + 292
BLE IBeacon +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1784
BLE IBeacon -[B4IShell runMethod:] + 588
BLE IBeacon -[B4IShell raiseEventImpl:method:args::] + 1908
BLE IBeacon -[B4IShellBI raiseEvent:event:params:] + 1328
BLE IBeacon __33-[B4I raiseUIEvent:event:params:]_block_invoke + 74
libdispatch.dylib <redacted> + 10
libdispatch.dylib <redacted> + 22
libdispatch.dylib <redacted> + 1524
CoreFoundation <redacted> + 8
CoreFoundation <redacted> + 1574
CoreFoundation CFRunLoopRunSpecific + 520
CoreFoundation CFRunLoopRunInMode + 108
GraphicsServices GSEventRunModal + 160
UIKit UIApplicationMain + 144
BLE IBeacon main + 106
libdyld.dylib <redacted> + 2
)
Application_Active


Line 77 cl = cl.Initialize("CLBeaconRegion").RunMethod("alloc", Null)
 
Last edited:
Upvote 0

Humberto

Active Member
Licensed User
Longtime User
Hi Erel

I don´t have at this moment, an Iphone witj IOS 11

This software I installed in my device and works as an Ibeacon


Ibeacon is from IOS 7.

Follow the image of my Iphone 4S configurated as Ibeacon and a Moto X reading it

I installed the software that read IBeacon and aldo works ( your example ).

Could you run this code ?
 

Attachments

  • Iphone_1.jpeg
    Iphone_1.jpeg
    32.6 KB · Views: 175
  • Iphone_2.jpeg
    Iphone_2.jpeg
    35.5 KB · Views: 189
  • MotoX.png
    MotoX.png
    170.8 KB · Views: 196
  • Both.png
    Both.png
    148.4 KB · Views: 195
Upvote 0

Humberto

Active Member
Licensed User
Longtime User
This is not working in IOS 9 and IOS 10, but there are some apk that Works with this versions.

What to do?

I'll try to find an IOS 11 or 12 to test, but still. Will remain this isues
 
Upvote 0
Top