Install App From Xcode To Iphone

2/11/2022by admin

IPA files contain iPhone apps. Some of them are from the App Store, which Macs can install by simply double-clicking. But what if you want to install an app you compiled using Xcode yourself, or an IPA you download off the Internet? Previously, there was no way to do this, but I’ve figured out a workaround to run any IPA file on a M1 Mac. And I mean ANY app. Especially the Non-Appstore ones.

Prerequisites:

February 3, 2020 How to add missing iPhone SE simulator in Xcode 11 with iOS 13 SDKs. You might have noticed that after upgrading to Xcode 11 with iOS 13 SDKs, Xcode’s list of iOS Simulators to run your app on does not include the iPhone SE simulator any more. Install your iOS app on your iPhone via TestFlight, and debug it with a tool like Bugsnag. You can monitor and debug live crashes in your app. You can monitor and debug live crashes in your app. An interesting use case for renting a Mac in the cloud comes from the latest developments in Apple’s hardware.

  • M1 Mac
  • An IPA file you want to install (not from the App Store)
  • 5 mins of time

Note: if your app is downloadable from the App Store, just use the iMazing method instead. It is a LOT easier, you just double-click a file and go. This is meant to be use for IPA files that are NOT obtainable on the App Store.

  1. Download a wrapper The way MacOS runs iPhone apps is by downloading the app from the Appstore and manipulating its metadata into something MacOS can read. It does this by installing a “wrapper” for iOS apps. We will need a wrapper to run our app, too. The first thing you need to do is download an iOS AppStore app. You’ll need this to generate the wrapper, but it can be uninstalled after we’re done. I’m using a podcast app called Overcast, but most other iPhone apps will work. Enter the macOS App Store, and search for your app. Make sure to select “iPhone and iPad apps” instead of “macOS apps”, as we need an iOS app to use as our wrapper. Simply download it and proceed to step 2.

  2. Copy the wrapper Open the Terminal application. Type cd /Applications/ and then cp -R [the app you just downloaded].app ~/Documents. DON’T DO THIS VIA FINDER, it will mess up the wrapper.

  3. Sign your IPA Use iOS App Signer to resign the IPA file you plan to install. This is essential! If you compiled an iPA with Xcode, you can skip this step, as it is already signed.

  4. Prepare your IPA Then, cd to wherever your downloaded your IPA file, and unzip it with unzip YOURIPA.ipa. Using Finder, copy the app inside the Payload folder into our wrapper in ~/Documents.

  5. Modify the wrapper Right-click the wrapper we copied into Documents and select “Show Package Contents.” Delete WrappedBundle, and move into Wrapper. Copy the app extracted from the IPA into this folder, and delete the original app that was in there. Do not delete the plist files. Leave BundleMetadata.plist alone, as we don’t need to change it. Modify iTunesMetadata.plist, replacing the softwareVersionBundleId, bundleShortVersionString, itemName, and artistName with the proper information that can be found in your app’s Info.plist (again, use Show Package Contents). While changing these are all recommended, the only one you REALLY need to change is itemName and bundleShortVersionString.

  6. Fix the wrapper Remember how we deleted WrappedBundle? Well, we actually do need that to run, but we couldn’t use the one already made. It’s a simple fix though. Open Terminal and cd into the first wrapper folder (~/Documents/WrapperApp.app). Run ln -S Wrapper/YourIOSApp.app WrappedBundle.

  7. Install the wrapper Finally, we’re done! Rename the wrapper app in your Documents folder to the name of the app you’re installing, and run it! You can copy it into your /Applications folder if you want it to live in the Launchpad.

  8. Approve your app When you run your app, macOS will complain about not trusting you. Open System Preferences, select “Security and Privacy”, and click “Open Anyway” next to the text saying “x was blocked from use”. Select “always trust this developer” (since it’s you) and click “Open”, and you’re done! The app will now run like it’s on iOS!

Install App From Xcode To Iphone

In the future, I will create a script to do all this for you, automatically. For now though, you’ll have to do it all by hand. There is a limit to how many apps an Apple account can make; if you run into that problem, create a new Apple ID and use it for signing. One more thing: I think you might have to resign the app file like you do if you want to sideload an app on iOS, but I’ve just discovered this today, so I’m not sure. If you have a Developer Account, it will last a year. But who knows, maybe it won’t need to be resigned? Either way, occasional resigning is nothing, compared to having any app installed on a Mac.

Contents
  • Register your app on App Store Connect

This guide provides a step-by-step walkthrough of releasing aFlutter app to the App Store and TestFlight.

Preliminaries

Xcode is required to build and release your app. Youmust use a device running macOS to follow this guide.

