Monika Patel
Monika Patel

Reputation: 2375

How to generate iPhone simulator build or .zip file for submit in Facebook for review in iOS

I submit my_app.ipa file to Facebook but its rejected by Facebook. And send me this message "Notes from our review team iPhone Can you please resubmit for review providing a simulator build of your iOS app, and not an .ipa file? I'm reviewing your submission in an iOS simulator that needs your app to be built following these instructions: (.zip) https://developers.facebook.com/docs/ios/creating-ios-simulator-build-for-review" But i was enable to create .zip file of simulator build. and i tried below steps also

Step 1: open finder and press option+ shift+g
Step 2: paste "~/Library/Developer/Xcode/DerivedData"
Step 3: select my_app-jkfksdfhskdhfksdh some this like this folder
Step 4: my_app-jkfksdfhskdhfksdh >>Build >>Products>>Debug-iphonesimulator
Step 5: I see 2 file one is my_app(icon like rounder and 1 cross line ) and 2nd file is my_app.app.dsym

Upvotes: 17

Views: 20907

Answers (8)

Sagar Ghag
Sagar Ghag

Reputation: 155

if you want to generate the build for a flutter project, follow these steps: -

  1. Open Terminal and type open -a Simulator
  2. Run your Flutter project
  3. Once the app is running, terminate the debugging session and go to the following path: <project_root>/build/ios/iphonesimulator. Here you will find the *.app file.
  4. Open the terminal again and write ios-sim launch and then drag and drop the *.app file in the same terminal.

That's it. You have the simulator build ready for Facebook. Just right-click the .app file and selected the option to Compress "*.app".

Upvotes: 3

luke77
luke77

Reputation: 3703

  1. Based on Facebook developer documentation, you just need the command below (remember to change your destination path).

    ditto -ck --sequesterRsrc --keepParent `ls -1 -d -t ~/Library/Developer/Xcode/DerivedData/*/Build/Products/*-iphonesimulator/*.app | head -n 1` path/to/YourApp.zip
    

  1. To verify your build, install ios-sim package and run the command below (d is devicetypeid).

    ios-sim launch /path/to/your-app.app -d iPhone-X
    

Upvotes: 3

Jayesh Patel
Jayesh Patel

Reputation: 1104

  1. Step: Run App in Simulator Run your app in your Xcode iPhone 5 simulator. This automatically creates a simulator build in Xcode's DerivedData cache.

  2. Step: ZIP Simulator Build Zip the simulator build via the following command:

ditto -ck --sequesterRsrc --keepParent ls -1 -d -t ~/Library/Developer/Xcode/DerivedData/*/Build/Products/*-iphonesimulator/*.app | head -n 1 path/to/YourApp.zip

  1. Step: Verify Build You can verify the simulator build by using the ios-sim utility Command-line App Launcher for Simulator. Once installed run:

ios-sim launch /path/to/your-app.app

Upvotes: 0

Dnyaneshwar Wakchaure
Dnyaneshwar Wakchaure

Reputation: 232

Use below command. It will work. Change below path for your app file.

ditto -ck --sequesterRsrc --keepParent '/some/long/path/to/my appname.app' /Desktop/outputfile.zip

to find your app file path on "/Users/home/Library/Developer/Xcode/DerivedData/yourapp.../Build/Products/Debug-iphonesimulator/yourapp.app"

Upvotes: 1

Oliver Dixon
Oliver Dixon

Reputation: 7424

You don't need to do any of this strange ditto stuff.

You can simply zip the app up and upload it. I've had several apps approved this way.

App is usually located:
/Users/home/Library/Developer/Xcode/DerivedData/yourapp.../Build/Products/Debug-iphonesimulator/yourapp.app

Upvotes: 2

Bhavsang Jam
Bhavsang Jam

Reputation: 384

I used below command and its working for me.

ditto -ck --sequesterRsrc --keepParent /Users/mac/Library/Developer/Xcode/DerivedData/yourapp.../Build/Products/Debug-iphonesimulator/yourapp.app  /Users/mac/Desktop/yourapp.zip

You can use your destination path instead of /Users/mac/Desktop/yourapp.zip.

Upvotes: 7

Mukesh
Mukesh

Reputation: 3690

In my case ,i use the below command to build zip file ditto -ck --sequesterRsrc —-keepParent “source" "destination"

where source is /Users/home/Library/Developer/Xcode/DerivedData/yourapp.../Build/Products/Debug-iphonesimulator/yourapp.app

and destination is where you save the .zip file.

enter image description here

Upvotes: 33

Johannes
Johannes

Reputation: 440

for those of you getting the error ""ditto: Can't archive multiple sources":

use --keepParent with two dashes in front of it

ditto -ck --sequesterRsrc —-keepParent “source" "destination"

Upvotes: 6

Related Questions