Fastlane disable availability on Mac - ruby

I am trying to disable the availability of my apps on Mac when I deploy them with Fastlane.
I found this article enter link description here but I do not understand how to implement this.
I've got a lane that is responsible for creating a new app. So I don't use Spaceship at all here. How can implement this on my end?
Thank you
Here is a part of the Fastfile code:
conf = get_app_config(app)
update_user_credentials(conf)
name = conf.company_name
ios_meta = IosMetadata.new(conf)
ios_meta.deploy
puts "Screenshots: ##{ios_meta.screenshots_path}"
deliver(
force: true,
username: ENV["USERNAME"],
skip_binary_upload: false,
ipa: File.join(path_to_ipa),
app_icon: ios_meta.icon_path,
app_version: options[:app_version],
app_identifier: conf.app_identifier,
screenshots_path: ios_meta.screenshots_path,
overwrite_screenshots: true,
metadata_path: ios_meta.metadata_path,
ignore_language_directory_validation: true,
submit_for_review: true,
automatic_release: true,
submission_information: {
add_id_info_uses_idfa: true,
add_id_info_limits_tracking: true,
add_id_info_tracks_install: true,
add_id_info_serves_ads: false,
export_compliance_uses_encryption: false,
export_compliance_encryption_updated: false,
export_compliance_compliance_required: true,
content_rights_contains_third_party_content: false,
content_rights_has_rights: false
},
team_name: conf.team_name,
team_id: conf.itc_team_id
)
Any implementation of is_opted_in_to_distribute_ios_app_on_mac_app_store I tried inside this code brought errors of type "Unknown property"

Related

How to share a private file in slack with everyone in workspace but not public?

After my app got installed, users can upload files in direct message with my bot.
Now I want to send a message to everyone and include this uploaded file but since it was uploaded in a private chat with my bot, this file is private.
I don't want to make it public(internet) available(also user should have this extra workspace permission to make files publicly available), just want to share it with everyone in the workspace only. so app.client.files.sharedPublicURL is not an option.
Maybe download the file using url_private and upload it again to slack using files.upload? which seems crazy!
Or with some other method which lets me change shares part of file to "general" channel so everyone can see it, do we have such method?
{
files: [
{
id: '...',
...
user: '....',
editable: false,
mode: 'hosted',
is_external: false,
external_type: '',
is_public: false,
public_url_shared: false,
display_as_bot: false,
username: '',
url_private: 'https://files.slack.com/files-pri/.../file.png',
url_private_download: 'https://files.slack.com/files-pri/..../download/file.png',
....
permalink: 'https://myworkspace.slack.com/files/....png',
permalink_public: 'https://slack-files.com/...',
has_rich_preview: false,
file_access: 'visible'
"shares": {
"public": {
"C0T8SE4AU": [
{
...
"channel_name": "general", //<<<<<<means everyone? is this possible?
...
}
]
}
},
}
]..
}

Playing a stream by my discord bot on heroku doesnt work

I want to make a Bot, that plays a livestream of an online radio. I use Discord JS v13.
On Heroku I have installed the following buildpacks:
heroku/nodejs
https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git
https://github.com/xrisk/heroku-opus.git
https://github.com/OnlyNoob/heroku-buildpack-libsodium.git
My code is the following:
let voiceChn = message.member.voice.channel;
const connection = joinVoiceChannel({
channelId: message.member.voice.channel.id,
guildId: message.member.voice.channel.guildId,
adapterCreator: message.guild.voiceAdapterCreator,
selfDeaf: true
});
const player = createAudioPlayer();
let resource = createAudioResource(STREAM_URL);
connection.subscribe(player);
connection.on(VoiceConnectionStatus.Ready, () => {
player.play(resource);
});
It does work running on my pc but it does not run on Heroku.
These are the packages I have installed:
"#discordjs/opus": "^0.5.3"
"#discordjs/rest": "^0.5.0"
"#discordjs/voice": "^0.10.0"
"discord-api-types": "^0.36.0"
"discord.js": "^13.8.1"
"ffmpeg-static": "^4.4.1"
"libsodium-wrappers": "^0.7.10"
I do get the following error: The player immediately emits the idle event and thats logged:
{
status: 'playing',
missedFrames: 0,
playbackDuration: 120,
resource: AudioResource {
playStream: OggDemuxer {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: true,
_remainder: null,
_head: null,
_bitstream: null,
[Symbol(kCapture)]: false,
[Symbol(kCallback)]: null
},
edges: [ [Object], [Object] ],
metadata: null,
volume: undefined,
encoder: undefined,
audioPlayer: undefined,
playbackDuration: 0,
started: true,
silencePaddingFrames: 5,
silenceRemaining: 0
},
onStreamError: [Function: onStreamError]
}
Not sure about the error, but I believe I had the same problem and fixed it.
Didn't test if all the changes are needed, but here goes:
Instead of your heroku-buildpack-libsodium package, I use:
https://github.com/Crazycatz00/heroku-buildpack-libopus
Changed every URLs 'https' with 'http'
Use a DNS lookup tool to change domain name with IPV4 form
'https://stream.skymedia.ee/live/NRJdnb' becomes 'http://185.31.240.229:8888/NRJdnb'
Deploy slash commands after you change their code

I get too often the HTTP error 403 Forbidden using discord.py and ytdl

I built a discord bot using ytdl, it works fine but randomly, I get this error and I can't figure out the cause: (I truncated the link with ... because it was too long)
[https # 000001ead63ee980] HTTP error 403 Forbidden
https://rr2---sn-uxaxpu5ap5-jp5l.googlevideo.com/videoplayback?expire=...: Server returned 403 Forbidden (access denied)
I thought the problem was this portion of code:
with youtube_dl.YoutubeDL(ytdlopts) as ydl:
ydl.cache.remove()
info = ydl.extract_info(search_query, download=False)
So I put it inside a try/catch, but it doesn't catch the error.
I tried also:
ydl.cache.remove()
But the problem still there, in the odious event that the problem is not in my code but on the server side, is there a way to fix or mitigate the problem?
These are my ffmpeg/ytdl options:
ytdlopts = {
'format': 'bestaudio/best',
'outtmpl': 'downloads/%(extractor)s-%(id)s-%(title)s.%(ext)s',
'restrictfilenames': True,
'nocheckcertificate': True,
'ignoreerrors': False,
'logtostderr': False,
'quiet': True,
'extract_flat': True,
'skip_download': True,
'default_search': 'auto',
'source_address': '0.0.0.0' # ipv6 addresses cause issues sometimes
}
ffmpegopts = {'before_options': '-nostdin','options': '-vn'}
opts = {'extract_flat': True, 'skip_download': True}
ytdl = YoutubeDL(ytdlopts)
```
try doing ipv4: True and 'cachedir': False in ytdlopts, doing this, you force ipv4 and clear cache, I'm not sure it works but on me works fine.
ytdlopts = {
'format': 'bestaudio/best',
'outtmpl': 'downloads/%(extractor)s-%(id)s-%(title)s.%(ext)s',
'restrictfilenames': True,
'nocheckcertificate': True,
'ignoreerrors': False,
'logtostderr': False,
'quiet': True,
'extract_flat': True,
'skip_download': True,
'default_search': 'auto',
'source_address': '0.0.0.0' # ipv6 addresses cause issues sometimes
'force-ipv4': True,
'cachedir': False
}

botium-cli emulator does not work with the rasa connector

When I try to start the emulator for my rasa bot, I get this error. The rasa endpoint url works perfectly fine when I send it a request with curl.
$ botium-cli emulator
Error: Start failed: undefined
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\src\containers\plugins\SimpleRestContainer.js:170:25
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:2955:19
at wrapper (C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:268:20)
at iterateeCallback (C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:413:21)
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:321:20
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:2953:17
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\src\containers\plugins\SimpleRestContainer.js:130:17
Here's the botium.json
{
"botium": {
"Capabilities": {
"PROJECTNAME": "My Botium Project",
"CONTAINERMODE": "rasa",
"RASA_MODE": "DIALOG_AND_NLU",
"SIMPLEREST_STRICT_SSL" : "false",
"RASA_ENDPOINT_URL": "https://example.com/webhooks/rest/webhook"
},
"Sources": {},
"Envs": {}
}
}
Here's the output from the emulator with the verbose tag.
Still does not work, maybe it has to do something with the way botium connects to the bot?
$ botium-cli emulator --verbose
2021-03-05T08:17:32.230Z botium-cli Using Botium configuration file ./botium.json
2021-03-05T08:17:32.240Z botium-cli-emulator command options: {
_: [ 'emulator' ],
verbose: true,
v: true,
convos: [ '.' ],
C: [ '.' ],
config: './botium.json',
c: './botium.json',
ui: 'console',
'$0': '..\\..\\AppData\\Roaming\\npm\\node_modules\\botium-cli\\bin\\botium-cli.js'
}
2021-03-05T08:17:32.573Z botium-core-BotDriver Loaded Botium configuration files C:\Users\shivam.sinha\Desktop\rasa check\botium.json
2021-03-05T08:17:33.085Z botium-core-BotDriver Build - Botium Core Version: 1.11.1
2021-03-05T08:17:33.087Z botium-core-BotDriver Build - Capabilites: {
PROJECTNAME: 'My Botium Project',
TESTSESSIONNAME: 'Botium Test Session',
TESTCASENAME: 'Botium Test Case',
TEMPDIR: 'botiumwork',
CLEANUPTEMPDIR: true,
WAITFORBOTTIMEOUT: 10000,
SIMULATE_WRITING_SPEED: false,
SIMPLEREST_PING_RETRIES: 6,
SIMPLEREST_PING_TIMEOUT: 10000,
SIMPLEREST_PING_VERB: 'GET',
SIMPLEREST_PING_UPDATE_CONTEXT: true,
SIMPLEREST_STOP_RETRIES: 6,
SIMPLEREST_STOP_TIMEOUT: 10000,
SIMPLEREST_STOP_VERB: 'GET',
SIMPLEREST_START_RETRIES: 6,
SIMPLEREST_START_TIMEOUT: 10000,
SIMPLEREST_START_VERB: 'GET',
SIMPLEREST_POLL_VERB: 'GET',
SIMPLEREST_POLL_INTERVAL: 1000,
SIMPLEREST_POLL_UPDATE_CONTEXT: true,
SIMPLEREST_METHOD: 'GET',
SIMPLEREST_IGNORE_EMPTY: true,
SIMPLEREST_TIMEOUT: 10000,
SIMPLEREST_EXTRA_OPTIONS: {},
SIMPLEREST_STRICT_SSL: false,
SIMPLEREST_INBOUND_UPDATE_CONTEXT: true,
SIMPLEREST_CONTEXT_MERGE_OR_REPLACE: 'MERGE',
SCRIPTING_TXT_EOL: '\n',
SCRIPTING_XLSX_EOL_WRITE: '\r\n',
SCRIPTING_XLSX_HASHEADERS: true,
SCRIPTING_CSV_SKIP_HEADER: true,
SCRIPTING_CSV_QUOTE: '"',
SCRIPTING_CSV_ESCAPE: '"',
SCRIPTING_NORMALIZE_TEXT: true,
SCRIPTING_ENABLE_MEMORY: false,
SCRIPTING_ENABLE_MULTIPLE_ASSERT_ERRORS: false,
SCRIPTING_MATCHING_MODE: 'wildcardIgnoreCase',
SCRIPTING_UTTEXPANSION_MODE: 'all',
SCRIPTING_UTTEXPANSION_RANDOM_COUNT: 1,
SCRIPTING_UTTEXPANSION_NAMING_MODE: 'justLineTag',
SCRIPTING_UTTEXPANSION_NAMING_UTTERANCE_MAX: '16',
SCRIPTING_MEMORYEXPANSION_KEEP_ORIG: false,
ASSERTERS: [],
LOGIC_HOOKS: [],
USER_INPUTS: [],
SECURITY_ALLOW_UNSAFE: true,
CONTAINERMODE: 'rasa',
RASA_MODE: 'DIALOG_AND_NLU',
RASA_ENDPOINT_URL: 'https://10.60.31.102:8080/webhooks/rest/webhook',
CONFIG: './botium.json'
}
2021-03-05T08:17:33.087Z botium-core-BotDriver Build - Sources : { LOCALPATH: '.', GITPATH: 'git', GITBRANCH: 'master', GITDIR: '.' }
2021-03-05T08:17:33.087Z botium-core-BotDriver Build - Envs : { IS_BOTIUM_CONTAINER: true }
2021-03-05T08:17:33.274Z botium-connector-PluginConnectorContainer-helper Botium plugin botium-connector-rasa loaded. Plugin version is 0.0.7
Error: Start failed: undefined
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\src\containers\plugins\SimpleRestContainer.js:170:25
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:2955:19
at wrapper (C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:268:20)
at iterateeCallback (C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:413:21)
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:321:20
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:2953:17
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\src\containers\plugins\SimpleRestContainer.js:130:17
The RASA_ENDPOINT_URL capability has to point to the base URL of your Rasa server - without the /webhooks/rest/webhook path. Botium will build up it's own full url endpoint path based on the RASA_MODE capability:
NLU_INPUT => /model/parse is appended
REST_INPUT => /webhooks/rest/webhook/ is appended
{
"botium": {
"Capabilities": {
"PROJECTNAME": "Botium Project Rasa NLU",
"CONTAINERMODE": "rasa",
"RASA_MODE": "NLU_INPUT",
"RASA_ENDPOINT_URL": "https://demo.botiumbox.com/rasa-demo/"
}
}
}

Exclude directory relative to project root

I work in a project that has two copies of the framework it uses, one of them not being used (please don't ask):
C:\Projects\Foo\app\Vendor\cakephp\cakephp
C:\Projects\Foo\lib\Cake
What's the syntax to completely obliterate \lib\Cake in files.exclude or search pane?
None of these seem to work:
/lib/Cake
/lib/Cake/
/lib/Cake/**
lib/Cake
lib/Cake/
lib/Cake/**
**/lib/Cake
**/lib/Cake/
**/lib/Cake/**
… plus the same patters with Windows style path separators.
They either ignore both copies or ignore none.
sample file
"files.exclude": {
"*/**/node_modules/": true,
"wp-includes/": true,
"wp-admin/": true,
//"wp-*.*": true,
"wp-config.*": false,
"xmlrpc.php": true,
".vscode/": true,
"*/**/cache/": true,
"*/**/uploads/": true,
"*/**/infinitewp/": true,
"*/**/.github/": true,
//"*/**/build/": true
},
"search.exclude": {
"build/": true,
},
taken from : https://daveredfern.com/hide-or-exclude-folders-and-files-from-search-in-visual-studio-code/

Resources