GithubHelp home page GithubHelp logo

Comments (21)

yardexx avatar yardexx commented on July 20, 2024 5

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.

from free-rasp-flutter.

tusharanchliyajain avatar tusharanchliyajain commented on July 20, 2024 3

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

from free-rasp-flutter.

yardexx avatar yardexx commented on July 20, 2024 1

@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

from free-rasp-flutter.

yardexx avatar yardexx commented on July 20, 2024 1

Hello @peer-f

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

Jaroslav from Talsec

(Reopening issue)

from free-rasp-flutter.

msikyna avatar msikyna commented on July 20, 2024 1

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

Kind regards,
Talsec team

from free-rasp-flutter.

peer-f avatar peer-f commented on July 20, 2024 1

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

from free-rasp-flutter.

talsec-app avatar talsec-app commented on July 20, 2024

Hello @santomalau03 , please try the following:

  1. Check if the ios/.symlinks/plugins/freerasp/ios contains TalsecRuntime.xcframework symbolic link. If not, create it manually in that folder using the following command:
    ln -s ./Debug/TalsecRuntime.xcframework/ TalsecRuntime.xcframework
    The folder might not be visible. If there is no .symlinks folder at all, create the symlink in the freerasp-3.0.1/ios folder.
  2. Run pod install in the application ios folder.

Kind regards,
Talsec team

from free-rasp-flutter.

talsec-app avatar talsec-app commented on July 20, 2024

Hello @santomalau03 ,

have you managed to solve the issue, or does it still persist? Thank you.

Kind regards,
Talsec team

from free-rasp-flutter.

acdwisu avatar acdwisu commented on July 20, 2024

Hello @talsec-app ,

I have similar issue when build ios. In ios directory it has contained the ios/.symlinks/plugins/freerasp/ios/TalsecRuntime.xcframework symlink.

Thank you

from free-rasp-flutter.

acdwisu avatar acdwisu commented on July 20, 2024

after some search,

in my case, it turn out because i targeted build for arm64 and armv7, while the latest freerasp-ios support arm64 and simulator arm64 & x86_x64, therefore define arm64 as build target could resolve my issue.

thx, cmiiw.

from free-rasp-flutter.

talsec-app avatar talsec-app commented on July 20, 2024

Thank you @acdwisu , we will investigate this further and add the information into the manual.

from free-rasp-flutter.

acdwisu avatar acdwisu commented on July 20, 2024

thank you @talsec-app

from free-rasp-flutter.

tusharanchliyajain avatar tusharanchliyajain commented on July 20, 2024

@talsec-app Any update on this, @acdwisu any solution how can I fix this ?

from free-rasp-flutter.

msikyna avatar msikyna commented on July 20, 2024

Hello @tusharanchliyajain ,
the definition of arm64 as build target did not help?

from free-rasp-flutter.

tusharanchliyajain avatar tusharanchliyajain commented on July 20, 2024

Hey @msikyna,
Not it's not working with arm64 as build target still failing on codemagic build

from free-rasp-flutter.

peer-f avatar peer-f commented on July 20, 2024

Hi @yardexx, we are using codemagic.yaml since the workflow editor doesn't support all of the features that we need for our pipelines. I've added the script that you provided before the flutter build ipa gets called and I still receive the No such module 'TalsecRuntime' error.

Our script looks like this:

      - flutter packages pub get
      - find . -name "Podfile" -execdir pod install \;
      ...
      - flutter build ipa --export-options-plist ~/export_options.plist --flavor=dev
        --build-name=0.1.0 --build-number=$PROJECT_BUILD_NUMBER

What I've tried so far:

  • put the script before flutter packages pub get
  • converted the script to a find command that I put after pod install
    - find . -type d -name "iOS" -execdir sh -c 'ln -s Debug/TalsecRuntime.xcframework "$0" && cd ../../../../' {} \;

from free-rasp-flutter.

yardexx avatar yardexx commented on July 20, 2024

After long research, I cannot find a solution for the current version.

However, we will test a new version of freeRASP which will contain only a single iOS framework. That will resolve this issue once and for all.

Once released, I'll let you know here.

from free-rasp-flutter.

peer-f avatar peer-f commented on July 20, 2024

Hi @yardexx,

thank you for looking into the issue!
What is the difference in version 5.0.0-dev.1 compared to 4.0.0? Using version 5.0.0-dev.1 our pipeline actually ran through.

from free-rasp-flutter.

yardexx avatar yardexx commented on July 20, 2024

Since its inception, freeRASP has had a crucial feature of distinguishing between dev and release versions. This allows for testing checks without including them in the weekly report, ensuring accurate data. Until freeRASP 4.0.0, this was achieved by using two native SDKs, one for dev and one for release, which were switched based on the type of build (debug/profile/release).

While this approach worked well for Android, it caused a lot of headaches for iOS. Additionally, since Flutter does not directly support Swift Package Manager, it made the situation even more complicated. To resolve this issue, a symlink for the specific SDK is created on build time (using an integration script provided by the integrator), but as you can see, this workaround works sometimes and causes many issues.

To simplify things, the native SDKs were modified so that a single SDK could be used, and a flag would determine whether Talsec SDK operates in dev (false) or release (true - default for security reasons) mode. No changes occur during build time, avoiding any issues with imports.

The new API includes an isProd flag in TalsecConfig, which is not a breaking change since it has a default value (true).

final config = TalsecConfig(
    androidConfig: ...,
    // Defaults to true
    // true - release (no need to write explicitly)
    // false - dev
    isProd: false,
)

The checks have also been improved.

If you're testing freeRASP 5.0.0-dev.1 (we're glad to hear that!), don't forget to remove the old iOS integration script and use isProd instead. If you spot any issues, please report them by opening an issue. The team is currently testing freeRASP on different environments and with various tooling, including Codemagic, to resolve any issues.

However, it's important to note that freeRASP 5.0.0-dev.1 should not be considered stable. We plan to update the API to provide clearer integration. We also plan to merge iOS and Android callbacks into a single callback (e.g. onSimulatorDetected and onEmulatorDetected will be merged) for clearer and less cluttered code.

from free-rasp-flutter.

msikyna avatar msikyna commented on July 20, 2024

Hello @peer-f ,
could you try it with the new version? The version is 5.0.0.

Kind regards,
Talsec team

from free-rasp-flutter.

peer-f avatar peer-f commented on July 20, 2024

Hi @msikyna ,

I will check it asap.

Best Regards,
Peer

from free-rasp-flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.