Android deploy with fastlane image playstore order - fastlane

In android fastlane there is a directory
fastlane/metadata/android/en-US/images/phoneScreenshots
Inside that directory I see a number of images:
1_en-US.jpeg
2_en-US.jpeg
3_en-US.jpeg
When I go to the Google Playstore I see the images show up in order based on the numbering of the jpegs. I want to update those images manually as I got some new images. I want to confirm that the image order that appears in Google play is defined by the numbering of the image? ie, 1_en-Us.jpeg will appear before 2_en-Us.jpeg and so on?
A follow up question is if I now manually change the images and I want to do a new deploy is there anything else that needs to be in the deploy lane? Currently I just have:
desc "Deploy a new version to the Google Play"
lane :deploy do
# gradle(task: "clean assembleRelease")
gradle(task: 'clean')
gradle(task: 'assemble',
build_type: 'Release',
properties: {
"android.injected.signing.store.file" => "/somewhere",
"android.injected.signing.store.password" => "something",
"android.injected.signing.key.alias" => "something",
"android.injected.signing.key.password" => "something",
}
)
upload_to_play_store
end

Related

Issue adding a development swift package to an app

I am trying to add a local in-development Swift Package to my project. I followed this Organizing Your Code with Local Packages. Using Xcode 12 beta.
I created a swift package named "MyLibrary".
Then I move the code from my app to the Sources folder in my swift package.
I then close the swift package project in Xcode and drag and drop the package folder to my app.
However, here is where I am stuck. I need to add MyLibrary target into the Link binary with Libraries section in the build phases. I don't see the library/ framework target listed in the dialog.
I am listing below just the products and targets for the swift package. I tried adding a binaryTarget too, but that did not help.
products: [
.library(
name: "MyLibrary",
targets: ["MyLibrary"]),
],
targets: [
.target(
name: "MyLibrary",
dependencies: []),
.testTarget(
name: "MyLibraryTests",
dependencies: ["MyLibrary"]),
]
I will give step by step instructions. We will start completely from scratch in this example.
File > New > Project. Select the iOS App template. Save the project as My Project; other settings Storyboard, UIKit App Template, Swift. Create it on the Desktop.
File > New > Swift Package. Okay, this is the hard part. See at the bottom of the save dialog where it says Add to? Choose MyProject. The Group should then be MyProject too. Both icons should be blue project icons. Now save as MyLibrary, on the Desktop.
Now we are in MyProject. Select MyProject, the project, at the top of the project navigator. On the right, choose the target MyProject. Scroll down to Frameworks, Libraries, and Embedded Content and click the Plus button. You will see right at the top Workspace, then MyLibrary the "framework", the MyLibrary the "library". Choose the third one, MyLibrary the "library", and click Add.

Is there a clean way to get android build specific information in flutter code?

I'm in the process of migrating my App built on Android using Java to using Flutter + Dart.
Like my current app, I am adding 2 build types - release and debug in the build.gradle file. I am specifying different Server API URLs to be used in these build Types.
Sample buildType information -
buildTypes {
release {
manifestPlaceholders = [hostName: "PROD SERVER", "version": "v1"]
}
debug {
manifestPlaceholders = [hostName: "STAGE SERVER", "version": "v1"]
}
}
In native android, I was able to use android.content.pm.ApplicationInfo and android.os.Bundle to get the information in the code to dynamically use the base URLs.
Sample code from my native app is as follows :
ApplicationInfo app = this.getPackageManager()
.getApplicationInfo(this.getPackageName(), PackageManager.GET_META_DATA);
Bundle bundle = app.metaData;
API_HOST = bundle.getString("api.host");
API_VERSION = bundle.getString("api.version");
Is there a flutter + dart alternative to this?
I have been reading up and the way out seems to be by creating multiple Main files and then building the production/dev app by using the appropriate file.

How to specify output .apk file path when using fastlane gradle?

