How to compile MobileFirst 'apps' for specific envirronment? - ibm-mobilefirst

I am trying compile mobile applications using 'ant' task as shown below
<target name="target-name">
<app-builder
worklightserverhost="localhost:9080"
applicationFolder="/home/apps/CLSDashboard"
environments="desktopbrowser,ipad"
nativeProjectPrefix=""
outputFolder="bin/" />
</target>
But it errors as shown below
BUILD FAILED
/home/clsapp/build_apps_and_adapters.xml:14: Failed building application: You are trying to build iOS environment, but the required attribute 'nativeProjectPrefix' is missing. Add 'nativeProjectPrefix' attribute with project name as value to <app-builder> task and re-run the script.
Though I can understand the error how to avoid building apps for other environments (or) otherwise I want to compile 'apps' only for 'desktop' and 'iPad'

Since you're attempting to build an iOS environment (iPad...) you also need to specify a value for the nativeProjectPrefix property. The value should be the name of the project.
Per the documentation:
The nativeProjectPrefix attribute is mandatory when you build iOS
applications

Related

Kotlin Multiplatform issue : Type 'org.gradle.api.tasks.Copy' property 'sign' doesn't have a configured value

I am trying to build a KMM project everything works fine in Android also in iOS simulator but when I connect an iOS device I get the below error .
FAILURE: Build failed with an exception.
What went wrong:
A problem was found with the configuration of task ':shared:embedAndSignAppleFrameworkForXcode' (type 'Copy').
Type 'org.gradle.api.tasks.Copy' property 'sign' doesn't have a configured value.
Reason: This property isn't marked as optional and no value has been configured.
Possible solutions:
Assign a value to 'sign'.
Mark property 'sign' as optional.
Please refer to https://docs.gradle.org/7.4.1/userguide/validation_problems.html#value_not_set for more details about this problem.
My gradle wrapper properties has 7.4.1, I have used 7.2 version as well same issue.
If anyone can tell me how to resolve this gradle issue to get the framework library ready for iOS project it will be very helpful thanks.
Meanwhile I ll try to figure out myself will update if I find any solution.
Looks like you are missing EXPANDED_CODE_SIGN_IDENTITY. Xcode sets this variable if you select an iOS device. For a simulator In my case, it sets it to -.
Kotlin multiplatform plugin requires this variable to be set for embedAndSignAppleFrameworkForXcode to work properly here.
I think updating Xcode may help. alternatively, you can set EXPANDED_CODE_SIGN_IDENTITY to - if it is not defined.
To do this just update your run script phase:
: "${EXPANDED_CODE_SIGN_IDENTITY:=-}"
./gradlew :shared:embedAndSignAppleFrameworkForXcode
Hopefully, it will help.
The answer is that you need go to 'Build Settings' -> 'Code Signing Identify' and make sure that you have a signing certificate set. You'll need to make sure you have a Team selected in 'Signing & Capabilities' as well.

Failure writing debug information: Unable to load DLL 'Microsoft.DiaSymReader.Native.amd64.dll'

I installed a VS2017, tried to develop a first app in VS2017.
File > New Project > Visual Basic > Windows Desktop > Windows Forms App (.NET Framework)
simply tried to run an app with only one label on form, but build error comes up, I clicked on "Yes" then dialogue box appears (image).
Error Code- BC37225
Error Message- Failure writing debug information: Unable to load DLL <br>'Microsoft.DiaSymReader.Native.amd64.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Then searched SO, read and tried solutions, but not worked.
What I tried from SO is-
Error while building C# Console Application: Error CS0041 Cannot find a module
(1) installed Microsoft.NETCore.Platforms (nuget package)
(2) installed Microsoft.DiaSymReader.Native.amd64.dll (nuget package)
(3) Unable to load DLL 'Microsoft.DiaSymReader.Native.amd64.dll
in this, solution is available (accepted answer), but I don't know from where to delete these lines of code.
<PropertyGroup>
<Deterministic> true </Deterministic>
</PropertyGroup>
what could be the solution?
When the build errors dialog comes up it asks if you want to run a previous build because the current build will not compile (won't make a new .exe file) Since this is the first run of your program there was no previous build, no .exe. What you need to resolve are the build errors.

Out of process server in VOIP

I found voip example on github for UWP. Now I'm trying to create my voip app, and I want to use VoipHost project in my app. I added existing project, edited package manifest file. When I want to deploy the app to the device I get error:
Severity Code
Description Project
File Line
Suppression State Error
DEP6701 : Bootstrapping failed with unexpected error: 'The ID value is not specified. Parameter name: id'.
VoipHost
And one warning:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(1930,5): warning APPX1708: The executable 'VoipHost.exe' is specified as the implementation for the .winmd file. Only in-process servers are supported for generating registration information in the app manifest. You must specify the out-of-process server registration information in the app manifest.
Any advices?
Many thanks.
I had a similar issue deploying a headless application with Windows IoT running in a Raspberry pi 3. I solved the problem giving an "Assembly Identity" in the project properties.
You can do that following the next steps: Rigth Click to project --> Properties --> Manifest Tool --> General.
Fill the field "Assembly Identity" with any number. After that compiles, run and works like a charm.

WatchkitUpload Issues

We have discovered one or more issues with your recent delivery for "xxx Mobile". To process your delivery, the following issues must be corrected:
Invalid WatchKit Support - The WatchKitSupport2 folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it.
Invalid Executable - The executable '***.app/Watch/watchkitapp.app/PlugIns/watchkitapp Extension.appex/watchkitapp Extension' does not contain bitcode.
Once these issues have been corrected, you can then redeliver the corrected binary.
For second issue you need to enable bitcode for your app target as its required for watch apps.
Select your iOS app target- > Build Settings - > Build Options - > Enable Bitcode
Set it to true.
Refer this for App Thinning

MonoDevelop and AjaxControlToolkit: Register Server Tag in Mono

I know that Mono supports the AjaxControlToolkit but I don't know how to integrate it into MonoDevelop. I added AjaxControlToolkit.dll, System.Web.Extensions.dll and System.Web.Extensions.Design.dll as References in the project but when I build the project I get the warning:
/Users/user1/Projects/FirstProject/Default.aspx(1,1): Warning: Parser failed with error The tag type 'ajaxToolkit:TabContainer' has not been registered.. CodeBehind members for this file will not be added. (FirstProject)
and I when I deploy it I get the error: Unknown server tag 'ajaxToolkit:TabContainer'.
How do I register the server tag in MonoDevelop?
You can use either the <%#Register directive, or add some lines to your Web.config. See here for instructions on either approach.
Using the Web.config mechanism has the advantage that you don't need to add a directive to every page where you want to use the controls.