mirror of
https://github.com/ProxymanApp/atlantis.git
synced 2026-04-26 08:26:04 +03:00
[GH-ISSUE #56] Objective-C error 'Atlantis-Swift.h' file not found. #39
Labels
No labels
Done
Done
Windows
bug
bug
bug
enhancement
enhancement
enhancement
good first issue
hacktoberfest
pull-request
wontfix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/atlantis#39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @apostopher on GitHub (Feb 10, 2021).
Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/56
Originally assigned to: @NghiaTranUIT on GitHub.
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.
@NghiaTranUIT commented on GitHub (Feb 10, 2021):
Thanks for the bug. Let me investigate it with the Objc Project
@NghiaTranUIT commented on GitHub (Feb 10, 2021):
Hey @apostopher
I've just created a new Objective-C Project and integrate Atlantis by Cocoapod. I didn't get any problem.
Can you download and run this objc example: https://www.dropbox.com/s/k9cbdqhmyil5lo6/Objective-C-Example.zip?dl=0
@apostopher commented on GitHub (Feb 10, 2021):
@NghiaTranUIT thanks for a quick reply. sure. I'll try it on my end.
@NghiaTranUIT commented on GitHub (Feb 10, 2021):
You're welcome @apostopher Please let me know the result 😄
@apostopher commented on GitHub (Feb 10, 2021):
@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.
@NghiaTranUIT commented on GitHub (Feb 10, 2021):
I'm not sure if Atlantis could work with React-Native if the Network library in your project doesn't use URLSession to make a Request.
Do you know a React-native example that I can test out? 🤔
@apostopher commented on GitHub (Feb 10, 2021):
I think react-native's fetch API internally uses NSURLSession. I'll try a sample app tomorrow. I'll share my findings with you.
@apostopher commented on GitHub (Mar 12, 2021):
@NghiaTranUIT i investigated the issue and here are my 2 cents:
This error happens if the
Podfiledoes not haveuse_frameworks!line.Unfortunately in my case if i add
use_frameworks!my other deps fail to build. :-(@NghiaTranUIT commented on GitHub (Mar 13, 2021):
@apostopher can you fork the project, remove the
use_frameworks!and see if it works for you 🤔@apostopher commented on GitHub (Mar 23, 2021):
@NghiaTranUIT I cloned this project https://www.dropbox.com/s/k9cbdqhmyil5lo6/Objective-C-Example.zip?dl=0 and tried without
use_frameworks!and I can reproduce the same error.@NghiaTranUIT commented on GitHub (Mar 23, 2021):
Thanks. Let me check it out 👍
@archcorsair commented on GitHub (Nov 2, 2021):
Solution
🎉 I found a working solution using a plugin called cocoapods-user-defined-build-types
$ gem install cocoapods-user-defined-build-typesPodfileThis 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
@archcorsair commented on GitHub (Nov 2, 2021):
Solution
🎉 I found a working solution using a plugin called cocoapods-user-defined-build-types
$ gem install cocoapods-user-defined-build-typesPodfile:This fixed my issue and Atlantis works perfectly.
@NghiaTranUIT commented on GitHub (Nov 3, 2021):
Awesome 👍 I might add a public header to in SPM, so you can use SPM on Objective-C project 👍
@apostopher commented on GitHub (Nov 3, 2021):
that's great news! thanks, @archcorsair for the solution. and a million thanks to @NghiaTranUIT for the awesome proxyman and atlantis!
do you have plans to support android too?
@NghiaTranUIT commented on GitHub (Nov 3, 2021):
Unfortunately, I don't have any plan to bring Atlantis to Android because I have no experience on Android and Atlantis is heavily depends on Method Swizzling and URLSession, which are not available on Android world.
@NghiaTranUIT commented on GitHub (Nov 3, 2021):
It seems that adding the public header to use SPM on the Objective-C project is not possible in terms of technical limitations. Thread: https://forums.swift.org/t/how-to-import-swift-package-into-objective-c-using-xcode/43978/15
@StanislavMayorov commented on GitHub (Aug 11, 2022):
Http proxy works fine in RN project using cocoapods-user-defined-build-types solution, but websocket doesn't work. Is it possible to extend RN implementation to support atlantis?
@rolfen commented on GitHub (Mar 14, 2024):
@archcorsair , followed your instructions, to no avail
@NghiaTranUIT commented on GitHub (Mar 15, 2024):
@rolfen do you use React Native or native iOS app 🤔
I've created a Objective-C iOS project again, and Cocoapod works fine with Atlantis. No need to use
enable_user_defined_build_types@NghiaTranUIT commented on GitHub (Mar 15, 2024):
It's a known issue because React Native doesn't use native URLWebsocketSession to make a WS/WSS. They use their own WS socket. Thus, Atlantis doesn't work.
@rolfen commented on GitHub (Mar 16, 2024):
I use react-native trying to build ios.
I tried the workaround suggested by @archcorsair and after many additional steps to be able to install the plugin (install rbenv, update ruby, update this update that, etc.) I finally hit this error on
pod installso gave up on atlantis.Flipper or proxyman(+helper) seem to work for my needs.
Changing the
use_frameworks!setting will break the build somewhere else.@NghiaTranUIT commented on GitHub (Mar 16, 2024):
Can you use SPM on your react-native app? @rolfen
I will checkout the react-native + Atlantis today
@NghiaTranUIT commented on GitHub (Mar 16, 2024):
@rolfen I follow this solution and it works fine: https://github.com/ProxymanApp/atlantis/issues/56#issuecomment-958427958
Note: I don't use
use_frameworks!in thePodfile