Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6005961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:28:20+00:00 2026-05-23T01:28:20+00:00

When testing our iOS app, my team and I need to disable SSL certificate

  • 0

When testing our iOS app, my team and I need to disable SSL certificate validation.

At present, we are using a hard-coded #define:

// In Prefix.pch
#define ALLOW_INVALID_SSL_CERTS

// Elsewhere
#ifdef ALLOW_INVALID_SSL_CERTS
// Code to disable SSL certificate validation
#endif

As a result, we have to remember to remove the #define every time we release a new version.

Ideally we would like to find a way to enable a flag in Xcode that would not be checked into source control.

I have discovered that this is possible using application arguments ([[NSProcessInfo processInfo] arguments); however this is potentially exploitable since an attacker could find a way to provide the argument in question to the app before it is launched.

Is there another way to set this up in Xcode?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T01:28:21+00:00Added an answer on May 23, 2026 at 1:28 am

    Try to set the Other C Flag in your build settings like -DDEBUG=1 in the debug settings and in the release settings set this to -DDEBUG=0. Then in your prefix file define your debug macro like this.

    #if DEBUG
    #define ALLOW_INVALID_SSL_CERTS 1
    #else
    #define ALLOW_INVALID_SSL_CERTS 0
    #endif
    

    I do it in this way. Here is a screenshot if you want to know where to set the -DDEBUG option.

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a hard time testing our Wicket application using Selenium because of the
I'm using JUnit and FEST for Swing integration testing of our app that I
I am using Windows 2008 r2 64 bit system. While testing our script ,we
I am just testing an app to get data off our web server, previously
There is a team working on acceptance testing X11 GUI application in our company,
I'm testing my app with the iOS 5 beta and have run across several
While manually testing our app we found that the server does not send emails
In our web-app we are using Launcher to call some command line functions (not
We are testing our app on an iPad with 4.2 on it. How do
We are using Selenium for functional testing our AJAX application. Although Selenium has been

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.