iOS Question B4i equivalent to B4a

Stefano Di Chiano

Active Member
Licensed User
Hi,
I need to make the B4i version of a B4a app, but I can't find all the equivalent libraries and some code parts. Can someone help me find what I need or suggest me another way to get the same result?
I'm using these libraries:
- QRCodeReaderV102, "BitmapCreator", "Bytes Converter" to scan and create QR codes.
- GeoLocation, GPS, and "RuntimePermissions" to get the location of the user when scanning a QR code.

I'm also looking for the equivalent of:
Write file in DirDefaultExternal:
File.WriteList(File.DirDefaultExternal, "File.txt", List)
and:
jsonparser nextvalue:
Dim parser As JSONParser
parser.NextValue
I see that there is "parser.NextObject" but the IDE gives me a warning when I try to assign the returned value to a string. I wonder if that's ok.
 

aeric

Expert
Licensed User
Longtime User
To scan barcode in B4i you can use iBarcode library
or check
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
To generate QR code

The forum search is working
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
for barcodes you have the iBarcode library:

and for qr barcode you have a b4x solution:

GPS location tracking can be done like this:

there are no runtime permission like in android but what you need to do is add an explanation text of the purpose of using the special hardware like GPS, microphone, etc... to the Plist.

example for GPS:
B4X:
  #PlistExtra:<key>NSLocationWhenInUseUsageDescription</key><string>Used to display the current navigation data.</string>
   #PlistExtra:<key>NSLocationUsageDescription</key><string>Used to display the current navigation data.</string>


File.WriteList(File.DirDefaultExternal, "File.txt", List)

* in ios you cannot access the external storage so all you can do is saving data in your File.DirDocuments directory.

B4X:
    File.WriteList(File.DirDocuments,"File.txt", List)

(there are more folders you can save data to but File.DirDocuments is the place you should save data that u want to use in your app)

note that you can save images to the gallery app and also make your folder sync-able with iTunes! but access to external storage is not possible.

* json parser (iJson) should be the same in b4i.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
I almost never use json in my apps but i would try parsernextobject. Seems logical for me. Does it return the next value?
 
Upvote 0

Stefano Di Chiano

Active Member
Licensed User
I almost never use json in my apps but i would try parsernextobject. Seems logical for me. Does it return the next value?
No, and I get the following error:
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
have a look at this:

 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…