iOS Question Push notification application using local build

wl

Well-Known Member
Licensed User
Hi,

Can anyone point me in the correct direction on how to develop/debug/test/deploy an push notification application in B4i.

I would like to use a local build: it seems push notification can not be used/tested using the simulator so I connect an iPhone to my local mac.

Do I use B4iBridge app ? If so: a push notification app can not use a wildcard certificate which is needed for a b4iBridge app (since it adds .bridge to the package name).

I'm completely lost..

Thanks
 

Erel

Administrator
Staff member
Licensed User
I connect an iPhone to my local mac.
You shouldn't.

Do I use B4iBridge app ?
Yes.
If so: a push notification app can not use a wildcard certificate which is needed for a b4iBridge app
You only need to build the bridge once. Once it is installed you can use it to develop and debug any number of apps including apps with explicit app id.

Push notifications tutorial: FirebaseNotifications / Push Messages (server not required)
 
Upvote 0

wl

Well-Known Member
Licensed User
Thank you Erel, but I don't get it.

I currently have an app ID = tld.domain.push and a provisoning profile linked to the same domain (=lms.mobileprovision). Thus no wildcards...

In my B4I project I have:
#CertificateFile: ios_development.cer
#ProvisionFile: lms.mobileprovision

When I run the application through the B4I bridge (build B4I Bridge app) (connecting my iPhone through Wifi) I get:

B4X:
B4i version: 4.01
Parsing code.    (0.00s)
Compiling code.    (0.02s)
Building designer app.    (0.01s)
Building Xcode project    (0.01s)
Sending data to remote compiler.    Error
Out: Build settings from command line:
    ARCHS = armv7
    CODE_SIGN_IDENTITY = iPhone
    CONFIGURATION_BUILD_DIR = /Users/wim/b4i/UploadedProjects/<user id>/Payload
    OTHER_CODE_SIGN_FLAGS = --keychain <user id>
    PRODUCT_NAME = B4i-Bridge
    PROVISIONING_PROFILE = 3467ae98-767e-4e90-9f28-ceb7ac60df6a

=== BUILD TARGET B4iProject OF PROJECT B4iProject WITH CONFIGURATION Release ===

Check dependencies
Provisioning profile "lms" has app ID "tld.domain.push", which does not match the bundle ID "tld.domain.push.bridge".
Code signing is required for product type 'Application' in SDK 'iOS 10.3'


Error: ** BUILD FAILED **


The following build commands failed:
    Check dependencies
(1 failure)

When using an wildcard app ID (tld.domain.*) and matching provision profile: it does work.

I came across https://www.b4x.com/android/forum/threads/build-b4i-bridge.76840/#content in which you seem to state that the bridge only works with wildcard profiles ? If this would be the case: no issue with that except for a push notification app you can't use a wildcard profile so the bridge can not be used to develop/debug/test push notifications ?

Thanks
 
Last edited:
Upvote 0

wl

Well-Known Member
Licensed User
Perhaps I'm missing the point here...

What is exactly the different between:
- building a B4i bridge application (needs a wildcard app id)
- building a release version (does not need a wildcard app id)

As the release version builds also communicates to the device using the bridge and allows for debugging as well ?

Tx
 
Upvote 0

Erel

Administrator
Staff member
Licensed User
building a B4i bridge application
There is no such thing. When you start developing with B4i you need to install B4i bridge on your device. This step requires you to use a wildcard id. Once B4i-Bridge is installed then you can use it to deploy other applications and there are no special requirements.
 
Upvote 0

wl

Well-Known Member
Licensed User
This is what I learned ...

- Initially you need to build and deploy the B4iBridge app (Tools |Build Server | Build B4iBridge app): this is just another app (NOT a special version of your own app). For this you will need to set a wildcard provisioning profile).

- B4i will show instructions on where to go to in your mobile browser to have the B4Ibridge app installed on your iPhone/iPad

- start the B4I bridge app on your iphone/ipad

- in Tools |Set device IP: you will need to set the IP of your iPhone/iPad

- now set your provisioning profile to a non wildcard one (if you need something like push notifications) and go to Tools |Build server | Build release app.

- your app will be installed and can be started/debugged on your device.

PS: I was confused as "Build B4i bridge app" and "Build release version" were in the same menu.
 
Upvote 0
Top