Before beginning the process of releasing your app,ensure that it meetsApple’s App Review Guidelines.

In order to publish your app to the App Store,you must first enroll in theApple Developer Program.You can read more about the variousmembership options in Apple’sChoosing a Membership guide.

Register your app on App Store Connect

Manage your app’s life cycle onApp Store Connect (formerly iTunes Connect).You define your app name and description, add screenshots,set pricing, and manage releases to the App Store and TestFlight.

Registering your app involves two steps: registering a uniqueBundle ID, and creating an application record on App Store Connect.

For a detailed overview of App Store Connect, see theApp Store Connect guide.

Register a Bundle ID

Every iOS application is associated with a Bundle ID,a unique identifier registered with Apple.To register a Bundle ID for your app, follow these steps:

  1. Open the App IDs page of your developer account.
  2. Click + to create a new Bundle ID.
  3. Enter an app name, select Explicit App ID, and enter an ID.
  4. Select the services your app uses, then click Continue.
  5. On the next page, confirm the details and click Registerto register your Bundle ID.

Create an application record on App Store Connect

Register your app on App Store Connect:

  1. Open App Store Connect in your browser.
  2. On the App Store Connect landing page, click My Apps.
  3. Click + in the top-left corner of the My Apps page,then select New App.
  4. Fill in your app details in the form that appears.In the Platforms section, ensure that iOS is checked.Since Flutter does not currently support tvOS,leave that checkbox unchecked. Click Create.
  5. Navigate to the application details for your app and selectApp Information from the sidebar.
  6. In the General Information section, select the Bundle IDyou registered in the preceding step.

For a detailed overview,see Add an app to your account.

Review Xcode project settings

This step covers reviewing the most important settingsin the Xcode workspace.For detailed procedures and descriptions, seePrepare for app distribution.

Navigate to your target’s settings in Xcode:

Xcode
  1. In Xcode, open Runner.xcworkspace in your app’s ios folder.
  2. To view your app’s settings, select the Runner project in the Xcodeproject navigator. Then, in the main view sidebar, select the Runnertarget.
  3. Select the General tab.

Verify the most important settings.

In the Identity section:

Display Name
The display name of your app.
Bundle Identifier
The App ID you registered on App Store Connect.

In the Signing & Capabilities section:

Automatically manage signing
Whether Xcode should automatically manage app signingand provisioning. This is set true by default, which shouldbe sufficient for most apps. For more complex scenarios,see the Code Signing Guide.
Team
Select the team associated with your registered Apple Developeraccount. If required, select Add Account…,then update this setting.

In the Build Settings section:

iOS Deployment Target
The minimum iOS version that your app supports.Flutter supports iOS 9.0 and later. If your app or pluginsinclude Objective-C or Swift code that makes use of APIs newerthan iOS 9, update this setting to the highest required version.

The General tab of your project settings should resemblethe following:

For a detailed overview of app signing, seeCreate, export, and delete signing certificates.

Updating the app’s deployment version

If you changed Deployment Target in your Xcode project,open ios/Flutter/AppframeworkInfo.plist in your Flutter appand update the MinimumOSVersion value to match.

Updating the app’s version number

The default version number of the app is 1.0.0.To update it, navigate to the pubspec.yaml fileand update the following line:

version: 1.0.0+1

The version number is three numbers separated by dots,such as 1.0.0 in the example above, followed by an optionalbuild number such as 1 in the example above, separated by a +.

Both the version and the build number may be overridden in Flutter’sbuild by specifying --build-name and --build-number,respectively.

In iOS, build-name uses CFBundleShortVersionStringwhile build-number uses CFBundleVersion.Read more about iOS versioning at Core Foundation Keyson the Apple Developer’s site.

Add an app icon

When a new Flutter app is created, a placeholder icon set is created.This step covers replacing these placeholder icons with yourapp’s icons:

  1. Review the iOS App Icon guidelines.
  2. In the Xcode project navigator, select Assets.xcassets in theRunner folder. Update the placeholder icons with your own app icons.
  3. Verify the icon has been replaced by running your app usingflutter run.

Create a build archive with Xcode

This step covers creating a build archive and uploadingyour build to App Store Connect.

During development, you’ve been building, debugging, and testingwith debug builds. When you’re ready to ship your app to userson the App Store or TestFlight, you need to prepare a release build.At this point, you might consider obfuscating your Dart codeto make it more difficult to reverse engineer. Obfuscatingyour code involves adding a couple flags to your build command.

In Xcode, configure the app version and build:

  1. In Xcode, open Runner.xcworkspace in your app’s ios folder.
  2. Select Runner in the Xcode project navigator, then select theRunner target in the settings view sidebar.
  3. In the Identity section, update the Version to the user-facingversion number you wish to publish.
  4. In the Identity section, update the Build identifier to a uniquebuild number used to track this build on App Store Connect.Each upload requires a unique build number.

