Build the iOS App setup instructions?

Hi there,

Need some clarity on the setups to build the iOS App. I am following https://developers.mattermost.com/contribute/more-info/mobile/build-your-own/ios/ to build the iOS app, in the Build Preparations section, step 2 says we should follow 1,2 and 3 steps from https://developers.mattermost.com/contribute/more-info/mobile/developer-setup/run/
However right after that, it says " *After configuring the app in the previous step, ensure the bundle ID for each target of the mobile app remains the same as the one in the original [mattermost-mobile GitHub repository]" This is contradicts the step 3 of the above line

can someone clarify if we need to have different bundle ID or not?

Thanks

@ahmaddanial Would you be able to provide further insight into this? I don’t have as much experience with the development of iOS apps, my forte is mainly in Android development, and while I’m more than happy to learn, I’m confident that this can be solved much faster by someone who already knows about the topic in question.

Hello, @tech_yyz

I can confirm that the steps do not contradict after verifying this with the mobile team. The previous step is to set the bundleID so it gets configured for your Apple account. Reverting to what it was helps the build script to set everything as it should.

Let me know if you run into any issues while following the steps and attach the details of the error here so I can troubleshoot the issue. Thanks.

Hello Ahmad,

Thanks for helping me on this one. I did as per the documentation, I am getting the following error when I try to build the ios app.

npm ERR! code 1

npm ERR! path /Users/test/Downloads/mattermost-mobile-master

npm ERR! command failed

npm ERR! command sh -c ./scripts/build.sh ipa

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/test/.npm/_logs/2020-11-26T04_56_18_775Z-debug.log

test@tests-Mac mattermost-mobile-master % cat /Users/test/.npm/_logs/2020-11-26T04_56_18_775Z-debug.log

Upon checking the log file, I see the following

19 verbose npm-session ca2a97ae52ef863a

20 timing npm:load Completed in 17ms

21 timing command:run-script Completed in 150232ms

22 verbose stack Error: command failed

22 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)

22 verbose stack at ChildProcess.emit (node:events:376:20)

22 verbose stack at maybeClose (node:internal/child_process:1055:16)

22 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:288:5)

23 verbose pkgid mattermost-mobile@1.38.0

24 verbose cwd /Users/test/Downloads/mattermost-mobile-master

25 verbose Darwin 19.6.0

26 verbose argv “/usr/local/Cellar/node/15.3.0/bin/node” “/usr/local/bin/npm” “run” “build:ios”

27 verbose node v15.3.0

28 verbose npm v7.0.14

29 error code 1

30 error path /Users/test/Downloads/mattermost-mobile-master

31 error command failed

32 error command sh -c ./scripts/build.sh ipa

33 verbose exit 1

Any idea how do I resolve this?

Thanks again

Hey, @tech_yyz

You are most welcome. Based on the error and log entries you shared, I would recommend you to give node 12 or 14 a try based on the article we have here;

Node has a package manager called npm. Please make sure that you use version 6.14.x. They recently shipped version 7.x which apparently has some issues running shell commands.

Hi Ahmad,

I did as you recommended, however I am getting new set of error. These are the errors when I am trying to build the ios app.

12:51:41]: $ cd /Users/test/Downloads/mattermost-mobile/ios && agvtool what-version -terse

[12:51:41]: ▸ 335