Codenameone ComponentGroup is not displayed on the real ios device - ios

I'm developing cross platform app with Codename One. For iOS version of my app I want to ComponentGroup would be shown on the form. I added ComponentGroup element in CN Designer tool and it's displayed normally on simulator. Then I installed my app on the real iPhone, and my form on it is different from the one I've created in Designer tool - ComponentGroup is not displayed. What I'm doing wrong?
I want my form to look like this
This is how my form looks on real iPhone

In your theme constant you have to set ComponentGroupBool to true.

Related

TBannerAd doesn't show ads

I've created a new App in Delphi 10.3.3 Community Edition, placed a TBannerAd, aligned it to bottom and I have a Button which loads the Ad (BannerAd1.AdUnitID:='ca-app-pub-XXXXXXXXXXXXXXXX/XXXXXXXXXX'; BannerAd1.LoadAd;). I tried The TBannerAd with the sizes "auto" and "small" but when I click the button on the running App no Ad is shown. Everything I do in my App works, but there are no ads shown. I used a Huawei ALE21 with stock rom (Anndroid 6) and a Samsung SM-A605FN/DS (A6 plus) also with stock rom to test the App. I tried test mode and normal mode, but in both cases there is no ad shown. I don't even get an error and I don't have any email from admob which tells me that it doesn't work... On my old computer (Same Delphi version and same mobile phones) I got ads to work. Now on a fresh installed Windows 10 with nothing more than Delphi and a few normal Apps I can't make an app with ads on it. And I don't use any ad blocking app on my phones. They're both stock rom.
Can anyone give me a hint why I can't display any ads without getting an error?
UPDATE: Google sent me an email a few days later saying my app code should change and the ads are not shown until my app fulfills requirements and some stuff like that.. so I guess the issue was I was trying just to show an ad to test ads are working and there was no real content in my app. After trying it a few weeks later in a real app I was trying to get ads shown in it it worked.. So sorry for asking this question. I just didnt know Google dooesnt show ads on blank apps..
Try setting the BannerAd's alignment to bottom and ensure that it has sufficient height. Start with the small size of Ad. Use the OnDidFail and OnDidLoad to debug. In my case I fixed the issue by the alignment and choosing small or medium size of Ad. Couldn't get the large or auto size to work so I am sticking with medium. Also, my BannerAd.TestMode is set to true as I am using the test ID provided by Google (I suppose you have done the same).
did you already set True on Project > Option > Application > Entitlement List > AdMob Service
I guess the simple answer is that there just are no ads to be shown available.. I get an error 3 code, which means the google ad server has nothing for me to show.. I think I should try other phones/accounts as well to get some ads running

Universal link with branch.io doesnt work with iPhone when it works with iPad

My App is in production now, and within my app I create a Universal link using branch.io and share it to other users using for example iMessage. Example link below I got from my friend is below:
I have the app from App Store installed on both devices: iPad and iPhone. Now the above link I tap on iPad and everything is fine. My App is opened I can catch the link:)
But when I tap it on iPhone the result is following:
Why? Shouldnt it works the same way on both: iPad and iPhone? I do not know what is wrong here... Any questions? I can change and add additional info here to help the solve the problem.
This is how I defined it in dashboard of branch.io:
You are encountering a new behavior introduced with iOS 10.3. The pop-up you are seeing will open the app now only if the user responds to the pop-up alert affirmatively. You must have not yet updated your iPad.
There is an unexpected issue with this new behavior beyond the obvious:
if the user taps "Cancel" on the pop-up alert, he or she will be stuck on a blank page in Safari. To improve this experience I recommend setting the $ios_passive_deepview parameter to the key of a Deepview of your choice (branch_default is the default, I believe).

Is it possible to deploy both the iphone and ipad *.ipa to the Application Center?

