Generate simulator build
Asked Answered
T

8

8

I am working on an app that needs data from a Facebook app. Facebook want a release simulator build. I have followed FB's instruction to the letter but when i try to build the simulator package xcodebuild -arch i386 -sdk iphonesimulator7.1 i get the following error:

    ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

The following build commands failed:
    Ld build/Release-iphonesimulator/Olabord.app/Olabord normal i386
(1 failure)

I suspect that it has to do with cocoa pods but i don't know how to deal with it. I desperately need guidance or a workaround...!

Thymic answered 30/5, 2014 at 8:22 Comment(0)
U
27

I had the same problem. Since you're working with a workspace file with pods you need to run the following in Terminal:

xcodebuild -workspace {project name}.xcworkspace -scheme {project name}  -arch i386 -sdk iphonesimulator7.1

The FB instructions say the .app file should be in: {base directory}/build/Release-iphonesimulator/{projectname}.app

In my case it ended up in /Developer/Derived Data/{project name}-{long string of random letters}/Build/Products/Debug-iphonesimulator

Undecagon answered 5/6, 2014 at 5:28 Comment(1)
the guide by facebook worked for me . i just added i386 to the valid architecture to the app target. but thanks for the guide.Kale
P
7

Tim's answer might work, but if it doesn't go to the following path.Library/Developer/Xcode/DerivedData/your_application/Build/Products/Debug-iphonesimulator/your_application.app I sent that file (compressed) to Facebook and they accepted it.

Precognition answered 27/6, 2014 at 10:57 Comment(0)
K
5
xcodebuild -arch i386 -sdk iphonesimulator{version} -workspace [projectName].xcworkspace -scheme [projectName]

Follow the steps Click here

Krona answered 27/6, 2014 at 10:44 Comment(0)
I
0

For xcodeworkshp pls make use of below command in terminal:

xcodebuild -workspace {project name}.xcworkspace -scheme {project name} -arch i386 -sdk iphonesimulator{your version supported}
Illuminism answered 31/1, 2015 at 7:19 Comment(0)
W
0

If you want to compile in 64 bits (avoiding 'This app will not work with future versions of iOS' message):

xcodebuild -workspace {project name}.xcworkspace -scheme {project name} -arch x86_64 ONLY_ACTIVE_ARCH=NO -sdk iphonesimulator10.3
When answered 5/9, 2017 at 11:32 Comment(0)
R
0

Go to simulator location, then copy projectName.app and past some where easy location.

In terminal type this comment:

ditto -ck --keepParent --sequesterRsrc /Users/pothiraj/Desktop/projectname.app /Users/spritzblr/Desktop/fileName.zip


ditto -ck --keepParent --sequesterRsrc {source} {destination}/fileName.zip

You will get the zip file in desktop.

Raimes answered 11/7, 2018 at 10:39 Comment(0)
E
0

Here are all steps to create simulator build including the installation process:

  • On Xcode, build and run the app on the simulator.
  • Then open “Activity Monitor” and find the name of the App you are running. Not Xcode, the actual App you are building. If you double click on the App Name, you should get a popup with the tab “Open Files and Ports”. Once you are on the tab you should get a long path for example /Users/webdigi/Library/Developer/CoreSimulator/Devices/A334134-2343-234A-234C-ASD1234EA3/Webdigi.app

  • The above is the location to the .app file that you need. Copy the .app file from that folder and send it across to the person who wants to run the app on their Simulator.

  • Now the other person should place the .app file to a location like Desktop

  • They have to then open Xcode and open a Simulator
  • On the command line type this command > xcrun simctl install booted $LOCATION/FILENAME.app replace $LOCATION with the path and the FILENAME should be the name
  • The App should appear on the Simulator, just click on the App to Launch it.
Ellita answered 25/10, 2018 at 8:30 Comment(0)
P
-1

1)Clean the derived data.

2)Select the simulator and make a build.

3)open finder and goto the path i.e. ~/Library/Developer/CoreSimulator/

4)Then go into the devices then goto into the other folder then go into the data then go into the containers then go into the bundle then go into the application then you will see folder which name in numeric form copy that folder and paste it to other location.

5) Again come back from the application folder you will see the data folder then go into the data folder again you will see the application folder and under the application folder you will see other folder with numeric name the copy the numeric name folder and paste the folder on the same place where you paste the last application folder.

6) Share above two folder with the tester or anyone which want the simulator build.

Puli answered 26/9, 2017 at 9:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.