atlantis: Objective-C error 'Atlantis-Swift.h' file not found.

Hello, first of all, thanks to proxyman, it’s super easy to debug network traffic.

I’m trying to integrate Atlantis in my objective-C AppDelegate.m. but the Xcode build fails with the error 'Atlantis-Swift.h' file not found.

I followed the README.md documentation and added #import "Atlantis-Swift.h". I’m using the Atlantis version 1.7.1 (installed using cocoapods)

Thanks in advance.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 24 (13 by maintainers)

Most upvoted comments

Solution

🎉 I found a working solution using a plugin called cocoapods-user-defined-build-types

  1. Install the gem: $ gem install cocoapods-user-defined-build-types
  2. Add these above your target in Podfile
plugin 'cocoapods-user-defined-build-types'
enable_user_defined_build_types!
  1. Add atlantis pod:
pod 'atlantis-proxyman', :build_type => :dynamic_framework

This fixed my issue and Atlantis works perfectly.

Original Comment

I’m running into this exact issue. I’ve confirmed the pod was installed, it shows up in Podfile.lock. atlantis-proxyman (1.12.0) Tried cleaning before building and it did not help.

React Native project - Running on M1 (arm64) Xcode 13.1 (13A1030d) MacOS 12.0.1

image

I think react-native’s fetch API internally uses NSURLSession. I’ll try a sample app tomorrow. I’ll share my findings with you.

Solution

🎉 I found a working solution using a plugin called cocoapods-user-defined-build-types

  1. Install the gem: $ gem install cocoapods-user-defined-build-types
  2. Add these two lines above your target in Podfile:
plugin 'cocoapods-user-defined-build-types'
enable_user_defined_build_types!
  1. Add atlantis pod:
pod 'atlantis-proxyman', :build_type => :dynamic_framework

This fixed my issue and Atlantis works perfectly.

@apostopher can you fork the project, remove the use_frameworks! and see if it works for you 🤔

@NghiaTranUIT it worked in your project. I’m using react-native. and it’s still failing. I’ll investigate the issue and update this thread.

Hey @apostopher

I’ve just created a new Objective-C Project and integrate Atlantis by Cocoapod. I didn’t get any problem.

Screen Shot 2021-02-10 at 09 00 12
#import "AppDelegate.h"
#import "Atlantis-Swift.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    [Atlantis startWithHostName:nil];
    return YES;
}

Can you download and run this objc example: https://www.dropbox.com/s/k9cbdqhmyil5lo6/Objective-C-Example.zip?dl=0

Thanks for the bug. Let me investigate it with the Objc Project