简体   繁体   中英

Generate simulator build

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...!

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

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.

xcodebuild -arch i386 -sdk iphonesimulator{version} -workspace [projectName].xcworkspace -scheme [projectName]

按照步骤单击此处

对于xcodeworkshp,请在终端中使用以下命令:

xcodebuild -workspace {project name}.xcworkspace -scheme {project name} -arch i386 -sdk iphonesimulator{your version supported}

如果你想用64位编译(避免'这个应用程序不适用于未来版本的iOS'消息):

xcodebuild -workspace {project name}.xcworkspace -scheme {project name} -arch x86_64 ONLY_ACTIVE_ARCH=NO -sdk iphonesimulator10.3

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.

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.

1)Clean the derived data.

2)Select the simulator and make a build.

3)open finder and goto the path ie ~/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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM