问题
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...!
回答1:
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
回答2:
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.
回答3:
xcodebuild -arch i386 -sdk iphonesimulator{version} -workspace [projectName].xcworkspace -scheme [projectName]
Follow the steps Click here
回答4:
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}
回答5:
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
回答6:
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.
回答7:
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.
回答8:
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.
来源:https://stackoverflow.com/questions/23950096/generate-simulator-build