I am able to build both the iphone and ipad ipa files (app.ipa and app-ipad.ipa) fine. However, when I go to deploy them to the Application Center via the native-deployer api,
the Application Center only shows one app of type "ios", where I expect two apps, one for iphone and one for ipad.
Since this is one worklight project. The application-descriptor is the same. The version number and bundle ids are exactly the same. What do I need to change to differentiate them?
I think if the bundle id is different Application Center will discern them, for sure. But worklight did not change the bundle id when I added the environment, so I left them unchanged.
The bundleId value in application-descriptor.xml for the iPad and iPhone environments is merely a placeholder. Obviously, you need to change it.
You can change it either in application-descriptor.xml, in which case it will be pre-set by the time you open the generated Xcode project in Xcode. Or you can set it when you open the project in Xcode.
The simplest way is to just set it in application-descriptor.xml...
Note that Worklight has got nothing to do with your iOS app once it is generated and you want to release it. Any and all configurations are then mostly related to Xcode settings of your application. Read more here:
Configuring Your Xcode Project for Distribution
Another thing to note is that a Worklight-based iOS app, be it the iPhone or iPad environment is configured as a Universal app by default (fit for both iPhone and iPad). Perhaps what is missing in your case is to differentiate the two.
In Xode, for each project (iPhone and iPad), look for the setting to set it as an iPhone or iPad app, rather than Universal app.
Then, try uploading to the Application Center management console again and check if you are now able to see TWO apps.

IBM Worklight - What to create, an iPhone and iPad Environments or iPad Environment and iPhone skin?

I have developed an application for iPad and now I want to adapt it to iPhone, then I realized that I have two options: I can create an iPhone Environment or create a skin for iPhone.
The point is that if I create iPhone and iPad environments and I upload both .ipa to the application center, the user will find two applications with the same name available for download. I have not found the way to avoid this in Application Center. I can only add the platform in the description.
What is the best option? What is the difference between iPad and iPhone Environments?
EDIT: I'm not being able to create a skin in the iPad Environment, the getSkinName function is not executed.
The Xcode projects generated by Worklight Studio for the iPhone and iPad environments are both created with the Universal application setting. Their codebase (Worklight-framework related) is mostly the same...
You can change the generated project from being Universal to being device-specific. This is a setting that you can tweak in Xcode.
Note: of course, you need to use different bundleIds for each...
See this documentation article by Apple: https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/ConfiguringYourApp/ConfiguringYourApp.html
After doing so, the App Center management console will be able to distinguish between the iPad and iPhone app. You can then simply edit the upload entry and give it a different label. This label change only affects what you see in the management console, not the app name itself, so all is good.
If you want to keep your app size to a minimum, then I would go for seperate environments rather than using Skins.
This will also help by giving you more control over your users (using Direct Update, Remote Disable, etc...) in case you have an issue only in the iPhone or iPad app.
I have also confirmed that Worklight Skins do work in the iPad environment.
Created a new Worklight project ("test") and application ("test")
Added the iPad environment
Added a skin ("ipad.skin")
Added a new appName.js (for Worklight 5.0.6/6.0, or main.js for Worklight 6.1) file in the ipad.skin\js folder with:
alert ("test");
Edited ipad\js\skinLoader.js file to use:
function getSkinName() {
return "ipad.skin";
}
Built and deployed
Opened and ran in Xcode
Result: the app opened in the iOS Simulator with an alert stating "test". Ergo, works...
Please make sure you have followed these steps.

Unwanted virtual keyboard in Blackberry app

I have developed a Blackberry app for the 4.5 os series.
It works fine on all device except on the storm 1 (storm2 untested).
The problem (on the storm) is that the main screen of my application (and all other screens in fact) is shown with the virtual keybord. But there is no text field displayed on the screen that would justify the VK to show up.
I have bitmap fields and button fields only on that screen.
The use of a single program for all devices (4.5 and up) is seriously preferred.
What is causing the VK to show up and what can I do to prevent it (in JDE 4.5)?
You could compile your application for OS 5.0 or 4.7(depending on the OS on the device) on the storm to make sure the app will not run in compatibility mode.
Or you can change how your app is setup in the JAD.
Here is a KB article from RIM
RIM-TouchCompatibilityMode: false
RIM-TouchCompatibilityMode-UserChangeable: false
You can also [disable compatibility mode] within the device after the app is installed2.
Navigate to the Applications list by
clicking Options -> Advanced Options
-> Applications.
Locate and select the third-party
application.
Display the menu and click Disable
Compatibility Mode.
if(VirtualKeyboard.isSupported())
getVirtualKeyboard().setVisibility(VirtualKeyboard.HIDE_FORCE); //Force to close the virtual Keyboard.
you will compile in 4.7 and use preprocesor directives to detect if Virtual Keyboard is supported, then force to close..
//#ifdef BlackBerrySDK4.7.0
if(VirtualKeyboard.isSupported())
getVirtualKeyboard().setVisibility(VirtualKeyboard.HIDE_FORCE);
//#endif

Resources