I have different product flavors of my app and I build them with fastlane. This is my fastfile:
default_platform(:android)
platform :android do
desc "Release apk with different urls"
lane :release do
gradle(
task: "assemble",
build_type: "release",
flavor: "flavorname",
print_command: true,
properties: {
"android.injected.signing.store.file" => "Key.jks",
"android.injected.signing.store.password" => "KeyPass",
"android.injected.signing.key.alias" => "KeyAlias",
"android.injected.signing.key.password" => "KeyPass"
}
)
end
end
The problem is apk files are created in project directory.
(projectname/app/build/outputs/apk/flavorname/release/app-flavorname-release.apk)
How to move this apk files to my Desktop automatically?
I use the following under my gradle call:
lane :release do
gradle(...)
APK_LOCATION = "#{lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]}"
sh("mv #{APK_LOCATION} ~/Desktop/")
end
The advantage of using the variable is that you will be able to use the same code for release and debug apk.
Cheers.
It doesn't seem that gradle has an option to specify the output.
What I suggest you is to add a command line just after the gradle is done to move this .apk to the Desktop or wherever you want.
sh "mv ../app/build/outputs/apk/release/app-release.apk path/to/Desktop"
You can also use fastlane action copy_artifacts instead of mv
lane :release do
gradle(...)
copy_artifacts(
artifacts: ['*/build/outputs/apk/**/*.apk'],
target_path: '~/Desktop/'
)
end
Wilcard */build/outputs/apk/**/*.apk will work with any build types, flavors app module name.
Or as said #janpio above, you can use variable GRADLE_APK_OUTPUT_PATH:
lane :release do
gradle(...)
copy_artifacts(
artifacts: [lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]],
target_path: '~/Desktop/'
)
end

making sure the polymer build process doesn't mess with a dependency of my element

I have built a custom element/web component to load and display Unity generated WebGL content. The web component imports the UnityLoader.js module - and works fine when used within an app served with 'polymer serve'.
However, when I build an app that uses my web component via the Polymer-CLI build process, no errors are given, but when I access a page using my component I always end up with an error from within UnityLoader.js:
"ReferenceError: BabelHelpers is not defined"
If I create the element directly within my app (in other words it is no longer managed by bower) then I can exclude the minification and compilation steps within the build section of my application's polymer.json file and the built version of the app works fine.
"builds": [
{
"preset": "es5-bundled",
"js": {
"compile": {"exclude": ["content/**/*","UnityLoader.js"]},
"minify": {"exclude": ["content/**/*","UnityLoader.js"]}
},
"html": {
"minify": {"exclude": ["content/**/*"]}
}
}
]
I've looked at my application's polymer.json file and I can see that the extraDependecies node contains some dependencies that other web components have placed there:
"extraDependencies": [
"bower_components/webcomponentsjs/*.js",
"!bower_components/webcomponentsjs/gulpfile.js",
"manifest.json",
"bower_components/plastic-image/intersection-observer.js",
"bower_components/ua-parser-js/dist/ua-parser.min.js"
],
I have UnityLoader.js within the extraDependencies of the element's polymer.json but that isn't getting cascaded up to an application that imports/consumes the element - which I guess must be possible as plastic-image and ua-parser-js have done it (I've looked at their bower_components folders and nothing seems obvious - other than the latter is installed as a dependency of the former).
Any ideas on how I can make sure that the UnityLoader.js that my web component uses is not compiled or minified during the build process of an application that consumes it?
I was having a similar issue with firebase-auth.js when making an ES5 build using polymer-cli 1.7.0. There might be a problem when compiling/minifying specific files. I had to roll back to 1.6.0 using npm install -g polymer-cli#1.6.0 to fix the problem.

Google Map Title annotation not working for Android in Rhodes

I have create Map view in my application, every thing works fine
except the title annotation
my rhodes version is 3.0.2
Here is my code
#customer = User.find(#params["id"])
map_params = {
:settings => {:map_type => "hybrid",:region =>
[#customer.lat, #customer.lag, 0.2, 0.2],
:zoom_enabled => true,:scroll_enabled =>
true,:shows_user_location => false,
:api_key => 'Google Maps API Key'},
:annotations => [{
:latitude => #customer.lat,
:longitude => #customer.lag,
:title => "#{#customer.name}",
:subtitle => "View customer",
:url => "/app/User/
{#{#customer.object}}"
}]
}
MapView.create map_params
while googling i found title annotations is not yet implemented in
Android, is there any other alternative way to do it?
In my application i have to do like this......
[Screen Image][1]
Is it possible?
There are currently no alternatives for Android. They have a few development items on their radar, however:
Implement MapView Annotations
Change Pin Icon
Multi-line Annotations
Download the master branch of Rhodes Source code and you will see the annotations on Android.
To do this, follow these instructions:
Clone the master branch to your pc (you can also see these instructions):
$ git clone git://github.com/rhomobile/rhodes.git
$ cd rhodes
Modify your RHO_HOME variable
Add the bin path to your path (evironment variable)
(Recommended: reboot your computer)
Add the file rhobuild.yml to the new Rhodes folder
Run
set-rhodes-sdk
(you should see the new Rhodes folder/path here if you did everything correctly)
Run
rhodes-setup
and follow the instructions
Run a clean build of your application
I hope this helps you out. This solved my problems with annotations.