I'm using the supplied "MvvmCross.WindowsPhone" template from within Visual Studio.
After making all the required changes, when you try and launch the app in the emulator - it just opens and then immediately crashes.
Firstly -when a win phone app exibits this behaviour - check the project properties - startup object. If this isn't set, then when the app launches it can't find what class it must use to initialize the app.
In this case, the startup object wasn't set, but there was nothing in the dropdown, even though there was an App file in the project.
I eventually pinned it down to the App.xaml that isn't marked with a build action of "ApplicationDefinition". (resulting in the startup object in project properties being blank.)
Unfortunately setting the correct build action didn't solve the problem.
Only when I set a different project as startup, and then moved back to the windows phone project, did the compilation work again.
Hopefully the template will be updated to set the correct build action for the App.xaml file.
Related
I wanted to Build my Project like every day, but now I cannot Build the project because I get the following error message in every .xaml File:
the value cannot be null.
parameter name: type
What can I do?
I deleted my bin/obj Folders in Portable and iOS Project, but nothing works.
Thanks.
There is an open bug of this on Xamarin's Github
Following is what helped some people solve this issue:
I've experienced an issue when Xamarin builds changes between Android and iOS. It might be possible to workaround by the following sequence:
Select your iOS project as the startup.
Make sure the Android project is NOT selected to be built in config management.
Clean solution.
Quit VS.
Delete bin & obj from XAML project and from the iOS project.
Restart VS.
Build XAML and iOS projects.
There are more workarounds that you might check if this does not work
We have a custom authorization plugin for OSX, written using this as our base:
https://github.com/skycocker/NameAndPassword
and referencing the official documentation where needed:
https://developer.apple.com/documentation/security/authorization_plug-ins/using_authorization_plug-ins
The plugin was working perfectly, until the Mojave release. With Mojave, our auth plugin UI does not draw and we only see the circular login arrow button. The only way to login is to ssh into the machine, uninstall our auth plugin and re-enable to default OSX login mechanism.
We added additional logging and found that the plugin is indeed being loaded and runs normally. It's just the UI that is not displaying anymore. My guess is that they have changed some requirements for custom auth plugins but have not updated the documentation.
Does anyone have any ideas as to why the UI might not be displaying in Mojave?
EDIT:
Some more information. We have found that we are able to tab through the controls that are part of our plugin. This implies that the controls are actually there, but are either off screen or maybe just not being drawn? Very strange indeed...
EDIT 2:
I tried building the NameAndPassword sample, and it displays fine in Mojave. This sample used a .nib for the interface, which I cannot edit in the recent version of xcode. So, I tried recreating the interface as a .xib and surprisingly, the UI for NameAndPassword is now gone as well!
So, there is perhaps something happening behind the scenes when the .xib file is compiled which is causing the UI to not be drawn, which is NOT happening with a .nib based interface.
Do you have this flag enabled : self.window?.canBecomeVisibleWithoutLogin = true
I created a brand new Gluon mobile multi view with FXML project in IntelliJ CE 2018.2.1 using the Gluon plugin version 2.7.0 and Gradle 4.10.1
I open the Gradle tool window, Pick Project(root), Tasks, Application, run and I do see the generated application run properly, I believe, though it defaults to a mobile device sized window.
I get this error message:
SEVERE: javafx.platform is not defined. Desktop will be assumed by default.
What I'd like to do is debug a single JavaFX program in IntelliJ for all of the supported platforms (except embedded) in Windows and see more or less the right screen sizes before I start plugging in my iPad/iPhone/Android phone/Android tablet/Mac just to get the code logic right.
Is there some setting that would let me switch between simulating different devices as a first stage?
When I double click "debug" I get the following message and the window hangs.
Listening for transport dt_socket at address: 5005
Is this related? Are we trying to debug an actual device by accident?
As for the app size, when you run on desktop it defaults to a phone form factor of 335x600. This comes from the Display service:
#Override
public Dimension2D getDefaultDimensions() {
return isTablet() ? new Dimension2D(900, 600) : new Dimension2D(335, 600);
}
You can change to a tablet format of 900 x 600 if you set the charm-desktop-form system property to tablet.
Or you can simply override these settings, and set your desired size:
#Override
public void postInit(Scene scene) {
Swatch.BLUE.assignTo(scene);
if (Platform.isDesktop()) {
((Stage) scene.getWindow()).setWidth(400);
((Stage) scene.getWindow()).setHeight(800);
}
}
When you deploy your app to a mobile device, it will just adjust to the size of its screen.
Related to the message javafx.platform is not defined running on desktop, that system property is not defined, so it is a warning message that informs that desktop is selected. When you run on mobile, the proper Android or iOS value will be set for the platform.
Finally, about debugging, when you run on desktop you initially can debug only the desktop application, but you can modify the size of the application as mentioned above.
To debug the mobile application, you have to run either the iOS simulator or the Android emulator.
This question shows how to debug on Android from IntelliJ, but you have to actually deploy the application to a mobile device.
On iOS, providing you have a Mac, you can use the launchIPhoneSimulator task to launch the iOS simulator, where you can choose any of the possible iPhone or iPad devices with their different screens resolutions. In this case you don't need a device.
Solution to part 2: Debug the Desktop version from inside IntelliJ.
In IntelliJ, make a new Run configuration of type Gradle and use "run" not "debug" as the "task". Then choose "backpack [run]" from the toolbar and use the "debug" icon on the toolbar. IntelliJ will run the app with the JDWP options enabled and connect the debugger to it.
I'm currently trying to build the mobile client for IOS. There are 2 issue currently lingering:
The mobile client will be used for user to download the app from our test server. When i build, i run the Build Setting and Deploy Target script and tick the checkbox to deploy for another server. However i'm not sure the context path need to be put as what, the current default is /IBMAppCenter
When i try run the app center in the XCode simulator, the app center keep running with a loading icon. I check the log and found that it says:
ERROR: Plugin 'com.ibm.mobile.InstallerPlugin' not found, or is not a CDVPlugin.
Check your plugin mapping in config.xml
I check my native folder (ipad\native\CordovaLib) and true enough, the CDVPlugin was not in the plugin folder, but when i look into the Classes folder, the header (.h) and implementation (.m) files are there. How should i configure to make it work?
Any help is appreciated. Thanks.
About question 1:
The deploy target is irrelevant. It is only relevant for "normal" Worklight applications that are managed by a Worklight Console (so you must specify on which server your Worklight Console runs). But the Application Center client is not managed by any Worklight Console. All what you do is to build the environment, create the IPA and upload it to the Application Center server. Therefore, please only use the "Build all environments" menu item and ignore anything with deploy target!
See here: http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.appadmin.doc%2Fappcenter%2Ft_ac_proj_imp_build.html
About question 2:
The Application Center mobile client for iOS should be in the iphone environment, not in the ipad environment. The code in the iphone environment folder should work for ipad as well but you cannot generate an ipad environment for the Application Center client, as well as you cannot delete the iphone environment and regenerated it via File > New > Environment, because when you do that, the libAppCenterInstallerLib.a gets deleted. You must take the project as it was in your original installation.
Please check IBMAppCenter/apps/AppCenter/iphone/native/appCenterLib. This should contain subdirectories (for Release, Debug ...) which contain libAppCenterInstallerLib.a. The error message that you see means that it cannot find this library; probably because you deleted the iphone environment or because you attempted to create an ipad environment.
Worklight 5.0.5
Android - 4.1
I have been working to merge a native and hybrid code base into a single worklight application. As part of that I have updated my launcher activity launchMode to 'standard' so that when the app is resumed it restores to either the correct webview or to another activity based on last activity the user was viewing. (worklight default projects are set to 'singleTask')
This configuration works fine when building from eclipse directly onto he device. When I create a signed APK copy to the device and install I get different behavior for the resume lifecycle. Here are the steps that create the error
Start App
Change the state of the app
Press Home button
Open application folder
Click app icon
RESULT - App runs onCreate rather than onResume
What is strange is that if I do a long press on home, and choose my app from recently used it resumes as normal. (why would they be different?)
I recently upgraded to 5.0.5 and have only now noticed the issue. Perhaps its related to the new phonegap version?
The issue is easy to recreate with a new Worklight project.
Use the new project wizard with no framework.
Modify your android activity
activity android:name=".SimpleWorklight"
android:label="#string/app_name"
android:configChanges="orientation|keyboardHidden"
android:launchMode="standard"
Update the markup so that you can change its state to prove an onCreate, vs on onResume
<input type="submit" onclick="buttonClick()">
<span id=label>SimpleWorklight</span>
var counter=1;
function buttonClick(){
document.getElementById("label").innerText="Clicked"+counter;
counter=counter+1;
}
It is reasonably similar to this
https://groups.google.com/forum/?fromgroups=#!topic/android-developers/UjWcsFMe6ik
UPDATE - I attempted the same test and got the same result running with 5.0.2.407-developer-edition
Aaron Allsbrook
I resolved this issue, it appears to be a possible bug in android (or maybe just the way android behaves) When you launch from the app icon it basically always starts a new activity on top of the existing one if it was there already. There are a couple of possible solutions mentioned here.
http://code.google.com/p/android/issues/detail?id=2373
I first tried the simpliest approach of adding to the onCreate method
if (!isTaskRoot()) {
finish();
return;
}
but this returned NPEs back from the cordovawebview library. Rather than trying to debug through Worklight and into Cordova I tried the solution found here https://github.com/cleverua/android_startup_activity
Where you create a startup android activity that will look at all the running tasks. If it finds the task running it will simply close the new activity and fall back to the running one. If it doesnt find the task running it will create the new intent and transition over.