Testing an iOS Facebook App Without a Permanent Apple ID: A Step-by-Step Guide

Testing an iOS Facebook App Before Getting an Apple ID

=====================================================

As a mobile application developer, it’s not uncommon to encounter situations where you’re stuck in a paradox of sorts. You want to test your app on real devices before submitting it to the App Store, but the App Store requires an iPhone app store ID that you can only obtain after submitting your app. In this scenario, we’ll explore a solution to test an iOS Facebook app without having an Apple ID.

Understanding the Problem


To submit an app to the App Store, you need to create an Apple Developer account and generate an iPhone app store ID. This process involves going through the submission process in iTunes Connect, which requires some metadata such as the app’s description, keywords, screen shots, and more. However, if you don’t have an Apple ID yet, it seems like a catch-22.

Solution: Testing with a Temporary App Store ID


The solution to this problem is to generate a temporary iPhone app store ID by logging into iTunes Connect and going through the submission process, but stopping short of clicking the ‘Ready to Upload’ button. This will create an Apple ID for your app, which you can use for testing purposes.

Here are the steps:

Step 1: Create a New App in iTunes Connect

  • Log into your developer account on iTunes Connect.
  • Click on the “Create a New App” button at the top right corner of the screen.
  • Fill in the required information such as the app’s name, bundle ID, and more.

Step 2: Set Up Your App’s Metadata

  • Enter the metadata for your app, including the description, keywords, and screen shots.
  • Make sure to select the correct platforms for testing (e.g., iPhone simulator or physical device).

Step 3: Upload a Binary (Optional)

  • If you have already built and archived your app, you can upload it here. Otherwise, leave this section blank.

Step 4: Skip the Ready-to-Upload Button

  • Click on the “Next” button to proceed.
  • In the next screen, select the “Skip Ready-to-Upload” option.
  • This will create a temporary Apple ID for your app and save it in iTunes Connect.

Using Your Temporary App Store ID


Now that you have a temporary iPhone app store ID, you can use it to test your app on real devices or with an iPhone simulator. To do this:

Step 1: Get the Bundle ID

  • In Xcode, go to Product > Archive.
  • Click on the “Get App Store Connect ID” button next to the archived build.
  • Copy and paste the bundle ID into your testing environment.

Step 2: Set Up Your Facebook Integration

  • Import the Facebook SDK in your project.
  • Use the FBSDKShareKit class to share content with Facebook.

Here’s an example of how you can use FBSDKShareKit:

// Import the Facebook SDK
#import <FacebookSDK/FBSDKShareKit.h>

// Create a new instance of FBSDKShareKit
FBSDKShareKit *shareKit = [[FBSDKShareKit alloc] init];

// Set up the share content
NSArray *content = @[@"Title", @"Description", @"Image URL"];

// Share the content with Facebook
[shareKit shareContent:content inTargetApp:@"com.facebook.appname" delegate:self];

Testing on Real Devices vs. iPhone Simulator


You can test your app on either real devices or an iPhone simulator, depending on your testing needs.

Testing on Real Devices

  • To test on a real device, you’ll need to add the following lines in your Info.plist file:

NSAppTransportSecurity NSAllowsArbitraryLoads


*   You can also add the following lines to disable sandboxing for testing purposes:

    ```markdown
<key>NSAppSandboxMode</key>
<string>never</string>

Testing on iPhone Simulator

  • To test on an iPhone simulator, you’ll need to create a .xcconfig file in your project.

  • Add the following lines to the .xcconfig file:

Configuration for testing on iOS 14.2 Simulator

SimulatorPlatform: simulator-iOS-14_2


## Conclusion
----------

Testing an iOS Facebook app without having an Apple ID can be challenging, but it's not impossible. By generating a temporary iPhone app store ID through iTunes Connect and using it to test your app, you can get around this limitation.

Additionally, testing on real devices or with an iPhone simulator provides valuable insights into how your app performs on different platforms.

Remember to disable sandboxing for testing purposes and follow the best practices mentioned in this article.

Last modified on 2025-04-02