1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

iOS Question Configurate UUID of an IBeacon for IOS

Discussion in 'iOS Questions' started by Humberto, May 13, 2019.

  1. Humberto

    Humberto Active Member Licensed User

    Last edited: May 13, 2019
  2. Erel

    Erel Administrator Staff Member Licensed User

    Example of advertising an iBeacon is attached.
     

    Attached Files:

  3. Humberto

    Humberto Active Member Licensed User

    This error occurs


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

    Attached Files:

    Last edited: May 14, 2019
  4. Erel

    Erel Administrator Staff Member Licensed User

    Have you changed anything in the project?
     
  5. Humberto

    Humberto Active Member Licensed User

    Just the name and certificate
     

    Attached Files:

  6. Erel

    Erel Administrator Staff Member Licensed User

    Put a breakpoint in line 50 and check the value of 'u'. Is it initialized?

    Are you testing it on a real device? Which version of iOS?
     
  7. Humberto

    Humberto Active Member Licensed User

    I tested with Iphone 4s IOS 9.3.5 and IPad IOS 10.3.3.3

    The error in IPad

     

    Attached Files:

  8. Erel

    Erel Administrator Staff Member Licensed User

    What is the output of this code:
    Code:
    Sub CreateBeaconRegion (UUID As String, Major As Int, Minor As Int, Identifier As StringAs 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
    ?
     
  9. Humberto

    Humberto Active Member Licensed User


     
    Last edited: May 16, 2019
  10. Erel

    Erel Administrator Staff Member Licensed User

    Are you sure that your devices support BLE?

    Can you test it with an iOS 11+ device?
     
  11. Humberto

    Humberto Active Member Licensed 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 ?
     

    Attached Files:

  12. Erel

    Erel Administrator Staff Member Licensed User

    Yes, of course.

    Can anybody else try the project from post #2? Just run it and see if it crashes or not.
     
  13. Humberto

    Humberto Active Member Licensed User

  14. Erel

    Erel Administrator Staff Member Licensed User

    These are the same API that is called by the code I posted.
     
  15. Humberto

    Humberto Active Member Licensed 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
     
  16. Erel

    Erel Administrator Staff Member Licensed User

    It does look that your devices do not support this feature. It is worth testing it with a newer device.
     
  17. Humberto

    Humberto Active Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice