flutter_freshchat icon indicating copy to clipboard operation
flutter_freshchat copied to clipboard

How to update the FreshchatSDK.h using shell-script?

Open DmytroB36 opened this issue 4 years ago • 10 comments

You have the following in your documentation: Manually in xcode update the FreshchatSDK.h to be in the flutter_freshchat target and public.

We are trying to configure DI, and we need to do this using a shell-script. Could you please point out how we can do this step using a shell-script?

DmytroB36 avatar Oct 07 '20 11:10 DmytroB36

is this possible @fayeed ? :)

ccfiel avatar Nov 05 '20 04:11 ccfiel

@nilecrocodile do you have any workaround for this? this is important if you are running ci/cd

ccfiel avatar Nov 05 '20 09:11 ccfiel

@ccfiel hi! Roughly speaking - no. But I found a solution like this:

https://stackoverflow.com/questions/52948110/xcode-how-to-change-files-target-membership-via-command-line

Although this particular implementation did not suit me either, because these actions need to be performed AFTER performing "pod install", and BEFORE the "flutter build ios" command. And this cannot be done in Codemagic, since every time the build is performed on a clean system, and the command "flutter build ios" itself calls "pod install" and this will overwrite the changes made earlier.

DmytroB36 avatar Nov 05 '20 16:11 DmytroB36

@nilecrocodile nice! Maybe we can use fastlane codemagic also support it. Can you share your script how ta make it public?

ccfiel avatar Nov 05 '20 16:11 ccfiel

@nilecrocodile nice! Maybe we can use fastlane codemagic also support it. Can you share your script how ta make it public?

the script was not ready because I realized that I could not use it. But, my experience has shown that the Xcode works well with a project.pbxproj file in JSON format.

DmytroB36 avatar Nov 05 '20 16:11 DmytroB36

@nilecrocodile ok thanks! 😀

ccfiel avatar Nov 05 '20 16:11 ccfiel

@nilecrocodile even if we solve the script it's impossible to build the app in command line because of the timing?

ccfiel avatar Nov 05 '20 17:11 ccfiel

@nilecrocodile I did some searching maybe this could be could be the solution for the timing? https://github.com/flutter/flutter/issues/53781

ccfiel avatar Nov 05 '20 17:11 ccfiel

@nilecrocodile we have successfully build and deploy our app using codemagic and fastlane

just put this in your ios folder ( thanks Olasunkanmi T. for this script ) https://gist.github.com/ccfiel/ed6805d40a5105626fbb39dd8a758317

and in codemagic pre-publish script

flutter clean && flutter pub get && cd ios/ && pod install
python ./change_public.py
bundle exec fastlane release

I hope this helps

ccfiel avatar Nov 09 '20 05:11 ccfiel

@nilecrocodile we have successfully build and deploy our app using codemagic and fastlane

just put this in your ios folder ( thanks Olasunkanmi T. for this script ) https://gist.github.com/ccfiel/ed6805d40a5105626fbb39dd8a758317

and in codemagic pre-publish script

flutter clean && flutter pub get && cd ios/ && pod install
python ./change_public.py
bundle exec fastlane release

I hope this helps "bundle exec fastlane release" returns 'Could not locate Gemfile or .bundle/ directory'. How were you successful with your build please??

And how may I deploy with code magic and fastlane as well. Thanks in advance

phil10xs avatar Jan 16 '21 00:01 phil10xs