Finally, create a build archive and upload it to App Store Connect:

  1. Run flutter build ipa to produce a build archive.

    Note: On versions of Flutter where flutter build ipa is unavailable, open Xcode and select Product > Archive. In the sidebar of the Xcode Organizer window, select your iOS app, then select the build archive you just produced.

  2. Open build/ios/archive/MyApp.xcarchive in Xcode.

  3. Click the Validate App button. If any issues are reported,address them and produce another build. You can reuse the samebuild ID until you upload an archive.

  4. After the archive has been successfully validated, clickDistribute App. You can follow the status of your build in theActivities tab of your app’s details page onApp Store Connect.

    Note: When you export your app at the end of Distribute App, Xcode will create a directory containing an IPA of your app and an ExportOptions.plist file. You can create new IPAs with the same options without launching Xcode by running flutter build ipa --export-options-plist=path/to/ExportOptions.plist. See xcodebuild -h for details about the keys in this property list.

You should receive an email within 30 minutes notifying you thatyour build has been validated and is available to release to testerson TestFlight. At this point you can choose whether to releaseon TestFlight, or go ahead and release your app to the App Store.

For more details, seeUpload an app to App Store Connect.

Create a build archive with Codemagic CLI tools

This step covers creating a build archive and uploadingyour build to App Store Connect using Flutter build commandsand Codemagic CLI Tools executed in a terminalin the Flutter project directory. This allows you to create a build archivewith full control of distribution certificates in a temporary keychain isolated from your login keychain.

  1. Install the Codemagic CLI tools:

  2. You’ll need to generate an App Store Connect API Keywith App Manager access to automate operations with App Store Connect. To makesubsequent commands more concise, set the following environment variables fromthe new key: issuer id, key id, and API key file.

  3. You need to export or create an iOS Distribution certificate to code sign and package a build archive.

    If you have existing certificates, you can export theprivate keys by executing the following command for each certificate:

    Or you can create a new private key by executing the following command:

    Later, you can have CLI tools automatically create a new iOS Distribution from the private key.

  4. Set up a new temporary keychain to be used for code signing:

    Restore Login Keychain!After running keychain initialize you must run the following:

    keychain use-login

    This sets your login keychain as the default to avoid potentialauthentication issues with apps on your machine.

  5. Fetch the code signing files from App Store Connect:

    Where cert_key is either your exported iOS Distribution certificate private keyor a new private key which automatically generates a new certificate. The certificatewill be created from the private key if it doesn’t exist in App Store Connect.

  6. Now add the fetched certificates to your keychain:

  7. Update the Xcode project settings to use fetched code signing profiles:

  8. Install Flutter dependencies:

  9. Install CocoaPods dependencies:

  10. Build the Flutter the iOS project:

    Note that export_options.plist is the output of the xcode-project use-profiles command.

  11. Publish the app to App Store Connect:

  12. As mentioned earlier, don’t forget to set your login keychainas the default to avoid authentication issueswith apps on your machine:

You should receive an email within 30 minutes notifying you thatyour build has been validated and is available to release to testerson TestFlight. At this point you can choose whether to releaseon TestFlight, or go ahead and release your app to the App Store.

Release your app on TestFlight

TestFlight allows developers to push their appsto internal and external testers. This optional stepcovers releasing your build on TestFlight.

  1. Navigate to the TestFlight tab of your app’s applicationdetails page on App Store Connect.
  2. Select Internal Testing in the sidebar.
  3. Select the build to publish to testers, then click Save.
  4. Add the email addresses of any internal testers.You can add additional internal users in the Users and Rolespage of App Store Connect,available from the dropdown menu at the top of the page.

For more details, see Distribute an app using TestFlight.

Release your app to the App Store

Install App From Xcode To Iphone 7

When you’re ready to release your app to the world,follow these steps to submit your app for review andrelease to the App Store:

Install App From Xcode To Iphone Backup

  1. Select Pricing and Availability from the sidebar of your app’sapplication details page onApp Store Connect and complete therequired information.
  2. Select the status from the sidebar. If this is the firstrelease of this app, its status is1.0 Prepare for Submission. Complete all required fields.
  3. Click Submit for Review.

Apple notifies you when their app review process is complete.Your app is released according to the instructions youspecified in the Version Release section.

Install App From Xcode To Iphone Xr

For more details, seeDistribute an app through the App Store.

Troubleshooting

Install App From Xcode To Iphone 6

The Distribute your app guide provides adetailed overview of the process of releasing an app to the App Store.

Comments are closed.