Free-RASP-Flutter: Failed build iOS with Codemagic

Hello @talsec-app I tried to build and distribute app within codemagic, but i got this error

Swift Compiler Error (Xcode): No such module 'TalsecRuntime'
/Users/builder/programs/flutter/.pub-cache/hosted/pub.dartlang.org/freerasp-3.0.1/ios/Classes/SwiftFreeraspPlugin.swift:2:7

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Hello everyone!

After deep analysis and bug hunting, I was finally able to replicate and track down the issue. To resolve this issue, you have to adjust Codemagic pipeline. Notice that the instructions below apply to the workflow editor (not yaml one).

  1. Go to Applications page where you can see an overview of all of your apps
  2. Click the “⚙️” (Settings) button on the project where you use freeRASP
  3. You are now in the workflow editor. You should see different settings such as “Build for platforms”, “Run build on” and also build stages (Build triggers, Environment variables, Dependency caching, etc.). Now find Build stage.
  4. Between Build and Tests stages there is a big “➕”(Add) button (if you haven’t changed the pipeline till now). Click on it.
  5. Now you’ll see two windows: Post-test script and Pre-build script. We are going to focus on Pre-build one. Copy this script into the Pre-build script window.
#!/bin/sh
flutter pub get
cd ios
pod install
cd .symlinks/plugins/freerasp/iOS
ln -s Debug/TalsecRuntime.xcframework
cd ../../../../
pod install
  1. If you already have some content there, just append the script. Please bear in mind your current working directory.
  2. Don’t forget to save changes using the save icon in the right top corner.
  3. And that’s all. Now, if you run the pipeline, it should pass without any problem.

Please let us know, if this solution worked for you.

Jaroslav from Talsec Team.

@yardexx i used the same script in our code magic flow. I forgot to mention here … anyways thanks for the reply

@msikyna it works fine now. The pipeline runs through flawlessly and we receive reports via email (we used 5.0.0-dev.1 for testing purposes). I’ve removed the old iOS implementation as described by @yardexx. Thanks for your help guys!

Hello @peer-f , try it with version 5.0.2 please.

Kind regards, Talsec team

Hello @peer-f

Apologies for the delay. I’ll take look into it ASAP.

Jaroslav from Talsec

(Reopening issue)

@tusharanchliyajain Thank you for your response.

Since solution works for you as well, I am closing this issue. Information about possible issues with Codemagic and how to resolve them will be added into README.md here on GitHub and on next release on pub.dev README as well.

If issue reoccurs, don’t hesitate to reopen this issue.

Kind regards, Jaroslav from Talsec Team