Drive permissions in AndroidManifest.xml via Titanium's tiapp.xml - titanium

I am attempting to upload a mobile app I developed using titanium-mobile to the Google Play marketplace. I am getting the following message:
This apk requests 4 permissions that users will be warned about
android.permission.ACCESS_WIFI_STATE
android.permission.ACCESS_NETWORK_STATE
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.INTERNET
This apk requests 2 features that will be used for Google Play filtering
android.hardware.touchscreen
android.hardware.wifi
When developing apps natively, I was able to modify these permissions directly via the AndroidManifest.xml file. With Titanium I do not actually generate the AndroidManifest.xml myself but rather it is generated by Titanium's build.
Is there a way to send directives to titanium's build engine via tiapp.xml to remove, enable, or disable permissions in the titanium generated AndroidManifest.xml?

You cannot edit permissions via tiapp.xml.
You can edit the AndroidManifest.xml file directly
(located at {TitaniumWorkspace}/{ProjectRoot}/build/android/AndroidManifest.xml) then copy and edit this file. After that ensure that you put it in your root project directory with the following folder hierarchy:
Your root project folder
platform (note: you may have to create this folder)
android (note: you may have to create this folder)
AndroidManifest.xml
Example path for where to put the edited manifest: {TitaniumWorkspace}/{ProjectRoot}/platform/android/AndroidManifest.xml

Related

Your manifest file doesn't include the com.google.android.gms.permission.AD_ID permission

