Xcodebuild does not create dynamic structure with x86_64 architecture

I use the xcodebuild command to generate a dynamic structure. To make it compatible with the iPhone 5s simulator, I need to build it with x86_64 architecture. but he does not create a framework.

I use the command below for this.

xcodebuild -project $PROJECT_PATH -configuration 'Release' -sdk 'iphonesimulator7.0' clean build ARCHS='x86_64' VALID_ARCHS='x86_64' IPHONEOS_DEPLOYMENT_TARGET='7.0' TARGET_BUILD_DIR="$BUILD_DIR/build-x86_64" BUILT_PRODUCTS_DIR="BUILD_DIR/build-x86_64" 

Please, help...

+6
source share
3 answers

Thank you for your responses..

I just found that the iphonesimulator7.0 SDK was not installed on my machine, so it did not work on creation.

I changed it to iphonesimulator and now its working.

0
source

You may be missing the -target "MyTarget" parameter -target "MyTarget" . By default, if you do not pass this parameter, xcodebuild build the first target specified in the project. Desired goal - the first goal in the project?

Another option you can try is to use a proven method to create universal frameworks for iOS. I used the method described here with many frameworks with excellent results: https://github.com/jverkoey/iOS-Framework . I am not the developer of this method.

Without publishing error messages or even, as you know, that it is failing, it’s difficult for you to give more detailed information. Can't build (so you get an error message)? Unsuccessful because you do not see the x86_64 in the final structure?

0
source

Try something similar in the argument list link to xcodebuild

 -destination "platform=iOS Simulator,OS=8.0,name=iPhone 6" 

This is what is displayed for the project (I am making this assumption based on your context above)

  xcodebuild [-project projectname] -scheme schemename [-destination destinationspecifier] [-destination-timeout value] [-configuration configurationname] [-sdk [sdkfullpath | sdkname]] [buildaction ...] [setting=value ...] [-userdefault=value ...] 

In one of your examples, you can also specify several destinations.

 xcodebuild -workspace MyWorkspace.xcworkspace -scheme MyScheme -destination 'platform=iOS Simulator,name=iPhone' -destination 'platform=iOS,name=My iPad' test 

I am personally in a project that uses a workspace, so I need to list the scheme.

Side note, I noticed that you set TARGET_BUILD_DIR and BUILD_PRODUCTS. I install OBJROOT and SYMROOT, and the directories exit just as if I were using the Xcode GUI.

The final example is a real example of using the destination flag.

 BUILDDIR="<path/to/build/directory>" xcodebuild -workspace "<path/to/workspace/>my.xcworkspace" -scheme "NameOfMySchemeToBuild" -destination "platform=iOS Simulator,OS=8.0,name=iPhone 6" -configuration "Release" OBJROOT=$BUILDDIR SYMROOT=$BUILDDIR 

Hope this helps!

0
source

Source: https://habr.com/ru/post/976403/


All Articles