0
  1. What should be the architectures for the framework/library building for IOS devices? Is i386 relevant architecture for an ios framework?
  2. A framework consist of headers files and an archive file. How can we create this archive file?
  3. Now when I build a library project it creates .a file. So what is the difference between archive file and .a file?

Update

I am using below command for creating a framework

xcodebuild -scheme MyFramework -sdk iphonesimulator -arch="armv7s"  -configuration -Release  TARGETED_DEVICE_FAMILY="1, 2" VALID_ARCHS="amrv7 arm64 armv7s"

But its getting failed with following message:

No architectures to compile for (ARCHS=i386, VALID_ARCHS=amrv7 arm64 armv7s).

Why an ios framework need "i386" architecture?

Vivek Mohan
  • 8,078
  • 8
  • 31
  • 49

2 Answers2

2

Yes, you can create your own framework, Check out this on github https://github.com/wshcdr/iOS-Universal-Framework

wshcdr
  • 935
  • 2
  • 12
  • 27
  • 1
    Way to go. But use the latest one from the original repo, not this fork. https://github.com/kstenerud/iOS-Universal-Framework – benjist Jun 24 '14 at 08:23
0
  1. for iOS devices architectures are amrv7,armv7s, arm64(for 64 bit processors). i386 is simulator.
  2. I'm not sure what you mean by archive file. But framework creates automatically.

In your build command line you have specified -sdk iphonesimulator

which means that it will build for simulator, this requires i386. Change it to -sdk iphoneos to build it for iOS physical device.

David V
  • 2,134
  • 1
  • 16
  • 22