[GH-ISSUE #129] 如何在发布环境中移除atlantis对app的改动? #78

Closed
opened 2026-03-03 19:11:35 +03:00 by kerem · 2 comments
Owner

Originally created by @amjunliang on GitHub (Jun 2, 2023).
Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/129

使用需要两处改动

  1. plist改动
<key>NSLocalNetworkUsageDescription</key>
<string>Atlantis would use Bonjour Service to discover Proxyman app from your local network.</string>
<key>NSBonjourServices</key>
<array>
    <string>_Proxyman._tcp</string>
</array>
  1. 代码处调用, 此处可以用DEBUG宏屏蔽,
// Or import Atlantis as a module, you can use:
@import Atlantis;

// Add to the end of `application(_:didFinishLaunchingWithOptions:)` in AppDelegate
[Atlantis startWithHostName:nil];

问题是plist的改动如何在release环境去除, 防止调试库发布到线上

Originally created by @amjunliang on GitHub (Jun 2, 2023). Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/129 使用需要两处改动 1. plist改动 ``` <key>NSLocalNetworkUsageDescription</key> <string>Atlantis would use Bonjour Service to discover Proxyman app from your local network.</string> <key>NSBonjourServices</key> <array> <string>_Proxyman._tcp</string> </array> ``` 2. 代码处调用, 此处可以用DEBUG宏屏蔽, ``` // Or import Atlantis as a module, you can use: @import Atlantis; // Add to the end of `application(_:didFinishLaunchingWithOptions:)` in AppDelegate [Atlantis startWithHostName:nil]; ``` 问题是plist的改动如何在release环境去除, 防止调试库发布到线上
kerem closed this issue 2026-03-03 19:11:36 +03:00
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 3, 2023):

@amjunliang

In the YourApp-Dev target:

  1. Duplicate the plist file to app-dev.plist
  2. Open Xcode -> Project -> Target -> Build Setting -> Assign app-dev.plist to your dev configuration.
  3. Use
#if DEV
// Or import Atlantis as a module, you can use:
@import Atlantis;

// Add to the end of `application(_:didFinishLaunchingWithOptions:)` in AppDelegate
[Atlantis startWithHostName:nil];
#endif

Or you can create two targets, one is YourApp and YourApp-Dev

<!-- gh-comment-id:1574507491 --> @NghiaTranUIT commented on GitHub (Jun 3, 2023): @amjunliang In the `YourApp-Dev` target: 1. Duplicate the `plist` file to `app-dev.plist` 2. Open Xcode -> Project -> Target -> Build Setting -> Assign `app-dev.plist` to your dev configuration. 3. Use ```swift #if DEV // Or import Atlantis as a module, you can use: @import Atlantis; // Add to the end of `application(_:didFinishLaunchingWithOptions:)` in AppDelegate [Atlantis startWithHostName:nil]; #endif ``` Or you can create two targets, one is `YourApp` and `YourApp-Dev`
Author
Owner

@amjunliang commented on GitHub (Jun 11, 2023):

非常感谢

<!-- gh-comment-id:1586173303 --> @amjunliang commented on GitHub (Jun 11, 2023): 非常感谢
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/atlantis#78
No description provided.