I have few Xamarin apps and I want to bundle them all as a single pkg/installer and organize them into a folder under Applications similar to the following snapshot attached. Is there an option to specify additional Xamarin apps in the bundle settings of the project or any build script needs to be written? Can anybody point to some samples ?
Thanks,
Suma.
1. pkg installer: Packages
See Payload section to add folder and your .app files.
They also support Certification for signing Developer Installer and Commandline. Just check the documentation.
2. Automation Build script:
Use Packages to create .pkgproj file that config your bundle apps
Go Xamarin Studio -> Project Options -> Custom Command -> Add new Common After Build: add script to copy all bundle apps to a folder that configured by above .pkgproj file
Run command line packagesbuild of Packages to build the .pkgproj file
Finish. Get your .pkg installer file in Build folder.
Related
I have an electron app that I want my users to be able to install. However, a dependency of this app is a C++ package that I have compressed in a .zip file. I need the user to unzip this file and put it into a certain directory under Program Files (target platform is windows). Is it possible to create an installer that both installs the electron app and contains a payload that it can unzip and put into that directory?
Yes, this is possible. An Electron app is just a bunch of files that you can package however you want. A great tool for packaging Electron apps is electron-builder
electron-builder uses NSIS by default to build Windows setups. It also provides a way to customize the NSIS script
If you want to include additional resources for use during installation, such as scripts or additional installers, you can place them in the build directory and include them with File. For example, to include and run extramsi.msi during installation, place it in the build directory and use the following:
!macro customInstall
File /oname=$PLUGINSDIR\extramsi.msi "${BUILD_RESOURCES_DIR}\extramsi.msi"
ExecWait '"msiexec" /i "$PLUGINSDIR\extramsi.msi" /passive'
!macroend
In your case, instead of extramsi.msi, you'll probably want to include 7zip standalone console version and your additional .zip file. You can use this custom script to extract this file to wherever you want
Hello I develop this iOS app use Dart language.
recently, Develop completed.
To upload an iOS app to your AppStore, need to set it up on that site.
https://developer.apple.com/
https://appstoreconnect.apple.com/
and I try Build -> Archive click on Xcode
but fail message
ios/Runner/GeneratedPluginRegistrant.m:6:9:
'device_info/DeviceInfoPlugin.h' file not found
How to fix header file not found message on Xcode?
thanks
I just discovered that this class of error can also come about when you inadvertently open the project file Runner.xcodeproj instead of the workspace file Runner.xcworkspace.
Two options
1.Using the command line build your project using "flutter create -i swift appname".
2.If you've already created a project you'll have to add 'use_frameworks!' to your podfile.
Option 2 might not be the best option because there is a cocoapods issue that causes certain packages like OneSignal will cause the app build to fail.
I'm having a problem deploying an update of my app to the store.
The app runs SQLite, and I've recently discovered it throws an error on certain x64 architectures.
BadImageFormatException: An attempt was made to load a program with an
incorrect format.
I understand what this means. The x64 version of the app is using the x86 compiled version of sqlite3.dll. I can get around this issue and build an x64 version by the following method.
Open Project > Properties, and set Platform and Platform Target to x64.
Save
Open Build > Configuration Manager and set Active Platform and Platform (Release) to x64.
Build the project
Open Project > Store > Create App Packages and generate my package
This creates a correct x64 app package with the x64 version of sqlite3.dll
Following this for all three architectures (x86, x64 and ARM) gives me three separate appxbundle files. When I go to upload a new package to the store through the developer dashboard, I can only upload one of these.
If I open "Create App Packages" and choose all three architectures for my bundle, it generates a single appxbundle for all three. However when I unzip this appxbundle I can see that the x64 build is using the x86 compiled sqlite3.dll and not the x64 version.
I tried opening the appxbundle in 7zip and replacing the files, but 7zip could not write to the file, only read it.
I then tried unzipping the appxbundle and replacing each of the three builds with the correct builds from the singular appxbundles. I then zipped the lot together using no compression and renamed .zip to .appxbundle, but the store rejected this as an invalid file.
I'm guessing there's some kind of signing going on or a proprietary compression. To be honest I didn't expect that to work but it was worth a try.
How do I build the correct version of my app for each architecture and include it in a single appxbundle? Can I manually create my own appxbundle from separate builds?
SOLUTION
I have accepted crea7or's answer below, but I just wanted to expand on it a little
Using the MakeAppX.exe command line tool I was able to unbundle and rebundle my appxbundle file correctly, using the following command
// to unbundle
MakeAppX.exe unbundle /p MyPackage.appxbundle /d MyPackage
// to bundle
MakeAppX.exe bundle /d MyPackage /p MyPackage.appxbundle
A couple of handy pointers. Make sure you use the 8.1 version of MakeAppX, as the 8.0 version cannot bundle or unbundle.
C:\Program Files (x86)\Windows Kits\8.1\bin\x86\makeappx.exe
You'll save yourself a lot of hassle and typing if you simply add this path to your PATH Environment Variables in Advanced system settings. That way you can run MakeAppX from any location. This might seem obvious to people of my generation but not everyone is so familiar with DOS. =)
Visual Studio creates .appxupload packages, which according to this question, are zip files renamed as .appxupload. MakeAppX cannot create or unbundle .appxupload packages - you have to use a zip app.
However, any .appxupload package I created with 7zip did not validate when uploaded. Luckily it seems that the store will accept the .appxbundle directly, so I didn't need to zip it up at all, only bundle it. I've submitted this to the store. I'll report back if it gets approved.
update
the above appxbundle file was not approved, failed technical tests. I tried the zip approach again and it was accepted this time, again I'll report back if this passes.
To sum up:
c:\MyApp.appxupload -> [unzip] -> c:\MyApp\
c:\MyApp\MyApp.appxbundle -> [makeappx unbundle] -> c:\MyApp\MyApp\
c:\MyApp\MyApp\MyApp.appx -> [do whatever you need to here]
c:\MyApp\MyApp\ -> [makeappx bundle] -> c:\MyApp\MyApp.appxbundle
c:\MyApp\ -> [zip] -> c:\MyApp.zip
c:\MyApp.zip -> [rename] -> c:\MyApp.appxupload
You should use MakeAppx tool to create valid appx package bundle, because they are signed. Here is the tutorial about creating bundles.
Until now, all of my experience compiling PhoneGap apps has been via the excellent PhoneGap:Build service. However, I now find myself in a situation where I need to compile locally, because I need to use a plugin that includes a binary file, which precludes it from being included for use with PG:B.
So for these reasons, I need to compile locally. "Great!" I thought, I'll just use the new CLI...
I have developed my app, and I can test it on-device via deploy over USB from Xcode, but trying to get a release build, and sign it, with the provisioning profile embedded, has been a nightmare.
For completeness, this is the basic outline of everything I've done, aside from the app development itself.
$ pwd
/users/adam/dev/myapp/mobile/
$ cordova create build_local com.foo.bar MyApp
Creating a new cordova project with name "MyApp" and id "com.foo.bar" at location "/Users/adam/DEV/myapp/build_local"
$ cd build_local
$ cordova platform add ios
Creating ios project...
$ cordova platform add android
Creating android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.foo.bar
Name: MyApp
Android target: android-19
Copying template files...
<snip>
Project successfully created.
$ cordova plugin add https://github.com/hazemhagrass/BackgroundJS
Fetching plugin "https://github.com/hazemhagrass/BackgroundJS" via git clone
Installing com.badrit.BackgroundJS (android)
Fetching plugin "https://github.com/apache/cordova-plugin-device.git" via git clone
Installing org.apache.cordova.device (android)
Installing com.badrit.BackgroundJS (ios)
Installing org.apache.cordova.device (ios)
$ cordova plugin add de.appplant.cordova.plugin.local-notification
Fetching plugin "de.appplant.cordova.plugin.local-notification" via plugin registry
Installing de.appplant.cordova.plugin.local-notification (android)
Installing de.appplant.cordova.plugin.local-notification (ios)
$ cordova plugin add https://github.com/kdzwinel/phonegap-estimotebeacons
Fetching plugin "https://github.com/kdzwinel/phonegap-estimotebeacons" via git clone
Installing pl.makingwaves.estimotebeacons (android)
Installing pl.makingwaves.estimotebeacons (ios)
For what it's worth, this last plugin is the reason that I have to compile locally.
Now, here's one other potential monkey wrench: This app is actually two apps. It's the same core codebase, merged into two different deployment branches of the repo, one for each client. So each app will have its own id, name, and config stuff. Because of this, I actually have more than one cordova project folder (1 for each final app) and after creating each project through the steps above, I remove the generated www folder and replace it with a symlink to the shared www folder that exists outside of these phonegap project directories.
This is supported behavior; the CLI allows you to generate your app with a symlink via the --link-to flag (see cordova help create for details). However, doing so seems to have issues; so I've resorted to doing all of the app config up front and then replacing the generated www folder with a symlink after everything is ready to compile.
At this point, I can deploy to either the iOS simulator or Android emulator, and I can deploy to devices over USB, and everything works just fine; all of my plugins are available and function as expected. So I'm ready to compile a release build. Android is easy. iOS, not so much.
$ cordova build ios
<snip>
** BUILD SUCCEEDED **
However, this is a DEV build. The generated file is in the build/emulator/ folder, and when I attempt to sign it, I'm told that it's not signed because of the I386 architecture (which indicates that it's a development build).
$ xcrun -sdk iphoneos PackageApplication -v "platforms/ios/build/emulator/MyApp.app" -o "/users/adam/dev/myapp/MyApp.ipa" --sign "iPhone Distribution: {our cert name} ({our cert id})"
<snip>
Codesign check fails : platforms/ios/build/emulator/MyApp.app: code object is not signed at all
In architecture: i386
<snip>
I've attempted to generate a release build from the cordova CLI. I haven't been able to find the --release flag documented anywhere, but the CLI doesn't complain, and it usually does if it doesn't recognize a flag.
$ cordova build ios --release
<same result as previously>
Attempting to sign this build results in the same problem.
At this point, I started attempting to work directly in Xcode. I've set the .mobileprovision file and the signing credentials up appropriately, to the best of my knowledge:
With these values set, Xcode no longer allows me to build:
So I'm stuck: I have no choice but to build locally, and I can't figure out how to get it to build for release and sign! Please help!
Additionally, if I attempt to embed a provisioning profile, that fails because of an issue with entitlements. I'm not exactly sure what this means, but I'm hopeful that it's a result of working with a dev build, and resolving that will resolve this as well.
$ test -e ~/.ios/DEV.mobileprovision && echo exists
exists
$ xcrun -sdk iphoneos PackageApplication -v "platforms/ios/build/emulator/MyApp.app" -o "/users/adam/dev/myapp/MyApp.ipa" --embed "~/.ios/DEV.mobileprovision"
<snip>
error: Failed to read entitlements from '/var/folders/zs/j2hmt69n12sbjm6gyn0m_q4c0000gn/T/tyYvYPQKf3/Payload/MyApp.app'
Update 1:
This SO question helped in one regard. I don't know how the active scheme (I'm not really sure what that means, but that's the tooltip when I hover over the control) got changed as part of specifying keys/etc, but clearly it did. Changing this back to an iOS Device, like iPhone, allows me to build my project, and even Archive (which, to the best of my understanding, means it's creating the .ipa file I need to submit to the app store), but I can't find the archived file. Where should it be? Can I define this in a setting somewhere in Xcode?
Update 2:
By fiddling with certificates and provisioning profiles I've finally been able to create an archive from Xcode, which I've been told is a release build (is it?). Ideally I would like to be able to build from the command line so that I can automate it as much as possible, so that's where I'll be picking up in the morning. Any advice on that front would be quite welcome!
If you managed to create an archive in Xcode, then your signing certificate and provisioning profiles are known to Xcode, so cordova build ios --release --device should make it.
The steps are:
1) Import your iOS developer certificate for production to the keychain by downloading and double clicking on it in Finder (or get it via Xcode)
2) Download your provisioning profile (with the App ID set to the id attribute of the widget element in config.xml) and double click it on Finder so it goes to the Xcode provisioning profile store
3) cordova build ios --release --device
it looks like you're trying to sign the app with a wildcard provisioning profile (the XCode screenshot). Can you try creating and downloading a distribution certificate and provprofile to your Mac? Then import the .cer file in the keychain access app (doubleclicking should suffice) and doubleclick the provprofile as well.
Now you should be able to select the appropriate values from the release dropdowns in the XCode build settings.
Hope this helps somewhat...
Eddy
One other issue I am seeing from your screenshot is I don't think you can Build an Archive (Release) version using the Developer Signing Idenetity, you would need to create a Distribution certificate and use that one for the Release (Archive) version.
I have created my first XE2 FM HD application.
I have my OSX machine connected and running debug builds on OSX works fine, but I don't have a way to create a release version and copy it to another computer.
I tried just copying over the Package made by the debug but that's missing files.
Inside XE2 I went to Project -> Deployment.
For the OSX Debug deployment I have a green button, but under OSX Release deployment I don't.
Clues?
Here's step-by-step instructions for building the App bundle and putting in the required dynamic link library:
Create a folder called MyApp.app
Create a subfolder in Myapp.app called Contents
Create a subfolder in Contents called MacOS
Create a subfolder in Contents called Resources
From your build, copy Info.plist into Contents
From your build, copy the Mac binary to MacOS
From your build, copy the icon to Resources
Copy libcgunwind.1.0.dylib to MacOS
Copy the .app folder to your Mac and double-click it to run
You will find libcunwind.1.0.dylib on your Mac where you installed the platform assistant, most likely:
/Users/username/Applications/Embarcadero/PAServer/
Here's a video tutorial on how to create the manual install Disk Image installer on the Mac.