I'm getting an error when trying to submit my app to the Play Store.
Your declaration on Play Console says that your app uses advertising ID. Your manifest file doesn't include the com.google.android.gms.permission.AD_ID permission.
I've already declared the app permission in my manifest xml file.
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
The SDK target version is 33, and the admob ads I included is 21.3.0
implementation 'com.google.android.gms:play-services-ads:21.3.0'
I've follow every step in this link, and it doesn't seem to work.
https://developers.google.com/admob/android/quick-start
Firebase Analytics is using the com.google.android.gms.permission.AD_ID permission to track users.(https://support.google.com/analytics/answer/11593727?hl=en)
You can remove that permission adding to your manifest
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove" />
But this will probably invalidate your usage statistics
I had this problem and I solved it. The issue is that one of your dependencies (possibly Firebase) is forcefully inserting this permission into the manifest during the build process. I.e. after you manually craft the file. You can add a directive to the manifest to remove the permission at the end of the process and then you won't have the problem when uploading it to the store.
You need to add this to your manifest but outside the application
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>
But, you also need to add the tools XML namespace or the build will fail. this goes inside the root manifest node
xmlns:tools="http://schemas.android.com/tools"
You can also check the manifest before you upload to the Google Play store. Just rename the apk/appbundle to .zip , unzip the file and check the contents of the manifest file.
For apps uploaded which targets android 13 you have to:
(Skip to 2 if you don't use advertising) Add the permission <uses-permission android:name="com.google.android.gms.permission.AD_ID"/> in your manifest if your app uses ads.
In your Play Console scroll down to and click on App Content at the bottom on the left side menu. In the opened page you have to complete the Advertising ID section which pretty much is for declaring that you use and Advertising ID or not.
The problem we faced was that we don't use any advertising in our app but the Firebase Core library needs the Advertising library. So in gradle we're removing that library from our build like this:
gmsImplementation ('com.google.firebase:firebase-core') {
exclude group: 'com.google.android.gms', module: 'play-services-ads-identifier'
}
I'm also having this issue. No fix yet.
EDIT:
Seems others are having issues with this as well.
Reading this reddit thread, a user mentioned that the issue is on the Play Console Team's side and everyone is facing it.
They've also published their app to production and everything is fine, so the error warning can be ignored.

unable to include external files in a project

I have created the default play application in IntelliJ in directory P. I have over-written the default index.scala.html with my own html code. The html code refers to some css and js files which are outside the directory P. To include these external files, I added the directory of these files using project configuration settings.
My webpage doesn't load properly as the server returns 404 for the css and js files. What am I doing wrong?
When you added your directory using project structure, you only say:
Hey, IDEA, please consider this folder part of my project, consider
its contents source code and display it when I open my project.
However, when you deploy or run your app, you only deploy the usual folders to the server, which contain the resources which will be available for clients to access.
The external directory is not part of these directories and will not be deployed.
What you can do is to copy the file from the external directory as a part of your build process before deploying the application.
EDIT: Detailed answer here: What is intellij's build process for play applications

Which Build is generated when I archive my App in Xcode6?

I have an app which I want to distribute to the app store.
When I do >Product > Archive does the app automatically build in Release or Debug config? Do I have to set this manually or is it always Release?
You can define Release or Debug in the scheme by tapping on Edit Scheme and selecting the Build Configuration. Take a look at below screenshot:
EDIT: To get Production APNS token
Archive the build in release mode.
Ensure to sign it with an Ad Hoc Distribution Provisioning profile.
Ensure profile is correct by following below:
Verify that the entitlements in the provisioning-profile file are
correct. To do this, open the .mobileprovision file in a text editor.
The contents of the file are structured in XML. In the Entitlements
dictionary locate the aps-environment key. For a development
provisioning profile, the string value of this key should be
development; for a distribution provisioning profile, the string value
should be production.
You can define Release or Debug in the scheme by tapping on Edit Scheme and selecting the Build Configuration
Its better to cross check when you are uploading build to store.

install iOS ad-hoc app failed

I've a problem by installing an ad-hoc build to my iOS test devices.
When I run the app via XCode, there is no problem, but from the moment I create a signed ad-hoc app (*.ipa), the app is not able to install via iTunes or the iPhone configuration tool.
What I've done:
- Creating a distribution certificate
- Creating an app ID (com.project_name.*)
- Creating a distribution provisioning profile including the distribution certificate, all devices UUID, etc.
- In the plist file I set "Bundle identifer" to "com.project_name.app_name"
By creating the ad-hoc file, I've chose the distribution certificate for code signing. This certificate is also set in the project file --> build settings --> Code-Signing
When I install the app in itunes, there comes an error dialog which just says, that it was not possible to install the app.
Make sure you are not using special characters in bundle identifier.
The bundle identifier string identifies your application to the
system. This string must be a uniform type identifier (UTI) that
contains only alphanumeric (A-Z,a-z,0-9), hyphen (-), and period (.)
characters. The string should also be in reverse-DNS format. For
example, if your company’s domain is Ajax.com and you create an
application named Hello, you could assign the string com.Ajax.Hello as
your application’s bundle identifier. The bundle identifier is used in
validating the application signature.
If your bundle identifier is correct,
Please validate your ipa file with following steps:
Step1: rename yourapp.ipa to yourapp.zip
step2: Extract content of yourapp.zip, you will see content in Payload
folder.
Step3: locate yourapp.app in payload folder.
Step4: rightclick on app and click "show package content"
Step5: in package content, locate "embedded.mobileprovision"
step6: Open "embedded.mobileprovision" in text editor. and check if
your device id exist there.
If your device id is there, Your build is correct. otherwise, rebuild by checking all code.
Note: Please make sure you have selected "Ad-hoc" while creating distribution file and not "App store".
The problem wasn't the app.
My solution: Export the app as Xcode-Project (same way Organizer --> Archive --> Distribute) to another mac. Think about the certificates. You will have to export the private keys from your first mac too (*.p12 files).
Open the XCode-Project from your second mac, sign it with the provision profile and install it via itunes.

Entitlement are not valid?

My friend send me Build & provision profile ok, 1st I install provision profile than I upload Build on my i pod device , I face this error. Entitlement are not valid?? could you please tell me how can i solve this problem
The standard Project template does not include the entitlements file. On your project, add a new file (File, New). Select Code Signing as the category under iOS, and pick "Entitlements" template. You can name the file Entitlements.plist.
Then, on your Target, go to Build Settings, and set your Code Signing Entitlements setting to the name of this new file.
You should be able to build and distribute it just fine now.