Trigger.io App fails Application Loader verification, not respecting minimum os version and cannot verify icon file - ios

I'm using the latest version of Trigger.io and have my mobile application configured to require iOS 5.0 or higher, and I've got all the icons loaded in the config.json file, e.g:
"modules": {
…
"icons": {
"android": {
"36": "path/to/ICON_36sq.png",
"48": "path/to/ICON_48sq.png",
"72": "path/to/ICON_72sq.png"
},
"ios": {
"57": "path/to/ICON_57sq.png",
"72": "path/to/ICON_72sq.png",
"114": "path/to/ICON_144sq.png",
"512": "path/to/ICON_512sq.png",
"prerendered": true
}
},
…
However, when trying to deploy the application to the App Store using the Application Loader, I get the following error:
iPhone/iPod Touch: Info.plist: Unable to verify icon dimensions, no icon found. You must define CFBindleIcons, CFBundleIconFiles, CFBundleIconFile, or provide a default Icon.png that us 57x57.
The icon file does exist and is correctly configured for my app, so it's not a issue of the file not existing. It also works correctly on the simulator and my development device, just not when releasing to the app store.
Any help is appreciated.
POSSIBLE CAUSE: If I dig into the IPA and look at the Plist.info file in the resulting package created by trigger.io, the MinimumOSVersion is set to 4.3, and not respecting what I have in my config.json file (minimum version I've set to is iOS 5.0).
After more research, I found that I can deploy the app successfully using v1.4.36 and below. Looks like the refactor in v1.4.37 has broken the Minimum OS Requirements again!

This was a bug in the Trigger.io platform: we deployed a fix in v1.4.44 - see https://trigger.io/docs/current/api/release_notes.html
There are currently two ways to define custom icon file names in an iOS app. After recreating an Xcode project we use internally, the newly generated Info.plist only conformed to the new style, which causes Application Loader problems.
v1.4.44 restored the old-style icons configuration.

You need to use relative paths from the 'src' directory rather than assuming a baseUrl. So use "path/to/ICON_36sq.png" not "/path/to/ICON_36sq.png"

If you look at "development/ios/build_steps/icons.json" you'll see something like that.
[
{
"do": {
"copy_file_from_src": {
"filename": "{{plugins.icons.config.ios.57}}",
"dest": "normal.png"
}
}
},
{
"do": {
"copy_file_from_src": {
"filename": "{{plugins.icons.config.ios.72}}",
"dest": "ipad.png"
}
}
},
{
"do": {
"copy_file_from_src": {
"filename": "{{plugins.icons.config.ios.114}}",
"dest": "retina.png"
}
}
},
{
"do": {
"copy_file_from_src": {
"filename": "{{plugins.icons.config.ios.144}}",
"dest": "ipad-retina.png"
}
}
},
{
"do": {
"icons_handle_prerendered": {}
}
}
]
As shown above, the build is copying the 57px icon in your configuration to "normal.png" and the 72px to "ipad.png", but for some reason the Application Loader is not recognizing the CFBundleIconFiles entry in the Info.plist.
I solved my problem using a postbuild hook to copy the 57px icon to the expected default name "Icon.png" and the 72px icon to "Icon-72.png" (the file names are case sensitive). The files have to be copied to the "development/ios/device-ios.app/" folder.

Related

Electron: Keep Getting 'You'll need a new app to open this' Screen

Developed an Electron app using Vuejs and everything works fine in development, but when packaged I keep getting this pop-up after start up (NOTE: This is a sample image - mine doesn't say 'windowsdefender' but is otherwise the same).
Using electron-builder to create the application with the following build json, and it is installed on the PC:
{
"productName": "My App",
"appId": "com.mycompany.myapp",
"win": {
"icon": "build/icon.png",
"target": [
"nsis"
]
}
}
Though the app does open, there is no initial screen. However, I can open the dev tools but there are no errors displayed.
Any ideas on what is causing this or how to resolve?
After many tries, I finally figured it out (or at least I think I know what caused the issue).
The primary issue was that in using vue router (from an app ported from the web), it is important that you use 'hash' mode and not 'history. Add this to your router file:
const router = new VueRouter({
mode: process.env.IS_ELECTRON ? "hash" : "history",
routes
});
See this link for more details (common issues): Vue CLI plugin common issues
Second, I think there is a rights issue (i.e. having elevated rights to install) so I added this line along with the guid to my electron-builder.json file. The result was a build file like this:
{
"productName": "My App",
"appId": "com.abcco.my-app",
"win": {
"icon": "build/icon.png",
"target": "nsis",
"requestedExecutionLevel": "requireAdministrator"
},
"nsis": {
"guid": "6ee647a9-d5c6-46a9-a480-aa7d6d3d1c10",
"oneClick": false,
"allowToChangeInstallationDirectory": true
}
}
As I am developing only for Windows I was able to use material from this page (React but not that different with respect to Electron packaging):
Electron Build file help
The last thing I did was to remove all 'dist' files and uninstall the app entirely (previous versions). I think this cleared up a lot of the 'baggage' left over from testing.
Hopefully this helps others who may experience the same issue.

How do I add an additional postcss plugin via the new #angular/cli v7 angular.json or custom-webpack.config.js?

#angular/cli#7+ allows a customWebpackConfig to be specified to provide custom webpack configuration, such as:
"architect": {
"build": {
"builder": "#angular-builders/custom-webpack:browser",
"options": {
"customWebpackConfig": {
"path": "./build/custom-webpack.config.js",
"mergeStrategies": {
"externals": "prepend"
}
},
...
This file then technically allows you to prepend, append or replace any portion of the webpack configuration. Prior to upgrading to #angular#7.1.3 and #angular/cli#7.1.3 we had ejected the webpack configuration to make some additions. One such addition was the postcss-momentum-scrolling postcss-loader plugin that automatically enabled iOS momentum scrolling on all scrollable containers.
I am seeking support on figuring out how to generate the necessary custom webpack code to load this plugin via the supported customizations allowed by #angular/cli#7+.
Here is a sample of what I have tried in my custom-webpack.config.js file:
const postcssMomentumScrolling = require('postcss-momentum-scrolling');
module.exports = {
module: {
rules: [
{
test: /\.scss$|\.sass$/,
use: [
{
"loader": "postcss-loader",
"options": {
"plugins": [
postcssMomentumScrolling(),
]
}
}
]
},
],
},
};
As soon as I touch the scss chunk of the webpack config, it seems to do a replace instead of a merge or prepend, breaking the build.
I am wondering if anyone has a guide or suggestions on how to see what the initial webpack configuration that #angular/cli generates that is the starting point for modifications and a way to preview/peek at the code to be executed as debugging.
Also, an example of a similar customization would be great.
Thanks!
I think you need to tell to "customWebpackConfig" which portion to merge. Like this:
"mergeStrategies": {
"module.rules": "prepend"
}
In this way you're going to tell to merge with prepend strategy.
According to "custom-webpack" documentation it should default to "append" which doesn't seem the case in your example.
It's been a while since you've put the question but I wanted to actually ask if you have been able to fix it since I'm running in some issues getting my "module.rules" merged...it seems to work only if I set "replace" strategy.

Setting platform dependant icon via electron-forge electronPackagerConfig

Using electron-forge to build a desktop app. The app is built for both OSX & Windows. Inside my package.json, I have:
"electronPackagerConfig": {
"icon": "src/images/icon/app_icon_osx.icns"
}
When I build on Windows, I'm having to manually change the icon in package.json from "app_icon_osx.icns" to "app_icon_win.ico".
If I try to just use "app_icon.png" for both platforms, the icon doesn't show on OSX, and the build fails with "rcedit.exe failed with exit code 1. Fatal error: Unable to set icon" on Windows.
I have all 3 versions of the icon (icns, ico, png) in a folder in the project. Because i'm using electron-forge, i don't seem to be able to use electron packager's --icon argument.
Is there a way I can pass the icon to use as a command line arg, instead of hardcoded in package.json? Or a way I can use the same png for both platforms?
The extension is automatically added for each platform. Just supply an icon per platform like this: app_icon.icns, app_icon.ico, ...
Then update your config:
"electronPackagerConfig": {
"icon": "src/images/icon/app_icon"
}
The accepted answer works for macOS and Windows, but for Linux you'll have to do something like this:
Set the app icon (for the app list only) in the maker:
{
name: "#electron-forge/maker-deb",
config: {
options: {
icon: "./src/images/icon.png",
},
},
},
Create an assets folder (or anything) an copy it during the build with the copy-webpack-plugin in your webpack.main.config.js:
const CopyPlugin = require("copy-webpack-plugin");
module.exports = {
// ...
plugins: [new CopyPlugin([{ from: "./assets", to: "assets" }])],
};
You can now access any files inside this folder from your main process, so reference the icon when creating your BrowserWindow as documented here
mainWindow = new BrowserWindow({
// ...
icon: path.join(__dirname, "assets/icon.png"),
});
In forge.config.js, do:
const path = require('path')
module.exports = {
packagerConfig: {
icon: path.join(__dirname, 'favicon'),
},
}
Important notes:
If the file extension is omitted, it is auto-completed to the correct extension based on the platform, including when platform: 'all' is in effect.
This setting doesn't change the icon when running electron-forge start.
If the setting is correct, and you still don't see the correct icon, you might have encountered the icon cache issue.
If on Windows 10, run ie4uinit -show in the command line will show the latest icon.

Why I am getting blank page for Mapboxgl api on IOS?

Working on mapboxgl with ionic3, angular4 and cordova.
I have build .apk and .ipa files. I installed .apk file in my android device it works as expected (ie mapbox tiles, my icons (I have added some icons to custom some functionalities for eg. added an icon to switch the map style) and my markers are loaded successfully).
When I install the .ipa file in my Iphone my icons only loaded but mapbox tiles not getting loaded. Also the markers. I get blank white screen.
What is wrong with my implementation?
let data = {myJson data};
mapboxgl.accessToken = 'My access token';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v9',
attributionControl: false,
center: [-74.50, 40],
zoom: 12
});
map.on('load', function () {
map.addSource("place", {
type: "geojson",
data: data,
cluster: true,
clusterMaxZoom: 14, // Max zoom to cluster points on
clusterRadius: 50 // Radius of each cluster when clustering points (defaults to 50)
});
map.addLayer({
"id": "places",
"type": "circle",
"source": "place",
"paint": {
"circle-radius": 7,
"circle-color": "#32CD32",
"circle-stroke-width": 4,
"circle-stroke-color": "#FFFFFF"
}
});
});
Can you help with me with the code added here?
This code works fine in Android. I mean map is loading as expected. But in Iphone My app is working but Map is not loading. Any guess what is wrong?
please check in info.plist for key MGLMapboxAccessToken is set with proper token. this is very important to set this value.
If you don't have source code even thought you can check by extraction IPA. below are step to extract IPA.
Change extension from IPA to ZIP.
Extract zip file
In payload you will find app. right click on it and click on show package contents
Open info.plist and search for key and it's value.
I hope you will get your answer

How to get (tray) icon path/image in electron-builder

I'm using electron-react-boilerplate to develop electron app (which uses electron-builder to pack apps).
I want to create tray, but it requires icon path or native image. The question is how to retrieve icon image from electron-builder or how to tell electron-builder to include icons dir into resources (without packing), so I can use:
appIcon = new Tray(iconPath | nativeImage)
I kind of struggled with a solution about non-packaged assets (such as media or JSON config files), mostly because I was not familiar with Electron until now. :)
I built a simple personal tray-only app and I didn't want to repackage every time I change an icon for instance.
If you too plan on using changing/dynamic assets you can distinguish between "development" and "production" using this property:
https://electronjs.org/docs/api/app#appispackaged-readonly
Make sure you have this in your package.json:
"build": {
...
"extraResources": [
"./assets/**"
],
}
https://www.electron.build/configuration/contents#extraresources
Then in your code you can have:
const assetsPath = app.isPackaged ? path.join(process.resourcesPath, "assets") : "assets";
Of course you can also use a different path for storing assets, independent of your packaged app folder, for example your user's home or user's documents:
https://electronjs.org/docs/api/app#appgetpathname
Electron v7.0.1
electron-builder 21.2.0
Firstly you need to tell electron-builder which extra files need copying into your output build. I copy over native drivers for each os like below, but you should be able to adapt this to your needs. The "to": "resources" means you'll be able to use the next code to find the files later.
"build": {
...
"extraFiles": [
{
"from": "resources/${os}/drivers",
"to": "resources",
"filter": [
"**/*"
]
}
],
Then to get access to that path from in electron you can use:
const path = require('path');
const imgPath = path.join(process.resourcesPath, 'image.png')
If you're in the main process you can omit the remote part.
You can then use nativeImage.createFromPath to get a native image:
const nativeImage = require('electron').nativeImage
let image = nativeImage.createFromPath(imgPath)
Thanks, Tim, your answer gave me a good thought. I reused it with some addition depending on how I run my app - form vs code using electron or from installed deb file:
"build": {
...
"extraFiles": [
{
"from": "assets",
"to": "resources",
"filter": [
"**/*"
]
}
]
...
}
And then:
let imgPath = process.env.DEV ? "assets/icon.png" : path.join(process.resourcesPath, "icon.png");
tray = new Tray(imgPath);

Resources