Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

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

Open
DmytroB36 opened this issue Oct 7, 2020 · 10 comments
Open

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

DmytroB36 opened this issue Oct 7, 2020 · 10 comments

Comments

@DmytroB36
Copy link

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?

@ccfiel
Copy link

ccfiel commented Nov 5, 2020

is this possible @fayeed ? :)

@ccfiel
Copy link

ccfiel commented Nov 5, 2020

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

@DmytroB36
Copy link
Author

DmytroB36 commented Nov 5, 2020

@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.

@ccfiel
Copy link

ccfiel commented Nov 5, 2020

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

@DmytroB36
Copy link
Author

@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.

@ccfiel
Copy link

ccfiel commented Nov 5, 2020

@NileCrocodile ok thanks! 😀

@ccfiel
Copy link

ccfiel commented Nov 5, 2020

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

@ccfiel
Copy link

ccfiel commented Nov 5, 2020

@NileCrocodile I did some searching maybe this could be could be the solution for the timing? flutter/flutter#53781

@ccfiel
Copy link

ccfiel commented Nov 9, 2020

@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

@phil10xs

This comment has been minimized.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants